From a420e23a5e31b8f004f3d5d9316e7e7da9bea63e Mon Sep 17 00:00:00 2001 From: Balduin Date: Tue, 24 Nov 2026 14:52:19 +0100 Subject: [PATCH] fix(vtol_att_control): scale the blend airspeed with weight like the transition airspeed Only VT_ARSP_TRANS was scaled by sqrt(weight ratio), so at higher weight the blend started at a smaller fraction of the transition airspeed, and the airspeed-less schedule derived from their ratio started earlier. Scale VT_ARSP_BLEND the same way. Tailsitters compared against the unscaled VT_ARSP_TRANS; use the scaled value too. Describe both as calibrated airspeeds. Setting VT_ARSP_BLEND to 0 never disabled blending, it blends from zero airspeed; setting it equal to VT_ARSP_TRANS does disable it. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Balduin --- docs/en/config_vtol/vtol_quad_configuration.md | 6 ++++-- src/modules/vtol_att_control/tailsitter.cpp | 2 +- src/modules/vtol_att_control/vtol_att_control_params.yaml | 5 ++--- src/modules/vtol_att_control/vtol_type.cpp | 3 ++- src/modules/vtol_att_control/vtol_type.h | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/en/config_vtol/vtol_quad_configuration.md b/docs/en/config_vtol/vtol_quad_configuration.md index 571ec7dfb23..079f43ebd7f 100644 --- a/docs/en/config_vtol/vtol_quad_configuration.md +++ b/docs/en/config_vtol/vtol_quad_configuration.md @@ -72,14 +72,16 @@ Note that once the ramp up period ends throttle will be at its target setting an Parameter: [VT_ARSP_BLEND](../advanced_config/parameter_reference.md#VT_ARSP_BLEND) By default, as the airspeed gets close to the transition speed, multirotor attitude control will be reduced and fixed-wing control will start increasing continuously until the transition occurs. +The value is a calibrated airspeed and is scaled by the square root of the weight ratio (`WEIGHT_GROSS` / `WEIGHT_BASE`), like the transition airspeed. -Disable blending by setting this parameter to 0 which will keep full multirotor control and zero fixed-wing control until the transition occurs. +Disable blending by setting this parameter equal to the transition airspeed, which will keep full multirotor control and zero fixed-wing control until the transition occurs. #### Transition Airspeed Parameter: [VT_ARSP_TRANS](../advanced_config/parameter_reference.md#VT_ARSP_TRANS) -This is the airspeed which, when reached, will trigger the transition out of multirotor mode into fixed-wing mode. +This is the calibrated airspeed which, when reached, will trigger the transition out of multirotor mode into fixed-wing mode. +It is scaled by the square root of the weight ratio (`WEIGHT_GROSS` / `WEIGHT_BASE`). It is critical that you have properly calibrated your airspeed sensor. It is also important that you pick an airspeed that is comfortably above your airframes stall speed (check `FW_AIRSPD_MIN`) as this is currently not checked. diff --git a/src/modules/vtol_att_control/tailsitter.cpp b/src/modules/vtol_att_control/tailsitter.cpp index 280c2ecd874..851ab2d4d76 100644 --- a/src/modules/vtol_att_control/tailsitter.cpp +++ b/src/modules/vtol_att_control/tailsitter.cpp @@ -306,7 +306,7 @@ bool Tailsitter::isFrontTransitionCompleted() if (pitch <= PITCH_THRESHOLD_AUTO_TRANSITION_TO_FW) { if (airspeed_triggers_transition) { - transition_to_fw = _attc->get_calibrated_airspeed() >= _param_vt_arsp_trans.get() ; + transition_to_fw = _attc->get_calibrated_airspeed() >= getTransitionAirspeed(); } else { transition_to_fw = true; diff --git a/src/modules/vtol_att_control/vtol_att_control_params.yaml b/src/modules/vtol_att_control/vtol_att_control_params.yaml index 770e8a993eb..b11c6202156 100644 --- a/src/modules/vtol_att_control/vtol_att_control_params.yaml +++ b/src/modules/vtol_att_control/vtol_att_control_params.yaml @@ -70,8 +70,7 @@ parameters: VT_ARSP_BLEND: description: short: Transition blending airspeed - long: Airspeed at which we can start blending both fw and mc controls. Set - to 0 to disable. + long: Calibrated airspeed at which multicopter control starts to be blended out during the front transition. Scaled by the square root of the weight ratio (WEIGHT_GROSS / WEIGHT_BASE). Set equal to VT_ARSP_TRANS to disable. type: float default: 8.0 unit: m/s @@ -82,7 +81,7 @@ parameters: VT_ARSP_TRANS: description: short: Transition airspeed - long: Airspeed at which we can switch to fw mode + long: Calibrated airspeed at which the front transition can complete. Scaled by the square root of the weight ratio (WEIGHT_GROSS / WEIGHT_BASE). type: float default: 10.0 unit: m/s diff --git a/src/modules/vtol_att_control/vtol_type.cpp b/src/modules/vtol_att_control/vtol_type.cpp index b8e48a7ba43..792faa629ce 100644 --- a/src/modules/vtol_att_control/vtol_type.cpp +++ b/src/modules/vtol_att_control/vtol_type.cpp @@ -709,5 +709,6 @@ float VtolType::getWeightRatio() const float VtolType::getBlendAirspeed() const { - return _param_vt_arsp_blend.get(); + // scaled like the transition airspeed to keep the blending range at the same fraction of it + return sqrtf(getWeightRatio()) * _param_vt_arsp_blend.get(); } diff --git a/src/modules/vtol_att_control/vtol_type.h b/src/modules/vtol_att_control/vtol_type.h index a0ded5bcdcf..cb59796b993 100644 --- a/src/modules/vtol_att_control/vtol_type.h +++ b/src/modules/vtol_att_control/vtol_type.h @@ -247,13 +247,13 @@ public: /** * - * @return The calibrated blending airspeed [m/s] + * @return The calibrated blending airspeed scaled for vehicle weight [m/s] */ float getBlendAirspeed() const; /** * - * @return The calibrated transition airspeed [m/s] + * @return The calibrated transition airspeed scaled for vehicle weight [m/s] */ float getTransitionAirspeed() const;