GotoControl: rename yaw rate acceleration parameter

such that not only one letter differs to MPC_YAWRAUTO_MAX
This commit is contained in:
Matthias Grob
2023-11-30 17:16:02 +01:00
parent dc7f9165d1
commit d1e8bdbd16
3 changed files with 7 additions and 7 deletions
@@ -229,7 +229,7 @@ void GotoControl::setPositionSmootherLimits(const goto_setpoint_s &goto_setpoint
void GotoControl::setHeadingSmootherLimits(const goto_setpoint_s &goto_setpoint)
{
float max_heading_rate = _param_mpc_yawrauto_max.get();
float max_heading_accel = _param_mpc_yawaauto_max.get();
float max_heading_accel = _param_mpc_yawrauto_acc.get();
if (goto_setpoint.flag_set_max_heading_rate && PX4_ISFINITE(_param_mpc_yawrauto_max.get())) {
max_heading_rate = math::constrain(_param_mpc_yawrauto_max.get(), 0.f,
@@ -239,8 +239,8 @@ void GotoControl::setHeadingSmootherLimits(const goto_setpoint_s &goto_setpoint)
// only limit acceleration once within velocity constraints
if (fabsf(_heading_smoothing.getSmoothedHeadingRate()) <= max_heading_rate) {
const float rate_scale = max_heading_rate / _param_mpc_yawrauto_max.get();
max_heading_accel = math::constrain(_param_mpc_yawaauto_max.get() * rate_scale,
0.f, _param_mpc_yawaauto_max.get());
max_heading_accel = math::constrain(_param_mpc_yawrauto_acc.get() * rate_scale,
0.f, _param_mpc_yawrauto_acc.get());
}
}
@@ -132,7 +132,7 @@ private:
(ParamFloat<px4::params::MPC_ACC_UP_MAX>) _param_mpc_acc_up_max,
(ParamFloat<px4::params::MPC_JERK_AUTO>) _param_mpc_jerk_auto,
(ParamFloat<px4::params::MPC_YAWRAUTO_MAX>) _param_mpc_yawrauto_max,
(ParamFloat<px4::params::MPC_YAWAAUTO_MAX>) _param_mpc_yawaauto_max,
(ParamFloat<px4::params::MPC_YAWRAUTO_ACC>) _param_mpc_yawrauto_acc,
(ParamFloat<px4::params::MPC_XY_ERR_MAX>) _param_mpc_xy_err_max
);
};
@@ -133,7 +133,7 @@ PARAM_DEFINE_FLOAT(MPC_XY_TRAJ_P, 0.5f);
PARAM_DEFINE_FLOAT(MPC_XY_ERR_MAX, 2.f);
/**
* Max yaw rate in autonomous modes
* Maximum yaw rate in autonomous modes
*
* Limits the rate of change of the yaw setpoint to avoid large
* control output and mixer saturation.
@@ -148,7 +148,7 @@ PARAM_DEFINE_FLOAT(MPC_XY_ERR_MAX, 2.f);
PARAM_DEFINE_FLOAT(MPC_YAWRAUTO_MAX, 45.f);
/**
* Max yaw acceleration in autonomous modes
* Maximum yaw acceleration in autonomous modes
*
* Limits the acceleration of the yaw setpoint to avoid large
* control output and mixer saturation.
@@ -160,7 +160,7 @@ PARAM_DEFINE_FLOAT(MPC_YAWRAUTO_MAX, 45.f);
* @increment 5
* @group Multicopter Attitude Control
*/
PARAM_DEFINE_FLOAT(MPC_YAWAAUTO_MAX, 60.f);
PARAM_DEFINE_FLOAT(MPC_YAWRAUTO_ACC, 60.f);
/**
* Heading behavior in autonomous modes