From 6b0988275809b415dc5d1ba0041597dd802b6ddc Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Thu, 28 Sep 2023 13:39:16 +0200 Subject: [PATCH] FW attitude/rate controller: shorten/improve param descriptions Signed-off-by: Silvan Fuhrer --- .../fw_att_control/fw_att_control_params.c | 24 +++------ .../fw_rate_control/fw_rate_control_params.c | 51 ++++--------------- 2 files changed, 17 insertions(+), 58 deletions(-) diff --git a/src/modules/fw_att_control/fw_att_control_params.c b/src/modules/fw_att_control/fw_att_control_params.c index 66d80ee90e..554eac360c 100644 --- a/src/modules/fw_att_control/fw_att_control_params.c +++ b/src/modules/fw_att_control/fw_att_control_params.c @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2013-2015 PX4 Development Team. All rights reserved. + * Copyright (c) 2013-2023 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -44,10 +44,7 @@ * Attitude Roll Time Constant * * This defines the latency between a roll step input and the achieved setpoint - * (inverse to a P gain). Half a second is a good start value and fits for - * most average systems. Smaller systems may require smaller values, but as - * this will wear out servos faster, the value should only be decreased as - * needed. + * (inverse to a P gain). Smaller systems may require smaller values. * * @unit s * @min 0.2 @@ -62,10 +59,7 @@ PARAM_DEFINE_FLOAT(FW_R_TC, 0.4f); * Attitude pitch time constant * * This defines the latency between a pitch step input and the achieved setpoint - * (inverse to a P gain). Half a second is a good start value and fits for - * most average systems. Smaller systems may require smaller values, but as - * this will wear out servos faster, the value should only be decreased as - * needed. + * (inverse to a P gain). Smaller systems may require smaller values. * * @unit s * @min 0.2 @@ -168,9 +162,6 @@ PARAM_DEFINE_FLOAT(FW_WR_I, 0.1f); /** * Wheel steering rate integrator limit * - * The portion of the integrator part in the control surface deflection is - * limited to this value - * * @min 0.0 * @max 1.0 * @decimal 2 @@ -197,8 +188,6 @@ PARAM_DEFINE_FLOAT(FW_W_RMAX, 30.0f); /** * Wheel steering rate feed forward * - * Direct feed forward from rate setpoint to control surface output - * * @unit %/rad/s * @min 0.0 * @max 10 @@ -228,8 +217,7 @@ PARAM_DEFINE_FLOAT(FW_PSP_OFF, 0.0f); * 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. + * It is added to the yaw rate setpoint generated by the controller for turn coordination. * * @unit deg/s * @min 0 @@ -242,7 +230,7 @@ PARAM_DEFINE_FLOAT(FW_MAN_YR_MAX, 30.f); /** * Maximum manual roll angle * - * Maximum manual roll angle setpoint (positive & negative) in manual attitude-only stabilized mode + * Applies to both directions in all manual modes with attitude stabilization * * @unit deg * @min 0.0 @@ -256,7 +244,7 @@ PARAM_DEFINE_FLOAT(FW_MAN_R_MAX, 45.0f); /** * Maximum manual pitch angle * - * Maximum manual pitch angle setpoint (positive & negative) in manual attitude-only stabilized mode + * Applies to both directions in all manual modes with attitude stabilization but without altitude control * * @unit deg * @min 0.0 diff --git a/src/modules/fw_rate_control/fw_rate_control_params.c b/src/modules/fw_rate_control/fw_rate_control_params.c index f52ed4b59d..cffd790401 100644 --- a/src/modules/fw_rate_control/fw_rate_control_params.c +++ b/src/modules/fw_rate_control/fw_rate_control_params.c @@ -46,10 +46,9 @@ * The minimal airspeed (calibrated airspeed) the user is able to command. * Further, if the airspeed falls below this value, the TECS controller will try to * increase airspeed more aggressively. - * Has to be set according to the vehicle's stall speed (which should be set in FW_AIRSPD_STALL), - * with some margin between the stall speed and minimum airspeed. + * Should be set (with some margin) above the vehicle stall speed. * This value corresponds to the desired minimum speed with the default load factor (level flight, default weight), - * and is automatically adpated to the current load factor (calculated from roll setpoint and WEIGHT_GROSS/WEIGHT_BASE). + * and is automatically adapated to the current load factor (calculated from roll setpoint and WEIGHT_GROSS/WEIGHT_BASE). * * @unit m/s * @min 0.5 @@ -142,9 +141,6 @@ PARAM_DEFINE_FLOAT(FW_PR_D, 0.f); /** * Pitch rate integrator gain. * - * This gain defines how much control response will result out of a steady - * state error. It trims any constant error. - * * @unit %/rad * @min 0.0 * @max 10 @@ -157,9 +153,6 @@ PARAM_DEFINE_FLOAT(FW_PR_I, 0.1f); /** * Pitch rate integrator limit * - * The portion of the integrator part in the control surface deflection is - * limited to this value - * * @min 0.0 * @max 1.0 * @decimal 2 @@ -169,7 +162,7 @@ PARAM_DEFINE_FLOAT(FW_PR_I, 0.1f); PARAM_DEFINE_FLOAT(FW_PR_IMAX, 0.4f); /** - * Roll rate proportional Gain + * Roll rate proportional gain * * @unit %/rad/s * @min 0.0 @@ -181,10 +174,7 @@ PARAM_DEFINE_FLOAT(FW_PR_IMAX, 0.4f); PARAM_DEFINE_FLOAT(FW_RR_P, 0.05f); /** - * Roll rate derivative Gain - * - * Roll rate differential gain. Small values help reduce fast oscillations. - * If value is too big oscillations will appear again. + * Roll rate derivative gain * * @unit %/rad/s * @min 0.0 @@ -193,13 +183,10 @@ PARAM_DEFINE_FLOAT(FW_RR_P, 0.05f); * @increment 0.005 * @group FW Rate Control */ -PARAM_DEFINE_FLOAT(FW_RR_D, 0.00f); +PARAM_DEFINE_FLOAT(FW_RR_D, 0.0f); /** - * Roll rate integrator Gain - * - * This gain defines how much control response will result out of a steady - * state error. It trims any constant error. + * Roll rate integrator gain * * @unit %/rad * @min 0.0 @@ -211,9 +198,7 @@ PARAM_DEFINE_FLOAT(FW_RR_D, 0.00f); PARAM_DEFINE_FLOAT(FW_RR_I, 0.1f); /** - * Roll integrator anti-windup - * - * The portion of the integrator part in the control surface deflection is limited to this value. + * Roll integrator limit * * @min 0.0 * @max 1.0 @@ -238,9 +223,6 @@ PARAM_DEFINE_FLOAT(FW_YR_P, 0.05f); /** * Yaw rate derivative gain * - * Yaw rate differential gain. Small values help reduce fast oscillations. - * If value is too big oscillations will appear again. - * * @unit %/rad/s * @min 0.0 * @max 10 @@ -253,9 +235,6 @@ PARAM_DEFINE_FLOAT(FW_YR_D, 0.0f); /** * Yaw rate integrator gain * - * This gain defines how much control response will result out of a steady - * state error. It trims any constant error. - * * @unit %/rad * @min 0.0 * @max 10 @@ -268,9 +247,6 @@ PARAM_DEFINE_FLOAT(FW_YR_I, 0.1f); /** * Yaw rate integrator limit * - * The portion of the integrator part in the control surface deflection is - * limited to this value - * * @min 0.0 * @max 1.0 * @decimal 2 @@ -282,9 +258,7 @@ PARAM_DEFINE_FLOAT(FW_YR_IMAX, 0.2f); /** * Roll rate feed forward * - * Direct feed forward from rate setpoint to control surface output. Use this - * to obtain a tigher response of the controller without introducing - * noise amplification. + * Direct feed forward from rate setpoint to control surface output. * * @unit %/rad/s * @min 0.0 @@ -324,10 +298,7 @@ PARAM_DEFINE_FLOAT(FW_PR_FF, 0.5f); PARAM_DEFINE_FLOAT(FW_YR_FF, 0.3f); /** - * Acro body x max rate. - * - * This is the rate the controller is trying to achieve if the user applies full roll - * stick input in acro mode. + * Acro body roll max rate setpoint * * @min 10 * @max 720 @@ -337,7 +308,7 @@ PARAM_DEFINE_FLOAT(FW_YR_FF, 0.3f); PARAM_DEFINE_FLOAT(FW_ACRO_X_MAX, 90); /** - * Acro body pitch max rate setpoint. + * Acro body pitch max rate setpoint * * @min 10 * @max 720 @@ -347,7 +318,7 @@ PARAM_DEFINE_FLOAT(FW_ACRO_X_MAX, 90); PARAM_DEFINE_FLOAT(FW_ACRO_Y_MAX, 90); /** - * Acro body yaw max rate setpoint. + * Acro body yaw max rate setpoint * * @min 10 * @max 720