Browse Source

AP_NavEKF3: reset inhibitMagStates on in-flight yaw reset

this is needed to prevent the next ConstrainVariances() from zeroing
the variances, which leads to very slow learning of mag states
master
Andrew Tridgell 6 years ago
parent
commit
fae2e44eac
  1. 3
      libraries/AP_NavEKF3/AP_NavEKF3_MagFusion.cpp

3
libraries/AP_NavEKF3/AP_NavEKF3_MagFusion.cpp

@ -127,6 +127,9 @@ void NavEKF3_core::controlMagYawReset() @@ -127,6 +127,9 @@ void NavEKF3_core::controlMagYawReset()
gcs().send_text(MAV_SEVERITY_WARNING, "EKF3 IMU%u ground mag anomaly, yaw re-aligned",(unsigned)imu_index);
}
// prevent reset of variances in ConstrainVariances()
inhibitMagStates = false;
// update the yaw reset completed status
recordYawReset();

Loading…
Cancel
Save