diff --git a/src/modules/ekf2/EKF/ekf_helper.cpp b/src/modules/ekf2/EKF/ekf_helper.cpp index 7ff2c973f9..88530272da 100644 --- a/src/modules/ekf2/EKF/ekf_helper.cpp +++ b/src/modules/ekf2/EKF/ekf_helper.cpp @@ -1802,8 +1802,10 @@ void Ekf::runYawEKFGSF() } } + const bool run_yaw_estimator = _control_status.flags.in_air || !_control_status.flags.vehicle_at_rest; const Vector3f imu_gyro_bias = getGyroBias(); - _yawEstimator.update(_imu_sample_delayed, _control_status.flags.in_air, TAS, imu_gyro_bias); + + _yawEstimator.update(_imu_sample_delayed, run_yaw_estimator, TAS, imu_gyro_bias); // basic sanity check on GPS velocity data if (_gps_data_ready && _gps_sample_delayed.vacc > FLT_EPSILON &&