mc_pos_control: suppress vertical acceleration feed-forward during takeoff ramp

Because the takeoff ramp is a vertical velocity limit ramp for the
nice user experience but the acceleration feed-forward can
add on top of the output and depending on trajectory generation
result in unwanted thrust changes during the ramp.
This commit is contained in:
Matthias Grob 2020-05-04 13:12:34 +02:00
parent bcce75e691
commit 8e2c52a31a

View File

@ -616,6 +616,7 @@ MulticopterPositionControl::Run()
// limit tilt during takeoff ramupup
if (_takeoff.getTakeoffState() < TakeoffState::flight) {
constraints.tilt = math::radians(_param_mpc_tiltmax_lnd.get());
setpoint.acceleration[2] = NAN;
}
// limit altitude only if local position is valid