mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 16:53:35 +08:00
EKF: Rework range height validity checking
Eliminate race condition caused by checking for data freshness using time stamps from buffer push instead than buffer pop events. Consistent use of range data ready and range data fault flags. This achieved by ensuring that _rng_hgt_faulty is set to true for all range data faults, not just data freshness. Include range data validity requirement in rangeAidConditionsMet() check.
This commit is contained in:
committed by
Lorenz Meier
parent
e0bcfeb533
commit
17d40478bb
@@ -94,7 +94,7 @@ void Ekf::runTerrainEstimator()
|
||||
_terrain_var = math::constrain(_terrain_var, 0.0f, 1e4f);
|
||||
|
||||
// Fuse range finder data if available
|
||||
if (_range_data_ready && !_control_status.flags.rng_stuck) {
|
||||
if (_range_data_ready && !_rng_hgt_faulty) {
|
||||
fuseHagl();
|
||||
|
||||
// update range sensor angle parameters in case they have changed
|
||||
|
||||
Reference in New Issue
Block a user