With the speed scaler (scalar…?) in Attitude.cpp, it is limited to a calculated max and min threshold with the following code:
// ensure we have scaling over the full configured airspeed
float scale_min = MIN(0.5, (0.5 * aparm.airspeed_min) / g.scaling_speed);
float scale_max = MAX(2.0, (1.5 * aparm.airspeed_max) / g.scaling_speed);
speed_scaler = constrain_float(speed_scaler, scale_min, scale_max);
Given that speed scaler/ar is calculated by:
speed_scaler = g.scaling_speed / aspeed;
should not the max and min values be calculated the same way? i.e.:
float scale_min = MIN(0.5, (g.scaling_speed / (1.5 * aparm.airspeed_max)));
float scale_max = MAX(2.0, (g.scaling_speed / (0.5 * aparm.airspeed_min)));
Also, given that one can fly a quadplane in hover mode in FBWA mode (for example), shouldn’t we also have an assisted_flight test for this code along side the vtol mode test?:
if (quadplane.in_vtol_mode() && hal.util->get_soft_armed()) {
// when in VTOL modes limit surface movement at low speed to prevent instability
Just asking for a friend…