mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 11:03:33 +08:00
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:
committed by
Daniel Agar
parent
6e7c119b31
commit
25148e1b45
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user