mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-15 17:20:37 +08:00
added rng_stuck to filter control status flags (#392)
This commit is contained in:
committed by
Paul Riseborough
parent
7964820412
commit
f6d23cc621
+2
-2
@@ -1033,14 +1033,14 @@ void Ekf::checkForStuckRange()
|
||||
{
|
||||
if (_range_data_ready && _range_sample_delayed.time_us - _time_last_rng_ready > (uint64_t)10e6 &&
|
||||
_control_status.flags.in_air) {
|
||||
_rng_stuck = true;
|
||||
_control_status.flags.rng_stuck = true;
|
||||
|
||||
//require a variance of rangefinder values to check for "stuck" measurements
|
||||
if (_rng_check_max_val - _rng_check_min_val > 1.0f) {
|
||||
_time_last_rng_ready = _range_sample_delayed.time_us;
|
||||
_rng_check_min_val = 0.0f;
|
||||
_rng_check_max_val = 0.0f;
|
||||
_rng_stuck = false;
|
||||
_control_status.flags.rng_stuck = false;
|
||||
|
||||
} else {
|
||||
if (_range_sample_delayed.rng > _rng_check_max_val) {
|
||||
|
||||
Reference in New Issue
Block a user