mpc: add possibility to generate tilt using full 3D accel

Using full 3D acceleration provides better horizontal acceleration
tracking but also creates a sometimes unwanted behavior because the tilt
is directly coupled with the vertical acceleration setpoint.
This commit is contained in:
bresch
2024-01-26 16:53:21 +01:00
committed by Daniel Agar
parent 32aa3263a6
commit 2e6dd243af
5 changed files with 30 additions and 5 deletions
@@ -167,6 +167,7 @@ void MulticopterPositionControl::parameters_update(bool force)
Vector3f(_param_mpc_xy_vel_i_acc.get(), _param_mpc_xy_vel_i_acc.get(), _param_mpc_z_vel_i_acc.get()),
Vector3f(_param_mpc_xy_vel_d_acc.get(), _param_mpc_xy_vel_d_acc.get(), _param_mpc_z_vel_d_acc.get()));
_control.setHorizontalThrustMargin(_param_mpc_thr_xy_marg.get());
_control.decoupleHorizontalAndVecticalAcceleration(_param_mpc_acc_decouple.get());
_goto_control.setParamMpcAccHor(_param_mpc_acc_hor.get());
_goto_control.setParamMpcAccDownMax(_param_mpc_acc_down_max.get());
_goto_control.setParamMpcAccUpMax(_param_mpc_acc_up_max.get());