mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-07 00:20:34 +08:00
fw att: add param to select yawrate control method
This commit is contained in:
committed by
Lorenz Meier
parent
1b8a830a38
commit
53ffde30c2
@@ -183,6 +183,7 @@ private:
|
||||
float y_roll_feedforward;
|
||||
float y_integrator_max;
|
||||
float y_coordinated_min_speed;
|
||||
int32_t y_coordinated_method;
|
||||
float y_rmax;
|
||||
|
||||
float airspeed_min;
|
||||
@@ -225,6 +226,7 @@ private:
|
||||
param_t y_roll_feedforward;
|
||||
param_t y_integrator_max;
|
||||
param_t y_coordinated_min_speed;
|
||||
param_t y_coordinated_method;
|
||||
param_t y_rmax;
|
||||
|
||||
param_t airspeed_min;
|
||||
@@ -391,6 +393,7 @@ FixedwingAttitudeControl::FixedwingAttitudeControl() :
|
||||
_parameter_handles.airspeed_max = param_find("FW_AIRSPD_MAX");
|
||||
|
||||
_parameter_handles.y_coordinated_min_speed = param_find("FW_YCO_VMIN");
|
||||
_parameter_handles.y_coordinated_method = param_find("FW_YCO_METHOD");
|
||||
|
||||
_parameter_handles.trim_roll = param_find("TRIM_ROLL");
|
||||
_parameter_handles.trim_pitch = param_find("TRIM_PITCH");
|
||||
@@ -459,6 +462,7 @@ FixedwingAttitudeControl::parameters_update()
|
||||
param_get(_parameter_handles.y_ff, &(_parameters.y_ff));
|
||||
param_get(_parameter_handles.y_integrator_max, &(_parameters.y_integrator_max));
|
||||
param_get(_parameter_handles.y_coordinated_min_speed, &(_parameters.y_coordinated_min_speed));
|
||||
param_get(_parameter_handles.y_coordinated_method, &(_parameters.y_coordinated_method));
|
||||
param_get(_parameter_handles.y_rmax, &(_parameters.y_rmax));
|
||||
|
||||
param_get(_parameter_handles.airspeed_min, &(_parameters.airspeed_min));
|
||||
@@ -501,6 +505,7 @@ FixedwingAttitudeControl::parameters_update()
|
||||
_yaw_ctrl.set_k_ff(_parameters.y_ff);
|
||||
_yaw_ctrl.set_integrator_max(_parameters.y_integrator_max);
|
||||
_yaw_ctrl.set_coordinated_min_speed(_parameters.y_coordinated_min_speed);
|
||||
_yaw_ctrl.set_coordinated_method(_parameters.y_coordinated_method);
|
||||
_yaw_ctrl.set_max_rate(math::radians(_parameters.y_rmax));
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -275,6 +275,19 @@ PARAM_DEFINE_FLOAT(FW_YR_FF, 0.3f);
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(FW_YCO_VMIN, 1000.0f);
|
||||
|
||||
/**
|
||||
* Method used for yaw coordination
|
||||
*
|
||||
* The param value sets the method used to calculate the yaw rate
|
||||
* 0: open-loop zero lateral acceleration based on kinematic constraints
|
||||
*
|
||||
* @min 0
|
||||
* @max 0
|
||||
* @unit m/s
|
||||
* @group FW Attitude Control
|
||||
*/
|
||||
PARAM_DEFINE_INT32(FW_YCO_METHOD, 0);
|
||||
|
||||
/* Airspeed parameters:
|
||||
* The following parameters about airspeed are used by the attitude and the
|
||||
* position controller.
|
||||
|
||||
Reference in New Issue
Block a user