Browse Source

AP_NavEKF2: Remove unnecessary variance reset

This reset is unnecessary give that a synthetic yaw angle is fused at a low rate to prevent variances from becoming badly conditioned.
master
Paul Riseborough 9 years ago committed by Andrew Tridgell
parent
commit
e3c966661b
  1. 5
      libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp

5
libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp

@ -124,11 +124,6 @@ void NavEKF2_core::realignYawGPS() @@ -124,11 +124,6 @@ void NavEKF2_core::realignYawGPS()
// reset the magnetometer field states - we could have got bad external interference when initialising on-ground
calcQuatAndFieldStates(eulerAngles.x, eulerAngles.y);
// if we are not using a magnetometer, then the yaw gyro bias value will be invalid at this point and the
// state variance should be reset
if (!use_compass()) {
P[11][11] = sq(radians(InitialGyroBiasUncertainty() * dtEkfAvg));
}
// We shoud retry the primary magnetometer if previously switched or failed
magSelectIndex = 0;

Loading…
Cancel
Save