GNSS yaw: allow unlimited resets on ground

This commit is contained in:
bresch 2021-08-02 14:23:09 +02:00 committed by Mathieu Bresciani
parent e90e1c7e2a
commit 30c7a596af
1 changed files with 4 additions and 1 deletions

View File

@ -784,7 +784,10 @@ void Ekf::controlGpsYawFusion(bool gps_checks_passing, bool gps_checks_failing)
if (_nb_gps_yaw_reset_available > 0) {
// Data seems good, attempt a reset
resetYawToGps();
_nb_gps_yaw_reset_available--;
if (_control_status.flags.in_air) {
_nb_gps_yaw_reset_available--;
}
} else if (starting_conditions_passing) {
// Data seems good, but previous reset did not fix the issue