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
@@ -81,6 +81,25 @@ PARAM_DEFINE_FLOAT(MC_PITCH_P, 6.5f);
*/
PARAM_DEFINE_FLOAT(MC_YAW_P, 2.8f);
/**
* Yaw weight
*
* A fraction [0,1] deprioritizing yaw compared to roll and pitch in non-linear attitude control.
* Deprioritizing yaw is necessary because multicopters have much less control authority
* in yaw compared to the other axes and it makes sense because yaw is not critical for
* stable hovering or 3D navigation.
*
* For yaw control tuning use MC_YAW_P. This ratio has no inpact on the yaw gain.
*
* @unit 1/s
* @min 0.0
* @max 1.0
* @decimal 2
* @increment 0.1
* @group Multicopter Attitude Control
*/
PARAM_DEFINE_FLOAT(MC_YAW_WEIGHT, 0.4f);
/**
* Max roll rate
*