mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-15 13:40:35 +08:00
Auto - Rename MC_YAWRAUTO_MAX -> MPC_YAWRAUTO_MAX
This commit is contained in:
@@ -113,7 +113,7 @@ void FlightTaskAuto::_limitYawRate()
|
||||
{
|
||||
if (PX4_ISFINITE(_yaw_setpoint) || PX4_ISFINITE(_yaw_sp_prev)) {
|
||||
// Limit the rate of change of the yaw setpoint
|
||||
float dy_max = math::radians(_param_mc_yawrauto_max.get()) * _deltatime;
|
||||
float dy_max = math::radians(_param_mpc_yawrauto_max.get()) * _deltatime;
|
||||
|
||||
if (fabsf(_yaw_setpoint - _yaw_sp_prev) < M_PI_F) {
|
||||
// Wrap around 0
|
||||
@@ -134,7 +134,7 @@ void FlightTaskAuto::_limitYawRate()
|
||||
}
|
||||
|
||||
if (PX4_ISFINITE(_yawspeed_setpoint)) {
|
||||
_yawspeed_setpoint = math::constrain(_yawspeed_setpoint, -_param_mc_yawrauto_max.get(), _param_mc_yawrauto_max.get());
|
||||
_yawspeed_setpoint = math::constrain(_yawspeed_setpoint, -_param_mpc_yawrauto_max.get(), _param_mpc_yawrauto_max.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ protected:
|
||||
_param_nav_mc_alt_rad, //vertical acceptance radius at which waypoints are updated
|
||||
(ParamInt<px4::params::MPC_YAW_MODE>) _param_mpc_yaw_mode, // defines how heading is executed,
|
||||
(ParamInt<px4::params::COM_OBS_AVOID>) _param_com_obs_avoid, // obstacle avoidance active
|
||||
(ParamFloat<px4::params::MC_YAWRAUTO_MAX>) _param_mc_yawrauto_max
|
||||
(ParamFloat<px4::params::MPC_YAWRAUTO_MAX>) _param_mpc_yawrauto_max
|
||||
);
|
||||
|
||||
private:
|
||||
|
||||
@@ -313,21 +313,6 @@ PARAM_DEFINE_FLOAT(MC_PITCHRATE_MAX, 220.0f);
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MC_YAWRATE_MAX, 200.0f);
|
||||
|
||||
/**
|
||||
* Max yaw rate in auto mode
|
||||
*
|
||||
* Limit for yaw rate, has effect for large rotations in autonomous mode,
|
||||
* to avoid large control output and mixer saturation.
|
||||
*
|
||||
* @unit deg/s
|
||||
* @min 0.0
|
||||
* @max 360.0
|
||||
* @decimal 1
|
||||
* @increment 5
|
||||
* @group Multicopter Attitude Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MC_YAWRAUTO_MAX, 45.0f);
|
||||
|
||||
/**
|
||||
* Max acro roll rate
|
||||
* default: 2 turns per second
|
||||
|
||||
@@ -615,6 +615,21 @@ PARAM_DEFINE_FLOAT(MPC_Z_MAN_EXPO, 0.0f);
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MPC_YAW_EXPO, 0.0f);
|
||||
|
||||
/**
|
||||
* Max yaw rate in auto mode
|
||||
*
|
||||
* Limit the rate of change of the yaw setpoint in autonomous mode
|
||||
* to avoid large control output and mixer saturation.
|
||||
*
|
||||
* @unit deg/s
|
||||
* @min 0.0
|
||||
* @max 360.0
|
||||
* @decimal 1
|
||||
* @increment 5
|
||||
* @group Multicopter Attitude Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MPC_YAWRAUTO_MAX, 45.0f);
|
||||
|
||||
/**
|
||||
* Altitude for 1. step of slow landing (descend)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user