EKF: Don't auto select range finder for height when on ground.

This commit is contained in:
Paul Riseborough 2018-04-29 17:28:30 +10:00
parent 0a63052753
commit 6708bec1b4
1 changed files with 2 additions and 1 deletions

View File

@ -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
// 2) our ground speed is not higher than max_vel_for_dual_fusion
// 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
bool use_range_finder;