Skip to content

Commit 8561f52

Browse files
priseboroughtridge
authored andcommitted
AP_NavEKF3: Fix bug preventing yaw alignment to EKF-GSF estimate
1 parent fe81387 commit 8561f52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/AP_NavEKF3/AP_NavEKF3_Control.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,14 +718,14 @@ void NavEKF3_core::runYawEstimatorCorrection()
718718
} else {
719719
EKFGSF_yaw_valid_count = 0;
720720
}
721-
} else {
722-
EKFGSF_yaw_valid_count = 0;
723721
}
724722

725723
// action an external reset request
726724
if (EKFGSF_yaw_reset_request_ms > 0 && imuSampleTime_ms - EKFGSF_yaw_reset_request_ms < YAW_RESET_TO_GSF_TIMEOUT_MS) {
727725
EKFGSF_resetMainFilterYaw();
728726
}
727+
} else {
728+
EKFGSF_yaw_valid_count = 0;
729729
}
730730
}
731731

0 commit comments

Comments
 (0)