From df0f8fed45b94b44f18595abafbd5f6fd1de4275 Mon Sep 17 00:00:00 2001 From: Roman Bapst Date: Fri, 5 Aug 2016 14:45:48 +0200 Subject: [PATCH] fixed wrong condition on which gps height would be fused (#180) - this solves the issue where height innovations would jump between two regimes Signed-off-by: Roman --- EKF/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EKF/control.cpp b/EKF/control.cpp index fd3cc7d8bd..bcba216819 100644 --- a/EKF/control.cpp +++ b/EKF/control.cpp @@ -398,7 +398,7 @@ void Ekf::controlGpsFusion() } // Determine if GPS should be used as the height source - if (((_params.vdist_sensor_type == VDIST_SENSOR_GPS) || _control_status.flags.gps) && !_gps_hgt_faulty) { + if (((_params.vdist_sensor_type == VDIST_SENSOR_GPS)) && !_gps_hgt_faulty) { _control_status.flags.baro_hgt = false; _control_status.flags.gps_hgt = true; _control_status.flags.rng_hgt = false;