ekf2: stop mag fusion when inhibited for too long

Also do not try to run anything if mag is inhibited
This commit is contained in:
bresch
2022-12-29 12:56:36 -05:00
committed by Daniel Agar
parent c75a9058a5
commit 657bd6cf72
3 changed files with 19 additions and 50 deletions
+1 -1
View File
@@ -392,7 +392,7 @@ void Ekf::controlBetaFusion()
void Ekf::controlDragFusion()
{
if ((_params.fusion_mode & SensorFusionMask::USE_DRAG) && _drag_buffer &&
!_control_status.flags.fake_pos && _control_status.flags.in_air && !_mag_inhibit_yaw_reset_req) {
!_control_status.flags.fake_pos && _control_status.flags.in_air) {
if (!_control_status.flags.wind) {
// reset the wind states and covariances when starting drag accel fusion