mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 06:23:34 +08:00
EKF: Rework nav validity reporting
Remove duplicate checking for dead reckoning and consolidate into a single function. Use separate timers to check for start of dead reckoning and check when dead reckoning has been performed for too long for the nav solution to be valid. Allow the timeout for validity reporting to be adjusted externally. Separate external reporting of dead reckoning from internal checks.
This commit is contained in:
@@ -237,7 +237,7 @@ public:
|
||||
virtual bool global_position_is_valid() = 0;
|
||||
|
||||
// return true if the EKF is dead reckoning the position using inertial data only
|
||||
virtual bool inertial_dead_reckoning() = 0;
|
||||
bool inertial_dead_reckoning() {return _is_dead_reckoning;}
|
||||
|
||||
// return true if the terrain estimate is valid
|
||||
virtual bool get_terrain_valid() = 0;
|
||||
@@ -453,6 +453,7 @@ protected:
|
||||
innovation_fault_status_u _innov_check_fail_status{};
|
||||
|
||||
bool _is_dead_reckoning{false}; // true if we are no longer fusing measurements that constrain horizontal velocity drift
|
||||
bool _deadreckon_time_exceeded{false}; // true if the horizontal nav solution has been deadreckoning for too long and is invalid
|
||||
|
||||
// IMU vibration monitoring
|
||||
Vector3f _delta_ang_prev; // delta angle from the previous IMU measurement
|
||||
|
||||
Reference in New Issue
Block a user