add breakpoint and slope params for TPA

This commit is contained in:
Mark Whitehorn
2016-08-17 23:15:36 +02:00
committed by Lorenz Meier
parent 5c78af0f36
commit f1a1c9d7da
2 changed files with 41 additions and 1 deletions
@@ -375,3 +375,31 @@ PARAM_DEFINE_FLOAT(MC_ACRO_Y_MAX, 360.0f);
* @group Multicopter Attitude Control
*/
PARAM_DEFINE_FLOAT(MC_RATT_TH, 1.0f);
/**
* Threshold for Throttle PID Attenuation (TPA)
*
* Magnitude of throttle setpoint at which to begin attenuating roll/pitch P gain
*
* @min 0.0
* @max 1.0
* @decimal 2
* @increment 0.1
* @group Multicopter Attitude Control
*/
PARAM_DEFINE_FLOAT(MC_TPA_BREAK, 1.0f);
/**
* Slope for Throttle PID Attenuation (TPA)
*
* Rate at which to attenuate roll/pitch P gain
* Attenuation factor is 1.0 when throttle magnitude is below the setpoint
* Above the setpoint, the attenuation factor is (1 - slope*(abs(throttle)-breakpoint))
*
* @min 0.0
* @max 2.0
* @decimal 2
* @increment 0.1
* @group Multicopter Attitude Control
*/
PARAM_DEFINE_FLOAT(MC_TPA_SLOPE, 1.0f);