AP_NavEKF: Set prevDelAng after using it
This commit is contained in:
parent
aca78d321f
commit
bb6d8fd44a
@ -856,13 +856,13 @@ void NavEKF::UpdateStrapdownEquationsNED()
|
|||||||
// use weighted average of both IMU units for delta velocities
|
// use weighted average of both IMU units for delta velocities
|
||||||
correctedDelVel12 = correctedDelVel1 * IMU1_weighting + correctedDelVel2 * (1.0f - IMU1_weighting);
|
correctedDelVel12 = correctedDelVel1 * IMU1_weighting + correctedDelVel2 * (1.0f - IMU1_weighting);
|
||||||
|
|
||||||
// save current measurements
|
|
||||||
prevDelAng = correctedDelAng;
|
|
||||||
|
|
||||||
// apply corrections for earths rotation rate and coning errors
|
// apply corrections for earths rotation rate and coning errors
|
||||||
// % * - and + operators have been overloaded
|
// % * - and + operators have been overloaded
|
||||||
correctedDelAng = correctedDelAng - prevTnb * earthRateNED*dtIMU + (prevDelAng % correctedDelAng) * 8.333333e-2f;
|
correctedDelAng = correctedDelAng - prevTnb * earthRateNED*dtIMU + (prevDelAng % correctedDelAng) * 8.333333e-2f;
|
||||||
|
|
||||||
|
// save current measurements
|
||||||
|
prevDelAng = correctedDelAng;
|
||||||
|
|
||||||
// convert the rotation vector to its equivalent quaternion
|
// convert the rotation vector to its equivalent quaternion
|
||||||
rotationMag = correctedDelAng.length();
|
rotationMag = correctedDelAng.length();
|
||||||
if (rotationMag < 1e-12f)
|
if (rotationMag < 1e-12f)
|
||||||
|
Loading…
Reference in New Issue
Block a user