Copter: small precision landing improvements

This commit is contained in:
Dr.-Ing. Amilcar do Carmo Lucas 2019-02-04 19:12:44 +01:00 committed by Randy Mackay
parent 4a71ac5e93
commit 937e05bb2a
1 changed files with 1 additions and 1 deletions

View File

@ -440,7 +440,7 @@ void Copter::Mode::land_run_vertical_control(bool pause_descent)
cmb_rate = constrain_float(cmb_rate, max_land_descent_velocity, -abs(g.land_speed));
if (doing_precision_landing && copter.rangefinder_alt_ok() && copter.rangefinder_state.alt_cm > 35.0f && copter.rangefinder_state.alt_cm < 200.0f) {
float max_descent_speed = abs(g.land_speed)/2.0f;
float max_descent_speed = abs(g.land_speed)*0.5f;
float land_slowdown = MAX(0.0f, pos_control->get_horizontal_error()*(max_descent_speed/precland_acceptable_error));
cmb_rate = MIN(-precland_min_descent_speed, -max_descent_speed+land_slowdown);
}