AP_NavEKF: Set prevDelAng after using it

This commit is contained in:
Jonathan Challinger 2014-10-12 04:11:05 -07:00 committed by Andrew Tridgell
parent aca78d321f
commit bb6d8fd44a

View File

@ -856,13 +856,13 @@ void NavEKF::UpdateStrapdownEquationsNED()
// use weighted average of both IMU units for delta velocities
correctedDelVel12 = correctedDelVel1 * IMU1_weighting + correctedDelVel2 * (1.0f - IMU1_weighting);
// save current measurements
prevDelAng = correctedDelAng;
// apply corrections for earths rotation rate and coning errors
// % * - and + operators have been overloaded
correctedDelAng = correctedDelAng - prevTnb * earthRateNED*dtIMU + (prevDelAng % correctedDelAng) * 8.333333e-2f;
// save current measurements
prevDelAng = correctedDelAng;
// convert the rotation vector to its equivalent quaternion
rotationMag = correctedDelAng.length();
if (rotationMag < 1e-12f)