fix(ekf2): reset gyro-bias-z-covariance on tryYawEmergencyReset to make recovering from wrong bias-estimate possible (#27327)

This commit is contained in:
Marco Hauswirth
2026-05-20 13:39:00 +02:00
committed by GitHub
parent ce23467822
commit 6e9c71b036
@@ -411,6 +411,10 @@ bool Ekf::tryYawEmergencyReset()
if (resetYawToEKFGSF()) {
ECL_WARN("GPS emergency yaw reset");
// in-flight yaw rescue is a signal that gyro_bias_z could be wrong
// bump its variance so new observations will correct it faster
resetGyroBiasZCov();
if (_control_status.flags.mag_hdg || _control_status.flags.mag_3D) {
// stop using the magnetometer in the main EKF otherwise its fusion could drag the yaw around
// and cause another navigation failure