mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-30 15:44:07 +08:00
ekf2: Move range min/max checks to inside the ecl library
This commit is contained in:
parent
da2fbf60b5
commit
4e3f7bdcc6
@ -1 +1 @@
|
||||
Subproject commit 41953ab5823fe0e6d062e3641c37f5c05a3e5cc2
|
||||
Subproject commit 4d59c834ebb181b78294ec3981c3d32b470e6f15
|
||||
@ -939,10 +939,9 @@ void Ekf2::run()
|
||||
distance_sensor_s range_finder;
|
||||
|
||||
if (orb_copy(ORB_ID(distance_sensor), _range_finder_subs[_range_finder_sub_index], &range_finder) == PX4_OK) {
|
||||
// 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.signal_quality == 0) {
|
||||
// check distance sensor data quality
|
||||
// TODO - move this check inside the ecl library
|
||||
if (range_finder.signal_quality == 0) {
|
||||
// use rng_gnd_clearance if on ground
|
||||
if (_ekf.get_in_air_status()) {
|
||||
range_finder_updated = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user