From d1e8bdbd1646ab2beb9ee569bd5921346109454c Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Mon, 27 Nov 2023 13:34:51 +0100 Subject: [PATCH] GotoControl: rename yaw rate acceleration parameter such that not only one letter differs to MPC_YAWRAUTO_MAX --- src/modules/mc_pos_control/GotoControl/GotoControl.cpp | 6 +++--- src/modules/mc_pos_control/GotoControl/GotoControl.hpp | 2 +- src/modules/mc_pos_control/multicopter_autonomous_params.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/mc_pos_control/GotoControl/GotoControl.cpp b/src/modules/mc_pos_control/GotoControl/GotoControl.cpp index 5bbfb18d8f..513ed9cb2d 100644 --- a/src/modules/mc_pos_control/GotoControl/GotoControl.cpp +++ b/src/modules/mc_pos_control/GotoControl/GotoControl.cpp @@ -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()); } } diff --git a/src/modules/mc_pos_control/GotoControl/GotoControl.hpp b/src/modules/mc_pos_control/GotoControl/GotoControl.hpp index 0ce8a96329..701a978b4d 100644 --- a/src/modules/mc_pos_control/GotoControl/GotoControl.hpp +++ b/src/modules/mc_pos_control/GotoControl/GotoControl.hpp @@ -132,7 +132,7 @@ private: (ParamFloat) _param_mpc_acc_up_max, (ParamFloat) _param_mpc_jerk_auto, (ParamFloat) _param_mpc_yawrauto_max, - (ParamFloat) _param_mpc_yawaauto_max, + (ParamFloat) _param_mpc_yawrauto_acc, (ParamFloat) _param_mpc_xy_err_max ); }; diff --git a/src/modules/mc_pos_control/multicopter_autonomous_params.c b/src/modules/mc_pos_control/multicopter_autonomous_params.c index bffaa5b513..1bfc336fce 100644 --- a/src/modules/mc_pos_control/multicopter_autonomous_params.c +++ b/src/modules/mc_pos_control/multicopter_autonomous_params.c @@ -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