mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 13:03:33 +08:00
vtol: make sure transition airpseed is above weight compensated minimum airspeed
Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
@@ -204,16 +204,16 @@ void Standard::update_transition_state()
|
||||
_param_vt_psher_slew.get() * _dt, _param_vt_f_trans_thr.get());
|
||||
}
|
||||
|
||||
_airspeed_trans_blend_margin = _param_vt_arsp_trans.get() - _param_vt_arsp_blend.get();
|
||||
_airspeed_trans_blend_margin = getTransitionAirspeed() - getBlendAirspeed();
|
||||
|
||||
// do blending of mc and fw controls if a blending airspeed has been provided and the minimum transition time has passed
|
||||
if (_airspeed_trans_blend_margin > 0.0f &&
|
||||
PX4_ISFINITE(_airspeed_validated->calibrated_airspeed_m_s) &&
|
||||
_airspeed_validated->calibrated_airspeed_m_s > 0.0f &&
|
||||
_airspeed_validated->calibrated_airspeed_m_s >= _param_vt_arsp_blend.get() &&
|
||||
_airspeed_validated->calibrated_airspeed_m_s >= getBlendAirspeed() &&
|
||||
_time_since_trans_start > getMinimumFrontTransitionTime()) {
|
||||
|
||||
mc_weight = 1.0f - fabsf(_airspeed_validated->calibrated_airspeed_m_s - _param_vt_arsp_blend.get()) /
|
||||
mc_weight = 1.0f - fabsf(_airspeed_validated->calibrated_airspeed_m_s - getBlendAirspeed()) /
|
||||
_airspeed_trans_blend_margin;
|
||||
// time based blending when no airspeed sensor is set
|
||||
|
||||
|
||||
Reference in New Issue
Block a user