From 88c4929c96e37cfdb02be4e1d05d756b02a0a3a2 Mon Sep 17 00:00:00 2001 From: kamilritz Date: Wed, 11 Dec 2019 16:11:31 +0100 Subject: [PATCH] Use helper function to switch to gps height --- EKF/gps_checks.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/EKF/gps_checks.cpp b/EKF/gps_checks.cpp index 8085a13377..85bd3e2479 100644 --- a/EKF/gps_checks.cpp +++ b/EKF/gps_checks.cpp @@ -92,9 +92,7 @@ bool Ekf::collect_gps(const gps_message &gps) // if the user has selected GPS as the primary height source, switch across to using it if (_params.vdist_sensor_type == VDIST_SENSOR_GPS) { ECL_INFO_TIMESTAMPED("EKF GPS checks passed (WGS-84 origin set, using GPS height)"); - _control_status.flags.baro_hgt = false; - _control_status.flags.gps_hgt = true; - _control_status.flags.rng_hgt = false; + setControlGPSHeight(); // zero the sensor offset _hgt_sensor_offset = 0.0f; } else {