ekf2: move gps yaw reset in starting function

This commit is contained in:
bresch
2021-11-01 13:59:34 +01:00
committed by Mathieu Bresciani
parent 1461eb0e32
commit 9afc390552
2 changed files with 12 additions and 8 deletions
+3 -3
View File
@@ -820,10 +820,10 @@ void Ekf::controlGpsYawFusion(bool gps_checks_passing, bool gps_checks_failing)
} else {
if (starting_conditions_passing) {
// Try to activate GPS yaw fusion
if (resetYawToGps()) {
_control_status.flags.yaw_align = true;
startGpsYawFusion();
if (_control_status.flags.gps_yaw) {
_nb_gps_yaw_reset_available = 1;
startGpsYawFusion();
}
}
}