mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 21:55:34 +08:00
ekf2: Move range min/max checks to inside the ecl library
This commit is contained in:
committed by
Paul Riseborough
parent
da2fbf60b5
commit
4e3f7bdcc6
+1
-1
Submodule src/lib/ecl updated: 41953ab582...4d59c834eb
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user