Skip to content

Commit

Permalink
EKF: Don't auto select range finder for height when on ground.
Browse files Browse the repository at this point in the history
  • Loading branch information
priseborough committed May 7, 2018
1 parent 0a63052 commit 6708bec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion EKF/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 6708bec

Please sign in to comment.