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
@@ -60,7 +60,7 @@ protected:
bool _sticks_data_required = true; /**< let inherited task-class define if it depends on stick data */
matrix::Vector<float, 4> _sticks; /**< unmodified manual stick inputs */
matrix::Vector3f _sticks_expo; /**< modified manual sticks using expo function*/
matrix::Vector<float, 4> _sticks_expo; /**< modified manual sticks using expo function*/
float stickDeadzone() const { return _stick_dz.get(); }
@@ -76,6 +76,8 @@ private:
(ParamFloat<px4::params::MPC_XY_MAN_EXPO>)
_xy_vel_man_expo, /**< ratio of exponential curve for stick input in xy direction */
(ParamFloat<px4::params::MPC_Z_MAN_EXPO>)
_z_vel_man_expo /**< ratio of exponential curve for stick input in z direction */
_z_vel_man_expo, /**< ratio of exponential curve for stick input in z direction */
(ParamFloat<px4::params::MPC_YAW_EXPO>)
_yaw_expo /**< ratio of exponential curve for stick input in yaw for modes except acro */
)
};