mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 16:23:34 +08:00
EKF2: add validity flags to global pos message (#23787)
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
This commit is contained in:
co-authored by
Mathieu Bresciani
parent
808153b049
commit
0c451552c7
@@ -746,8 +746,10 @@ void EstimatorChecks::setModeRequirementFlags(const Context &context, bool pre_f
|
||||
}
|
||||
}
|
||||
|
||||
const bool global_pos_valid = gpos.lat_lon_valid && gpos.alt_valid;
|
||||
|
||||
failsafe_flags.global_position_invalid =
|
||||
!checkPosVelValidity(now, xy_valid, gpos.eph, lpos_eph_threshold, gpos.timestamp,
|
||||
!checkPosVelValidity(now, global_pos_valid, gpos.eph, lpos_eph_threshold, gpos.timestamp,
|
||||
_last_gpos_fail_time_us, !failsafe_flags.global_position_invalid);
|
||||
|
||||
// Additional warning if the system is about to enter position-loss failsafe after dead-reckoning period
|
||||
|
||||
Reference in New Issue
Block a user