Skip to content

Commit

Permalink
AP_NavEKF: Set prevDelAng after using it
Browse files Browse the repository at this point in the history
  • Loading branch information
jschall authored and Andrew Tridgell committed Oct 30, 2014
1 parent aca78d3 commit bb6d8fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libraries/AP_NavEKF/AP_NavEKF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bb6d8fd

Please sign in to comment.