From 493e35b72e9ed2531e10f16438fdc08f94ec7c0b Mon Sep 17 00:00:00 2001 From: bresch Date: Wed, 9 Feb 2022 17:44:22 +0100 Subject: [PATCH] ekf_terr: reset rng fault when on ground --- src/modules/ekf2/EKF/terrain_estimator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/ekf2/EKF/terrain_estimator.cpp b/src/modules/ekf2/EKF/terrain_estimator.cpp index 3a1b4d072f..9ba6db7242 100644 --- a/src/modules/ekf2/EKF/terrain_estimator.cpp +++ b/src/modules/ekf2/EKF/terrain_estimator.cpp @@ -53,6 +53,7 @@ void Ekf::runTerrainEstimator() // If we are on ground, store the local position and time to use as a reference if (!_control_status.flags.in_air) { _last_on_ground_posD = _state.pos(2); + _control_status.flags.rng_fault = false; } predictHagl();