From 4db23b7b2e9ad4b903933cdba0c264b0a4c69672 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Thu, 12 Oct 2017 08:26:04 +1100 Subject: [PATCH] EKF: Don't report terrain estimate invalid immediately when HAGL observations fail checks --- EKF/terrain_estimator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EKF/terrain_estimator.cpp b/EKF/terrain_estimator.cpp index d6dfff8814..da6b56755a 100644 --- a/EKF/terrain_estimator.cpp +++ b/EKF/terrain_estimator.cpp @@ -159,7 +159,7 @@ void Ekf::fuseHagl() bool Ekf::get_terrain_valid() { if (_terrain_initialised && _range_data_continuous && !_rng_stuck && - !_innov_check_fail_status.flags.reject_hagl) { + (_time_last_imu - _time_last_hagl_fuse < 5E6)) { return true; } else {