mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 16:56:25 +08:00
fix(ekf2): reset gyro-bias-z-covariance on tryYawEmergencyReset to make recovering from wrong bias-estimate possible (#27327)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user