mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 14:47:44 +08:00
fixed-wing: explicitly define landing airspeed
landing airspeed was previously defined by a scale factor multiplied by minimum airspeed. this commit changes this parameter to an explicit speed, and when unspecified, defaults to the minimum airspeed
This commit is contained in:
committed by
Daniel Agar
parent
9bdf09a300
commit
263a1884b1
@@ -8,7 +8,6 @@
|
||||
param set-default EKF2_MAG_ACCLIM 0
|
||||
param set-default EKF2_MAG_YAWLIM 0
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1
|
||||
param set-default FW_LND_ANG 8
|
||||
|
||||
param set-default FW_L1_PERIOD 12
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1.1
|
||||
param set-default FW_LND_ANG 5
|
||||
param set-default FW_LND_FL_PMIN 9.5
|
||||
param set-default FW_LND_FL_PMAX 20
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1.1
|
||||
param set-default FW_LND_ANG 5
|
||||
param set-default FW_LND_FL_PMIN 9.5
|
||||
param set-default FW_LND_FL_PMAX 20
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
param set-default EKF2_MAG_ACCLIM 0
|
||||
param set-default EKF2_MAG_YAWLIM 0
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1
|
||||
param set-default FW_LND_ANG 8
|
||||
|
||||
param set-default FW_L1_PERIOD 15
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1.1
|
||||
param set-default FW_LND_ANG 5
|
||||
param set-default FW_LND_FL_PMIN 9.5
|
||||
param set-default FW_LND_FL_PMAX 20
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
param set-default EKF2_MAG_ACCLIM 0
|
||||
param set-default EKF2_MAG_YAWLIM 0
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1
|
||||
param set-default FW_LND_ANG 8
|
||||
|
||||
param set-default FW_L1_PERIOD 12
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
param set-default EKF2_MAG_ACCLIM 0
|
||||
param set-default EKF2_MAG_YAWLIM 0
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1
|
||||
param set-default FW_LND_ANG 8
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
|
||||
|
||||
@@ -1328,7 +1328,7 @@ FixedwingPositionControl::control_auto_loiter(const float control_interval, cons
|
||||
// landing airspeed and potentially tighter altitude control) already such that we don't
|
||||
// have to do this switch (which can cause significant altitude errors) close to the ground.
|
||||
_tecs.set_height_error_time_constant(_param_fw_thrtc_sc.get() * _param_fw_t_h_error_tc.get());
|
||||
airspeed_sp = _param_fw_lnd_airspd_sc.get() * _param_fw_airspd_min.get();
|
||||
airspeed_sp = (_param_fw_lnd_airspd.get() > FLT_EPSILON) ? _param_fw_lnd_airspd.get() : _param_fw_airspd_min.get();
|
||||
_att_sp.apply_flaps = vehicle_attitude_setpoint_s::FLAPS_LAND;
|
||||
_att_sp.apply_spoilers = vehicle_attitude_setpoint_s::SPOILERS_LAND;
|
||||
|
||||
@@ -1655,7 +1655,8 @@ FixedwingPositionControl::control_auto_landing(const hrt_abstime &now, const flo
|
||||
local_land_point = calculateTouchdownPosition(control_interval, local_land_point);
|
||||
const Vector2f landing_approach_vector = calculateLandingApproachVector();
|
||||
|
||||
const float airspeed_land = _param_fw_lnd_airspd_sc.get() * _param_fw_airspd_min.get();
|
||||
const float airspeed_land = (_param_fw_lnd_airspd.get() > FLT_EPSILON) ? _param_fw_lnd_airspd.get() :
|
||||
_param_fw_airspd_min.get();
|
||||
float adjusted_min_airspeed = _param_fw_airspd_min.get();
|
||||
|
||||
if (airspeed_land < _param_fw_airspd_min.get()) {
|
||||
|
||||
@@ -803,7 +803,7 @@ private:
|
||||
(ParamFloat<px4::params::NPFG_SW_DST_MLT>) _param_npfg_switch_distance_multiplier,
|
||||
(ParamFloat<px4::params::NPFG_PERIOD_SF>) _param_npfg_period_safety_factor,
|
||||
|
||||
(ParamFloat<px4::params::FW_LND_AIRSPD_SC>) _param_fw_lnd_airspd_sc,
|
||||
(ParamFloat<px4::params::FW_LND_AIRSPD>) _param_fw_lnd_airspd,
|
||||
(ParamFloat<px4::params::FW_LND_ANG>) _param_fw_lnd_ang,
|
||||
(ParamFloat<px4::params::FW_LND_FL_PMAX>) _param_fw_lnd_fl_pmax,
|
||||
(ParamFloat<px4::params::FW_LND_FL_PMIN>) _param_fw_lnd_fl_pmin,
|
||||
|
||||
@@ -477,20 +477,19 @@ PARAM_DEFINE_FLOAT(FW_LND_FL_PMIN, 2.5f);
|
||||
PARAM_DEFINE_FLOAT(FW_LND_FL_PMAX, 15.0f);
|
||||
|
||||
/**
|
||||
* Min. airspeed scaling factor for landing
|
||||
* Landing airspeed
|
||||
*
|
||||
* Multiplying this factor with the minimum airspeed of the plane
|
||||
* gives the target airspeed the landing approach.
|
||||
* FW_AIRSPD_MIN * FW_LND_AIRSPD_SC
|
||||
* The calibrated airspeed setpoint during landing.
|
||||
*
|
||||
* @unit norm
|
||||
* @min 1.0
|
||||
* @max 1.5
|
||||
* @decimal 2
|
||||
* @increment 0.01
|
||||
* If set <= 0.0, landing airspeed = FW_AIRSPD_MIN by default.
|
||||
*
|
||||
* @unit m/s
|
||||
* @min -1.0
|
||||
* @decimal 1
|
||||
* @increment 0.1
|
||||
* @group FW Auto Landing
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(FW_LND_AIRSPD_SC, 1.3f);
|
||||
PARAM_DEFINE_FLOAT(FW_LND_AIRSPD, -1.f);
|
||||
|
||||
/**
|
||||
* Altitude time constant factor for landing
|
||||
|
||||
Reference in New Issue
Block a user