mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 05:03:34 +08:00
EKF: consolidate covariance corrections
Combines the forced symmetry, variance limiting and zeroing of covariances for unwanted states in the one function. This ensures a consistent correction is applied after every covariance prediction or correction.
This commit is contained in:
+3
-6
@@ -362,8 +362,7 @@ void Ekf::fuseMag()
|
||||
}
|
||||
|
||||
// correct the covariance marix for gross errors
|
||||
makeSymmetrical();
|
||||
limitCov();
|
||||
fixCovarianceErrors();
|
||||
|
||||
// apply the state corrections
|
||||
fuse(Kfusion, _mag_innov[index]);
|
||||
@@ -637,8 +636,7 @@ void Ekf::fuseHeading()
|
||||
}
|
||||
|
||||
// correct the covariance marix for gross errors
|
||||
makeSymmetrical();
|
||||
limitCov();
|
||||
fixCovarianceErrors();
|
||||
|
||||
// apply the state corrections
|
||||
fuse(Kfusion, _heading_innov);
|
||||
@@ -772,8 +770,7 @@ void Ekf::fuseDeclination()
|
||||
}
|
||||
|
||||
// correct the covariance marix for gross errors
|
||||
makeSymmetrical();
|
||||
limitCov();
|
||||
fixCovarianceErrors();
|
||||
|
||||
// apply the state corrections
|
||||
fuse(Kfusion, innovation);
|
||||
|
||||
Reference in New Issue
Block a user