Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,7 @@ param set-default NAV_DLL_ACT 2

param set-default VT_FWD_THRUST_EN 4
param set-default VT_PITCH_MIN -5
param set-default VT_F_TRANS_THR 1
param set-default VT_F_TRANS_THR 0.4 # gives about 3 m/s^2 initially, 2 at higher airspeed
param set-default VT_TRANS_MIN_TM 4
param set-default VT_ARSP_TRANS 13 # between min (10) and trim (15)
param set-default VT_TYPE 2
2 changes: 2 additions & 0 deletions docs/en/config_vtol/vtol_quad_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ Parameter: [VT_F_TR_OL_TM](../advanced_config/parameter_reference.md#VT_F_TR_OL_

This specifies the duration of the front transition in seconds when no airspeed feedback is available (e.g. no airspeed sensor present).
It should be set to a value which ensures that the vehicle reaches a high enough airspeed to complete the transition, e.g. airspeed should exceed [VT_ARSP_TRANS](../advanced_config/parameter_reference.md#VT_ARSP_TRANS).
Without airspeed feedback, multirotor control is blended out linearly over the part of this time in which the airspeed would be between [VT_ARSP_BLEND](../advanced_config/parameter_reference.md#VT_ARSP_BLEND) and [VT_ARSP_TRANS](../advanced_config/parameter_reference.md#VT_ARSP_TRANS) at constant acceleration.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Without airspeed feedback, multirotor control is blended out linearly over the part of this time in which the airspeed would be between [VT_ARSP_BLEND](../advanced_config/parameter_reference.md#VT_ARSP_BLEND) and [VT_ARSP_TRANS](../advanced_config/parameter_reference.md#VT_ARSP_TRANS) at constant acceleration.
Without airspeed feedback, the airspeed is assumed to increase linearly from 0 to VT_ARSP_TRANS over VT_F_TR_OL_TM. The multicopter control blending then follows from this predicted airspeed, e.g. linear blending while it is between VT_ARSP_BLEND and VT_ARSP_TRANS.

For example, with `VT_ARSP_BLEND` = 8 m/s, `VT_ARSP_TRANS` = 10 m/s and this time set to 10 s, blending runs from 8 s to 10 s.

#### Transition Timeout

Expand Down
7 changes: 4 additions & 3 deletions docs/en/config_vtol/vtol_without_airspeed_sensor.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Examine the throttle level (thrust) when the vehicle is level (no or little pitc
The initial value to use as cruise speed should be the highest thrust applied during a roll or ascend, the thrust during level flight should be considered the minimum value if you decide to further tune down your speed.

Also take note of the time it took for a front transition to complete.
This will be used to set the minimum transition time.
This will be used to set the open-loop transition time.
For safety reasons you should add +- 30% to this time.

Finally take note of the groundspeed during cruise flight.
Expand All @@ -60,7 +60,8 @@ Note that QGC scales this from `1..100` and the thrust value from the log is sca
So a thrust of 0.65 should be entered as 65.
For safety reasons it is recommended to add +- 10% throttle to the determined value for testing a first flight.

Set the minimum front transition time ([VT_TRANS_MIN_TM](../advanced_config/parameter_reference.md#VT_TRANS_MIN_TM)) to the number of seconds determined from the reference flight and add +- 30% for safety.
Set the open-loop front transition time ([VT_F_TR_OL_TM](../advanced_config/parameter_reference.md#VT_F_TR_OL_TM)) to the number of seconds determined from the reference flight and add +- 30% for safety.
The multicopter motors are ramped down during the last part of this time, starting at the fraction [VT_ARSP_BLEND](../advanced_config/parameter_reference.md#VT_ARSP_BLEND) divided by [VT_ARSP_TRANS](../advanced_config/parameter_reference.md#VT_ARSP_TRANS) of it (e.g. after 8 s of 10 s with 8 m/s and 10 m/s).

### Optional Recommended Parameters

Expand Down Expand Up @@ -100,5 +101,5 @@ The relevant parameters are:
- [SYS_HAS_NUM_ASPD](../advanced_config/parameter_reference.md#SYS_HAS_NUM_ASPD)
- [EKF2_EN](../advanced_config/parameter_reference.md#EKF2_EN) (1), [ATT_EN](../advanced_config/parameter_reference.md#ATT_EN) (0), [LPE_EN](../advanced_config/parameter_reference.md#LPE_EN) (0)
- [FW_THR_TRIM](../advanced_config/parameter_reference.md#FW_THR_TRIM): determined (e.g. 70%)
- [VT_TRANS_MIN_TM](../advanced_config/parameter_reference.md#VT_TRANS_MIN_TM): determined (e.g. 10 seconds)
- [VT_F_TR_OL_TM](../advanced_config/parameter_reference.md#VT_F_TR_OL_TM): determined (e.g. 10 seconds)
- [VT_FW_MIN_ALT](../advanced_config/parameter_reference.md#VT_FW_MIN_ALT): 15
27 changes: 10 additions & 17 deletions src/modules/vtol_att_control/standard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,30 +155,23 @@ void Standard::update_transition_state()
_last_time_pusher_transition_update = now;
}

_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
Comment thread
mbjd marked this conversation as resolved.
Resolved
if (_airspeed_trans_blend_margin > 0.0f &&
PX4_ISFINITE(_attc->get_calibrated_airspeed()) &&
_attc->get_calibrated_airspeed() > 0.0f &&
_attc->get_calibrated_airspeed() >= getBlendAirspeed() &&
_time_since_trans_start > getMinimumFrontTransitionTime()) {

mc_weight = 1.0f - fabsf(_attc->get_calibrated_airspeed() - getBlendAirspeed()) /
_airspeed_trans_blend_margin;
// time based blending when no airspeed sensor is set

} else if (!PX4_ISFINITE(_attc->get_calibrated_airspeed())) {
mc_weight = 1.0f - _time_since_trans_start / getMinimumFrontTransitionTime();
mc_weight = math::constrain(2.0f * mc_weight, 0.0f, 1.0f);
float airspeed = _attc->get_calibrated_airspeed();

if (!PX4_ISFINITE(airspeed)) {
// without airspeed feedback assume constant acceleration, reaching the transition airspeed at the open-loop time
airspeed = getTransitionAirspeed() * _time_since_trans_start / getOpenLoopFrontTransitionTime();
Comment thread
mbjd marked this conversation as resolved.
Resolved
}

// blend mc and fw controls between blend and transition airspeed once the minimum transition time has passed
if (_time_since_trans_start > getMinimumFrontTransitionTime()) {
mc_weight = math::interpolate(airspeed, getBlendAirspeed(), getTransitionAirspeed(), 1.f, 0.f);
Comment thread
mbjd marked this conversation as resolved.
Resolved
}

// ramp up FW_PSP_OFF
pitch_body = math::radians(_param_fw_psp_off.get()) * (1.0f - mc_weight);
_v_att_sp->thrust_body[0] = _pusher_throttle;
const Quatf q_sp(Eulerf(roll_body, pitch_body, yaw_body));
q_sp.copyTo(_v_att_sp->q_d);
mc_weight = math::constrain(mc_weight, 0.0f, 1.0f);

} else if (_common_vtol_mode == mode::TRANSITION_TO_MC) {

Expand Down
1 change: 0 additions & 1 deletion src/modules/vtol_att_control/standard.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class Standard : public VtolType

private:
float _pusher_throttle{0.0f};
float _airspeed_trans_blend_margin{0.0f};
hrt_abstime _last_time_pusher_transition_update{0};
float _front_transition_pitch{NAN};

Expand Down
1 change: 1 addition & 0 deletions src/modules/vtol_att_control/vtol_att_control_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ parameters:
short: Airspeed-less front transition time (open loop)
long: |-
The duration of the front transition when there is no airspeed feedback available.
Multicopter control is blended out over the part of this time in which the airspeed would be between VT_ARSP_BLEND and VT_ARSP_TRANS at constant acceleration.

@RomanBapst RomanBapst Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Multicopter control is blended out over the part of this time in which the airspeed would be between VT_ARSP_BLEND and VT_ARSP_TRANS at constant acceleration.
Without airspeed feedback, the airspeed is assumed to increase at a constant rate over this time. Multicopter control is blended out while this assumed airspeed is between VT_ARSP_BLEND and VT_ARSP_TRANS.

When airspeed is used, transition timeout is declared if airspeed does not
reach VT_ARSP_BLEND after this time.
type: float
Expand Down
12 changes: 6 additions & 6 deletions src/modules/vtol_att_control/vtol_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,30 +656,30 @@ float VtolType::getFrontTransitionTimeFactor() const

float VtolType::getMinimumFrontTransitionTime() const
{
return getFrontTransitionTimeFactor() * _param_vt_trans_min_tm.get();
return getFrontTransitionTimeFactor() * math::constrain(_param_vt_trans_min_tm.get(), 0.f, 20.f);
}

float VtolType::getFrontTransitionTimeout() const
{
return getFrontTransitionTimeFactor() * _param_vt_trans_timeout.get();
return getFrontTransitionTimeFactor() * math::constrain(_param_vt_trans_timeout.get(), 0.1f, 30.f);
}

float VtolType::getOpenLoopFrontTransitionTime() const
{
return getFrontTransitionTimeFactor() * _param_vt_f_tr_ol_tm.get();
return getFrontTransitionTimeFactor() * math::constrain(_param_vt_f_tr_ol_tm.get(), 1.f, 30.f);
}
float VtolType::getTransitionAirspeed() const
{
// Since the stall airspeed increases with vehicle weight, we increase the transition airspeed
// by the same factor.
return sqrtf(getWeightRatio()) * _param_vt_arsp_trans.get();
return sqrtf(getWeightRatio()) * math::constrain(_param_vt_arsp_trans.get(), 0.f, 30.f);
}

float VtolType::getFrontTransitionThrottle() const
{
// Thrust needs to scale with weight_ratio to keep the acceleration weight-independent. Assuming
// a quadratic throttle -> thrust map, this requires scaling the throttle by sqrt(weight_ratio).
return math::min(sqrtf(getWeightRatio()) * _param_vt_f_trans_thr.get(), 1.0f);
return math::min(sqrtf(getWeightRatio()) * math::constrain(_param_vt_f_trans_thr.get(), 0.f, 1.f), 1.0f);
}

float VtolType::getWeightRatio() const
Expand All @@ -696,5 +696,5 @@ float VtolType::getWeightRatio() const

float VtolType::getBlendAirspeed() const
{
return _param_vt_arsp_blend.get();
return math::constrain(_param_vt_arsp_blend.get(), 0.f, 30.f);
}
Loading