mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-04 19:48:54 +08:00
EKF: Don't auto select range finder for height when on ground.
This commit is contained in:
+2
-1
@@ -1042,7 +1042,8 @@ bool Ekf::rangeAidConditionsMet(bool in_range_aid_mode)
|
|||||||
// 1) we are not further than max_range_for_dual_fusion away from the ground
|
// 1) we are not further than max_range_for_dual_fusion away from the ground
|
||||||
// 2) our ground speed is not higher than max_vel_for_dual_fusion
|
// 2) our ground speed is not higher than max_vel_for_dual_fusion
|
||||||
// 3) Our terrain estimate is stable (needs better checks)
|
// 3) Our terrain estimate is stable (needs better checks)
|
||||||
if (_params.range_aid) {
|
// 4) We are in-air
|
||||||
|
if (_params.range_aid && _control_status.flags.in_air) {
|
||||||
// check if we should use range finder measurements to estimate height, use hysteresis to avoid rapid switching
|
// check if we should use range finder measurements to estimate height, use hysteresis to avoid rapid switching
|
||||||
bool use_range_finder;
|
bool use_range_finder;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user