mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 07:53:34 +08:00
FW controllers: change param FW_ARSP_MODE to FW_USE_AIRSPD
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -162,7 +162,7 @@ float FixedwingRateControl::get_airspeed_and_update_scaling()
|
||||
// if no airspeed measurement is available out best guess is to use the trim airspeed
|
||||
float airspeed = _param_fw_airspd_trim.get();
|
||||
|
||||
if ((_param_fw_arsp_mode.get() == 0) && airspeed_valid) {
|
||||
if (_param_fw_use_airspd.get() && airspeed_valid) {
|
||||
/* prevent numerical drama by requiring 0.5 m/s minimal speed */
|
||||
airspeed = math::max(0.5f, _airspeed_validated_sub.get().calibrated_airspeed_m_s);
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ private:
|
||||
(ParamFloat<px4::params::FW_AIRSPD_MIN>) _param_fw_airspd_min,
|
||||
(ParamFloat<px4::params::FW_AIRSPD_STALL>) _param_fw_airspd_stall,
|
||||
(ParamFloat<px4::params::FW_AIRSPD_TRIM>) _param_fw_airspd_trim,
|
||||
(ParamInt<px4::params::FW_ARSP_MODE>) _param_fw_arsp_mode,
|
||||
(ParamBool<px4::params::FW_USE_AIRSPD>) _param_fw_use_airspd,
|
||||
|
||||
(ParamInt<px4::params::FW_ARSP_SCALE_EN>) _param_fw_arsp_scale_en,
|
||||
|
||||
|
||||
@@ -41,16 +41,18 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Airspeed mode
|
||||
* Use airspeed for control
|
||||
*
|
||||
* On vehicles without airspeed sensor this parameter can be used to
|
||||
* enable flying without an airspeed reading
|
||||
* If set to 1, the airspeed measurement data, if valid, is used in the following controllers:
|
||||
* - Rate controller: output scaling
|
||||
* - Attitude controller: coordinated turn controller
|
||||
* - Position controller: airspeed setpoint tracking, takeoff logic
|
||||
* - VTOL: transition logic
|
||||
*
|
||||
* @value 0 Use airspeed in controller
|
||||
* @value 1 Do not use airspeed in controller
|
||||
* @boolean
|
||||
* @group FW Rate Control
|
||||
*/
|
||||
PARAM_DEFINE_INT32(FW_ARSP_MODE, 0);
|
||||
PARAM_DEFINE_INT32(FW_USE_AIRSPD, 1);
|
||||
|
||||
/**
|
||||
* Pitch rate proportional gain.
|
||||
|
||||
Reference in New Issue
Block a user