From 64b0586dad59b9c02a8445c2d7007362c2536fd9 Mon Sep 17 00:00:00 2001 From: bresch Date: Mon, 19 Aug 2024 10:29:01 +0200 Subject: [PATCH] ekf2: return validity based on dead-reckoning time only --- src/modules/ekf2/EKF/ekf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/ekf2/EKF/ekf.h b/src/modules/ekf2/EKF/ekf.h index a7c43567df..d9ff978e20 100644 --- a/src/modules/ekf2/EKF/ekf.h +++ b/src/modules/ekf2/EKF/ekf.h @@ -294,17 +294,17 @@ public: // return true if the local position estimate is valid bool local_position_is_valid() const { - return (!_horizontal_deadreckon_time_exceeded && !_control_status.flags.fake_pos); + return !_horizontal_deadreckon_time_exceeded; } bool isLocalVerticalPositionValid() const { - return !_vertical_position_deadreckon_time_exceeded && !_control_status.flags.fake_hgt; + return !_vertical_position_deadreckon_time_exceeded; } bool isLocalVerticalVelocityValid() const { - return !_vertical_velocity_deadreckon_time_exceeded && !_control_status.flags.fake_hgt; + return !_vertical_velocity_deadreckon_time_exceeded; } bool isYawFinalAlignComplete() const