AutoMapper2: re-introduce gradual vertical speed limitation during landing between alt1 and alt2

This commit is contained in:
bresch
2019-11-22 09:47:54 +01:00
committed by Matthias Grob
parent 4d0786d5b4
commit 82b4e766a5
@@ -196,8 +196,10 @@ float FlightTaskAutoMapper2::_getLandSpeed()
speed = _constraints.speed_down;
} else {
float land_speed = _param_mpc_land_speed.get();
float head_room = _constraints.speed_down - land_speed;
const float land_speed = math::gradual(_dist_to_ground,
_param_mpc_land_alt2.get(), _param_mpc_land_alt1.get(),
_param_mpc_land_speed.get(), _constraints.speed_down);
const float head_room = _constraints.speed_down - land_speed;
speed = land_speed + 2 * (0.5f - throttle) * head_room;