forked from Archive/PX4-Autopilot
EKF: Don't auto select range finder for height when on ground.
This commit is contained in:
parent
0a63052753
commit
6708bec1b4
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue