added a checking for range_aid to determine if we are relying on the range finder as our primary source of height observation (#491)

This commit is contained in:
dakejahl 2018-08-23 16:42:58 -04:00 committed by Paul Riseborough
parent aa134d5a61
commit 56b8bb08a1

View File

@ -1091,7 +1091,7 @@ void Ekf::get_ekf_ctrl_limits(float *vxy_max, float *vz_max, float *hagl_min, fl
// TODO : calculate visual odometry limits
bool relying_on_rangefinder = _control_status.flags.rng_hgt;
bool relying_on_rangefinder = _control_status.flags.rng_hgt && !_params.range_aid;
bool relying_on_optical_flow = _control_status.flags.opt_flow && !(_control_status.flags.gps || _control_status.flags.ev_pos);