ekf: force fallback to baro if GPS is stopped while in GPS height mode

Otherwise, no height aiding source is used
This commit is contained in:
bresch 2021-10-19 11:20:16 +02:00 committed by Mathieu Bresciani
parent 0a140ec59a
commit 8873e92c7c
1 changed files with 5 additions and 1 deletions

View File

@ -1509,7 +1509,11 @@ void Ekf::stopGpsFusion()
void Ekf::stopGpsPosFusion()
{
_control_status.flags.gps = false;
_control_status.flags.gps_hgt = false;
if (_control_status.flags.gps_hgt) {
startBaroHgtFusion();
}
_gps_pos_innov.setZero();
_gps_pos_innov_var.setZero();
_gps_pos_test_ratio.setZero();