mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 01:11:37 +08:00
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:
@@ -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 */
|
||||
)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user