AttitudeControl: let the user set yaw weight directly via parameter

instead of infering the yaw weight from the gains which can lead to
unexpected results depending on the particular vehicle tuning.
This commit is contained in:
Matthias Grob
2020-03-28 17:51:59 +01:00
parent 5b28847ecc
commit 96bbc63eb1
5 changed files with 32 additions and 10 deletions
@@ -94,7 +94,8 @@ void
MulticopterAttitudeControl::parameters_updated()
{
// Store some of the parameters in a more convenient way & precompute often-used values
_attitude_control.setProportionalGain(Vector3f(_param_mc_roll_p.get(), _param_mc_pitch_p.get(), _param_mc_yaw_p.get()));
_attitude_control.setProportionalGain(Vector3f(_param_mc_roll_p.get(), _param_mc_pitch_p.get(), _param_mc_yaw_p.get()),
_param_mc_yaw_weight.get());
// angular rate limits
using math::radians;