mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 06:43:34 +08:00
VTOL: change transition airspeed threshold: only look at VT_ARSP_TRANS (#22581)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -598,18 +598,19 @@ float VtolType::getOpenLoopFrontTransitionTime() const
|
|||||||
}
|
}
|
||||||
float VtolType::getTransitionAirspeed() const
|
float VtolType::getTransitionAirspeed() const
|
||||||
{
|
{
|
||||||
return math::max(_param_vt_arsp_trans.get(), getMinimumTransitionAirspeed());
|
// Since the stall airspeed increases with vehicle weight, we increase the transition airspeed
|
||||||
}
|
// by the same factor.
|
||||||
float VtolType::getMinimumTransitionAirspeed() const
|
|
||||||
{
|
|
||||||
float weight_ratio = 1.0f;
|
float weight_ratio = 1.0f;
|
||||||
|
|
||||||
if (_param_weight_base.get() > FLT_EPSILON && _param_weight_gross.get() > FLT_EPSILON) {
|
if (_param_weight_base.get() > FLT_EPSILON && _param_weight_gross.get() > FLT_EPSILON) {
|
||||||
weight_ratio = math::constrain(_param_weight_gross.get() / _param_weight_base.get(), kMinWeightRatio, kMaxWeightRatio);
|
weight_ratio = math::constrain(_param_weight_gross.get() /
|
||||||
|
_param_weight_base.get(), kMinWeightRatio, kMaxWeightRatio);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sqrtf(weight_ratio) * _param_airspeed_min.get();
|
return sqrtf(weight_ratio) * _param_vt_arsp_trans.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
float VtolType::getBlendAirspeed() const
|
float VtolType::getBlendAirspeed() const
|
||||||
{
|
{
|
||||||
return _param_vt_arsp_blend.get();
|
return _param_vt_arsp_blend.get();
|
||||||
|
|||||||
@@ -237,12 +237,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
float getOpenLoopFrontTransitionTime() const;
|
float getOpenLoopFrontTransitionTime() const;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return The minimum calibrated airspeed compensated for weight [m/s]
|
|
||||||
*/
|
|
||||||
float getMinimumTransitionAirspeed() const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return The calibrated blending airspeed [m/s]
|
* @return The calibrated blending airspeed [m/s]
|
||||||
@@ -371,8 +365,7 @@ protected:
|
|||||||
(ParamFloat<px4::params::MPC_LAND_ALT2>) _param_mpc_land_alt2,
|
(ParamFloat<px4::params::MPC_LAND_ALT2>) _param_mpc_land_alt2,
|
||||||
(ParamFloat<px4::params::VT_LND_PITCH_MIN>) _param_vt_lnd_pitch_min,
|
(ParamFloat<px4::params::VT_LND_PITCH_MIN>) _param_vt_lnd_pitch_min,
|
||||||
(ParamFloat<px4::params::WEIGHT_BASE>) _param_weight_base,
|
(ParamFloat<px4::params::WEIGHT_BASE>) _param_weight_base,
|
||||||
(ParamFloat<px4::params::WEIGHT_GROSS>) _param_weight_gross,
|
(ParamFloat<px4::params::WEIGHT_GROSS>) _param_weight_gross
|
||||||
(ParamFloat<px4::params::FW_AIRSPD_MIN>) _param_airspeed_min
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user