mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-13 14:13:34 +08:00
EKF: remove check for faulty flag in fake rng
This removes the check for _rng_hgt_faulty in the decision of publishing a fake range measurement. The reason for this is that some distance sensors don't populate the quality flag, even if they are saturated. Hence, if we are on the ground and not moving, it is safe to publish a fake measurement of the distance sensor and overwrite the actual sensor data.
This commit is contained in:
committed by
Paul Riseborough
parent
933189eac0
commit
267195a11b
@@ -99,7 +99,7 @@ void Ekf::runTerrainEstimator()
|
||||
|
||||
// if stationary on the ground and no range data for over a second, fake a measurement
|
||||
// to handle bad range finder data when on ground
|
||||
if (_rng_hgt_faulty && !_range_data_ready && !_control_status.flags.in_air && _vehicle_at_rest && (_time_last_imu - _time_last_hagl_fuse) > (uint64_t)1E6) {
|
||||
if (!_range_data_ready && !_control_status.flags.in_air && _vehicle_at_rest && (_time_last_imu - _time_last_hagl_fuse) > (uint64_t)1E6) {
|
||||
_range_data_ready = true;
|
||||
_rng_hgt_faulty = false;
|
||||
_range_sample_delayed.rng = _params.rng_gnd_clearance;
|
||||
|
||||
Reference in New Issue
Block a user