Skip to content

Commit 30c7a59

Browse files
committed
GNSS yaw: allow unlimited resets on ground
1 parent e90e1c7 commit 30c7a59

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/modules/ekf2/EKF/control.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,10 @@ void Ekf::controlGpsYawFusion(bool gps_checks_passing, bool gps_checks_failing)
784784
if (_nb_gps_yaw_reset_available > 0) {
785785
// Data seems good, attempt a reset
786786
resetYawToGps();
787-
_nb_gps_yaw_reset_available--;
787+
788+
if (_control_status.flags.in_air) {
789+
_nb_gps_yaw_reset_available--;
790+
}
788791

789792
} else if (starting_conditions_passing) {
790793
// Data seems good, but previous reset did not fix the issue

0 commit comments

Comments
 (0)