EKF: Prevent rapid changes in declination estimate after a reset

Ensures that each time the earth field covariance and variance data is reset, that the off-diagonal elements containing earth field declination angle certainty is restored.
This commit is contained in:
Paul Riseborough
2019-01-31 09:53:57 -05:00
committed by Daniel Agar
parent 6e7c119b31
commit 25148e1b45
5 changed files with 21 additions and 4 deletions
+2 -2
View File
@@ -791,13 +791,13 @@ void Ekf::fuseHeading()
}
}
void Ekf::fuseDeclination()
void Ekf::fuseDeclination(float decl_sigma)
{
// assign intermediate state variables
float magN = _state.mag_I(0);
float magE = _state.mag_I(1);
float R_DECL = sq(0.5f);
float R_DECL = sq(decl_sigma);
// Calculate intermediate variables
float t2 = magE*magE;