mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00:00
use distance to ground if on ground an distance is out of range
This commit is contained in:
committed by
Lorenz Meier
parent
787931f04f
commit
40b8d8bd48
@@ -578,7 +578,13 @@ void Ekf2::run()
|
||||
// check if distance sensor is within working boundaries
|
||||
if (range_finder.min_distance >= range_finder.current_distance ||
|
||||
range_finder.max_distance <= range_finder.current_distance) {
|
||||
range_finder_updated = false;
|
||||
// use rng_gnd_clearance if on ground
|
||||
if (_ekf.get_in_air_status()) {
|
||||
range_finder_updated = false;
|
||||
|
||||
} else {
|
||||
range_finder.current_distance = _params->rng_gnd_clearance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user