FlightTaskManual: Yaw lock with deadzone and expo

More than a year ago I started the easy to use math::Functions to handle
the always used mathematical SISO functions to be tested and available.

I switched x, y and z stick input to the freesh programmed deadzone and
exponential functions from the library to unify and clarify their use.
I just realized yaw was left over because it lead to a drift problem in
certain new use cases.

Now I'm just adding the yaw stick to the already well working method.
This commit is contained in:
MaEtUgR
2018-07-20 09:26:18 +02:00
committed by Lorenz Meier
parent 8a3c7f9e41
commit 70802ba15a
4 changed files with 31 additions and 9 deletions
@@ -550,6 +550,22 @@ PARAM_DEFINE_FLOAT(MPC_XY_MAN_EXPO, 0.0f);
*/
PARAM_DEFINE_FLOAT(MPC_Z_MAN_EXPO, 0.0f);
/**
* Manual control stick yaw rotation exponential curve
*
* The higher the value the less sensitivity the stick has around zero
* while still reaching the maximum value with full stick deflection.
*
* 0 Purely linear input curve (default)
* 1 Purely cubic input curve
*
* @min 0
* @max 1
* @decimal 2
* @group Multicopter Position Control
*/
PARAM_DEFINE_FLOAT(MPC_YAW_EXPO, 0.0f);
/**
* Altitude for 1. step of slow landing (descend)
*