mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
mpc: leave room for altitude error control during descent and descent
Since the same parameter is used to generate the trajectory and to saturate the controller, there is no additional space for the output of the position controller once it is filled with the feedforward, letting the altitude grow uncontrolled.
This commit is contained in:
parent
ea7d2334c9
commit
4fc7348582
@ -830,6 +830,11 @@ void FlightTaskAuto::_updateTrajConstraints()
|
||||
_position_smoothing.setMaxAccelerationZ(_param_mpc_acc_down_max.get());
|
||||
_position_smoothing.setMaxVelocityZ(_param_mpc_z_v_auto_dn.get());
|
||||
}
|
||||
|
||||
// Stretch the constraints of the velocity controller to leave some room for an additional
|
||||
// correction required by the altitude/vertical position controller
|
||||
_constraints.speed_down = math::max(_constraints.speed_down, 1.2f * _param_mpc_z_v_auto_dn.get());;
|
||||
_constraints.speed_up = math::max(_constraints.speed_up, 1.2f * _param_mpc_z_v_auto_up.get());;
|
||||
}
|
||||
|
||||
bool FlightTaskAuto::_highEnoughForLandingGear()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user