mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 16:08:53 +08:00
EKF: Prevent unwanted declination fusion when re-starting 3-axis fusion
This commit is contained in:
committed by
Daniel Agar
parent
bd1647a7fb
commit
fe378fd761
+1
-1
@@ -1608,7 +1608,7 @@ void Ekf::controlMagFusion()
|
|||||||
_mag_decl_cov_reset = true;
|
_mag_decl_cov_reset = true;
|
||||||
fuseMag();
|
fuseMag();
|
||||||
} else {
|
} else {
|
||||||
// The normal sequence is to fuse the magnetmer data first before fusing
|
// The normal sequence is to fuse the magnetometer data first before fusing
|
||||||
// declination angle at a higher uncertainty to allow some learning of
|
// declination angle at a higher uncertainty to allow some learning of
|
||||||
// declination angle over time.
|
// declination angle over time.
|
||||||
fuseMag();
|
fuseMag();
|
||||||
|
|||||||
@@ -847,7 +847,6 @@ void Ekf::fixCovarianceErrors()
|
|||||||
if (!_control_status.flags.mag_3D) {
|
if (!_control_status.flags.mag_3D) {
|
||||||
zeroRows(P, 16, 21);
|
zeroRows(P, 16, 21);
|
||||||
zeroCols(P, 16, 21);
|
zeroCols(P, 16, 21);
|
||||||
_mag_decl_cov_reset = false;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// constrain variances
|
// constrain variances
|
||||||
|
|||||||
Reference in New Issue
Block a user