FW Att C: use new param FW_MAN_YR_MAX to control yawing with sticks in attitude controlled mode

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer 2022-11-21 17:08:08 +01:00 committed by Daniel Agar
parent c186f798b6
commit c24f9561e9
3 changed files with 20 additions and 3 deletions

View File

@ -549,9 +549,9 @@ void FixedwingAttitudeControl::Run()
}
}
/* add yaw rate setpoint from sticks in Stabilized mode */
/* add yaw rate setpoint from sticks in all attitude-controlled modes */
if (_vcontrol_mode.flag_control_manual_enabled) {
body_rates_setpoint(2) += math::constrain(_manual_control_setpoint.r * radians(_param_fw_y_rmax.get()),
body_rates_setpoint(2) += math::constrain(_manual_control_setpoint.r * radians(_param_fw_man_yr_max.get()),
-radians(_param_fw_y_rmax.get()), radians(_param_fw_y_rmax.get()));
}

View File

@ -240,7 +240,9 @@ private:
(ParamFloat<px4::params::TRIM_PITCH>) _param_trim_pitch,
(ParamFloat<px4::params::TRIM_ROLL>) _param_trim_roll,
(ParamFloat<px4::params::TRIM_YAW>) _param_trim_yaw
(ParamFloat<px4::params::TRIM_YAW>) _param_trim_yaw,
(ParamFloat<px4::params::FW_MAN_YR_MAX>) _param_fw_man_yr_max
)
ECL_RollController _roll_ctrl;

View File

@ -805,3 +805,18 @@ PARAM_DEFINE_FLOAT(FW_SPOILERS_DESC, 0.f);
* @group FW Attitude Control
*/
PARAM_DEFINE_INT32(FW_SPOILERS_MAN, 0);
/**
* Maximum manually added yaw rate
*
* This is the maximally added yaw rate setpoint from the yaw stick in any attitude controlled flight mode.
* The controller already generates a yaw rate setpoint to coordinate a turn, and this value is added to it.
* This is an absolute value, which is applied symmetrically to the negative and positive side.
*
* @unit deg/s
* @min 0
* @decimal 1
* @increment 0.5
* @group FW Attitude Control
*/
PARAM_DEFINE_FLOAT(FW_MAN_YR_MAX, 30.f);