mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 02:03:33 +08:00
EKF: Fix inconsistency in timeout for terrain validity
Terrain validity is determined solely by successful range finder fusion and terrain state initialisation. A range finder that has been declared faulty requires continuous range finder data fusion requires data to be continuous before the fault status _rng_hgt_faulty can be cleared. This will enforce the requirement for continuous data before fusion can commence.
This commit is contained in:
committed by
Lorenz Meier
parent
d1d49857f9
commit
628079719f
@@ -1144,6 +1144,11 @@ void Ekf::checkRangeDataValidity()
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't allow faulty flag to clear unless range data is continuous
|
||||
if (_rng_hgt_faulty && !_range_data_continuous) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't run the checks after this unless we have retrieved new data from the buffer
|
||||
if (!_range_data_ready) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user