mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
ekf2: limit mag heading fusion to prevent heading overconfidence
This commit is contained in:
parent
51883fe5d4
commit
2f51db7284
@ -120,7 +120,7 @@ void Ekf::controlMag3DFusion(const magSample &mag_sample, const bool common_star
|
||||
// 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 over time.
|
||||
const bool update_all_states = _control_status.flags.mag_3D || _control_status.flags.mag_hdg;
|
||||
const bool update_all_states = _control_status.flags.mag_3D || (_control_status.flags.mag_hdg && (getYawVar() > sq(_params.mag_heading_noise / 2.f)));
|
||||
const bool update_tilt = _control_status.flags.mag_3D;
|
||||
fuseMag(mag_sample.mag, aid_src, update_all_states, update_tilt);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user