From 37c662e4520d12ffe4499aabfa48c80337443039 Mon Sep 17 00:00:00 2001 From: bresch Date: Thu, 27 Jan 2022 17:08:02 +0100 Subject: [PATCH] update terrain validity all the time --- src/modules/ekf2/EKF/control.cpp | 1 + src/modules/ekf2/EKF/terrain_estimator.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ekf2/EKF/control.cpp b/src/modules/ekf2/EKF/control.cpp index bbf74ed809..97ec445b87 100644 --- a/src/modules/ekf2/EKF/control.cpp +++ b/src/modules/ekf2/EKF/control.cpp @@ -912,6 +912,7 @@ void Ekf::controlHeightFusion() if ((_control_status.flags.rng_hgt || _hagl_sensor_status.flags.range_finder) && _range_sensor.isDataHealthy()) { fuseHaglAllStates(); } + updateTerrainValidity(); } void Ekf::checkRangeAidSuitability() diff --git a/src/modules/ekf2/EKF/terrain_estimator.cpp b/src/modules/ekf2/EKF/terrain_estimator.cpp index 2b0e5fb0a8..882d8906e5 100644 --- a/src/modules/ekf2/EKF/terrain_estimator.cpp +++ b/src/modules/ekf2/EKF/terrain_estimator.cpp @@ -366,5 +366,4 @@ void Ekf::fuseHaglAllStates() _innov_check_fail_status.flags.reject_ver_pos = true; } } - updateTerrainValidity(); }