EKF: Clean up use of magnetometer declination. Before the innovation was not zero in fuseDeclination()

Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
This commit is contained in:
CarlOlsson
2019-03-13 08:14:23 +11:00
committed by Paul Riseborough
parent 1d91785a8e
commit 2b17ced405
5 changed files with 15 additions and 21 deletions
+1 -3
View File
@@ -389,8 +389,6 @@ private:
bool _inhibit_flow_use{false}; ///< true when use of optical flow and range finder is being inhibited
Vector2f _flowRadXYcomp; ///< measured delta angle of the image about the X and Y body axes after removal of body rotation (rad), RH rotation is positive
float _mag_declination{0.0f}; ///< magnetic declination used by reset and fusion functions (rad)
// output predictor states
Vector3f _delta_angle_corr; ///< delta angle correction vector (rad)
imuSample _imu_down_sampled{}; ///< down sampled imu data (sensor rate -> filter update rate)
@@ -553,7 +551,7 @@ private:
bool realignYawGPS();
// calculate the magnetic declination to be used by the alignment and fusion processing
void calcMagDeclination();
float getMagDeclination();
// reset position states of the ekf (only horizontal position)
bool resetPosition();