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(); }