Skip to content

Commit

Permalink
FW Position control: clean up param descriptions
Browse files Browse the repository at this point in the history
Mostly to save flash, but also to improve generally.

Signed-off-by: Silvan Fuhrer <[email protected]>
  • Loading branch information
sfuhrer committed Jun 12, 2024
1 parent 357e6d7 commit de5d62c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 42 deletions.
1 change: 0 additions & 1 deletion src/lib/fw_performance_model/PerformanceModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ class PerformanceModel : public ModuleParams
(ParamFloat<px4::params::WEIGHT_GROSS>) _param_weight_gross,
(ParamFloat<px4::params::FW_SERVICE_CEIL>) _param_service_ceiling,
(ParamFloat<px4::params::FW_THR_TRIM>) _param_fw_thr_trim,
(ParamFloat<px4::params::FW_THR_IDLE>) _param_fw_thr_idle,
(ParamFloat<px4::params::FW_THR_MAX>) _param_fw_thr_max,
(ParamFloat<px4::params::FW_THR_MIN>) _param_fw_thr_min,
(ParamFloat<px4::params::FW_THR_ASPD_MIN>) _param_fw_thr_aspd_min,
Expand Down
64 changes: 23 additions & 41 deletions src/modules/fw_pos_control/fw_path_navigation_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,6 @@ PARAM_DEFINE_FLOAT(FW_THR_MAX, 1.0f);
* Usually set to 0 but can be increased to prevent the motor from stopping when
* descending, which can increase achievable descent rates.
*
* For aircraft with internal combustion engine this parameter should be set
* for desired idle rpm.
*
* @unit norm
* @min 0.0
* @max 1.0
Expand All @@ -271,13 +268,7 @@ PARAM_DEFINE_FLOAT(FW_THR_MIN, 0.0f);
/**
* Idle throttle
*
* This is the minimum throttle while on the ground
*
* For aircraft with internal combustion engines, this parameter should be set
* above the desired idle rpm. For electric motors, idle should typically be set
* to zero.
*
* Note that in automatic modes, "landed" conditions will engage idle throttle.
* This is the minimum throttle while on the ground ("landed") in auto modes.
*
* @unit norm
* @min 0.0
Expand Down Expand Up @@ -344,7 +335,9 @@ PARAM_DEFINE_FLOAT(FW_TKO_AIRSPD, -1.0f);
PARAM_DEFINE_FLOAT(FW_LND_FLALT, 0.5f);

/**
* Use terrain estimation during landing. This is critical for detecting when to flare, and should be enabled if possible.
* Use terrain estimation during landing.
*
* This is critical for detecting when to flare, and should be enabled if possible.
*
* NOTE: terrain estimate is currently solely derived from a distance sensor.
*
Expand Down Expand Up @@ -423,8 +416,7 @@ PARAM_DEFINE_FLOAT(FW_LND_AIRSPD, -1.f);
/**
* Altitude time constant factor for landing
*
* Set this parameter to less than 1.0 to make TECS react faster to altitude errors during
* landing than during normal flight. During landing, the TECS
* During landing, the TECS
* altitude time constant (FW_T_ALT_TC) is multiplied by this value.
*
* @unit
Expand All @@ -445,10 +437,6 @@ PARAM_DEFINE_FLOAT(FW_LND_THRTC_SC, 1.0f);
* Maximum descent rate
*
* This sets the maximum descent rate that the controller will use.
* If this value is too large, the aircraft can over-speed on descent.
* This should be set to a value that can be achieved without
* exceeding the lower pitch angle limit and without over-speeding
* the aircraft.
*
* @unit m/s
* @min 1.0
Expand Down Expand Up @@ -508,9 +496,7 @@ PARAM_DEFINE_FLOAT(FW_T_I_GAIN_PIT, 0.1f);
*
* This is the maximum vertical acceleration (in m/s/s)
* either up or down that the controller will use to correct speed
* or height errors. The default value of 7 m/s/s (equivalent to +- 0.7 g)
* allows for reasonably aggressive pitch changes if required to recover
* from under-speed conditions.
* or height errors.
*
* @unit m/s^2
* @min 1.0
Expand All @@ -522,9 +508,9 @@ PARAM_DEFINE_FLOAT(FW_T_I_GAIN_PIT, 0.1f);
PARAM_DEFINE_FLOAT(FW_T_VERT_ACC, 7.0f);

/**
* Airspeed measurement standard deviation for airspeed filter.
* Airspeed measurement standard deviation
*
* This is the measurement standard deviation for the airspeed used in the airspeed filter in TECS.
* For the airspeed filter in TECS.
*
* @unit m/s
* @min 0.01
Expand All @@ -536,9 +522,9 @@ PARAM_DEFINE_FLOAT(FW_T_VERT_ACC, 7.0f);
PARAM_DEFINE_FLOAT(FW_T_SPD_STD, 0.2f);

/**
* Airspeed rate measurement standard deviation for airspeed filter.
* Airspeed rate measurement standard deviation
*
* This is the measurement standard deviation for the airspeed rate used in the airspeed filter in TECS.
* For the airspeed filter in TECS.
*
* @unit m/s^2
* @min 0.01
Expand All @@ -550,9 +536,9 @@ PARAM_DEFINE_FLOAT(FW_T_SPD_STD, 0.2f);
PARAM_DEFINE_FLOAT(FW_T_SPD_DEV_STD, 0.2f);

/**
* Process noise standard deviation for the airspeed rate in the airspeed filter.
* Process noise standard deviation for the airspeed rate
*
* This is the process noise standard deviation in the airspeed filter filter defining the noise in the
* This is the process noise standard deviation in the airspeed filter in TECS defining the noise in the
* airspeed rate for the constant airspeed rate model. This is used to define how much the airspeed and
* the airspeed rate are filtered. The smaller the value the more the measurements are smoothed with the
* drawback for delays.
Expand All @@ -570,14 +556,9 @@ PARAM_DEFINE_FLOAT(FW_T_SPD_PRC_STD, 0.2f);
/**
* Roll -> Throttle feedforward
*
* Increasing this gain turn increases the amount of throttle that will
* be used to compensate for the additional drag created by turning.
* Ideally this should be set to approximately 10 x the extra sink rate
* in m/s created by a 45 degree bank turn. Increase this gain if
* the aircraft initially loses energy in turns and reduce if the
* aircraft initially gains energy in turns. Efficient high aspect-ratio
* aircraft (eg powered sailplanes) can use a lower value, whereas
* inefficient low aspect-ratio models (eg delta wings) can use a higher value.
* Is used to compensate for the additional drag created by turning.
* Increase this gain if the aircraft initially loses energy in turns
* and reduce if the aircraft initially gains energy in turns.
*
* @min 0.0
* @max 20.0
Expand All @@ -592,11 +573,9 @@ PARAM_DEFINE_FLOAT(FW_T_RLL2THR, 15.0f);
*
* This parameter adjusts the amount of weighting that the pitch control
* applies to speed vs height errors. Setting it to 0.0 will cause the
* pitch control to control height and ignore speed errors. This will
* normally improve height accuracy but give larger airspeed errors.
* pitch control to control height and ignore speed errors.
* Setting it to 2.0 will cause the pitch control loop to control speed
* and ignore height errors. This will normally reduce airspeed errors,
* but give larger height errors. The default value of 1.0 allows the pitch
* and ignore height errors. The default value of 1.0 allows the pitch
* control to simultaneously control height and speed.
* Set to 2 for gliders.
*
Expand Down Expand Up @@ -635,7 +614,10 @@ PARAM_DEFINE_FLOAT(FW_T_PTCH_DAMP, 0.1f);
PARAM_DEFINE_FLOAT(FW_T_ALT_TC, 5.0f);

/**
* Minimum altitude error needed to descend with max airspeed. A negative value disables fast descend.
* Fast descend: minimum altitude error
*
* Minimum altitude error needed to descend with max airspeed and minimal throttle.
* A negative value disables fast descend.
*
* @min -1.0
* @decimal 0
Expand Down Expand Up @@ -680,9 +662,9 @@ PARAM_DEFINE_FLOAT(FW_T_TAS_TC, 5.0f);
PARAM_DEFINE_FLOAT(FW_GND_SPD_MIN, 5.0f);

/**
* RC stick configuration fixed-wing.
* RC stick configuration fixed-wing
*
* Set RC/joystick configuration for fixed-wing manual position and altitude controlled flight.
* Applies in manual Position and Altitude flight modes.
*
* @min 0
* @max 3
Expand Down

0 comments on commit de5d62c

Please sign in to comment.