mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-07 09:00:34 +08:00
FW Position control: add option to scale min airspeed wtih wind magnitude
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -438,6 +438,12 @@ FixedwingPositionControl::get_auto_airspeed_setpoint(const float control_interva
|
||||
MAX_WEIGHT_RATIO);
|
||||
}
|
||||
|
||||
// Adapt min airspeed setpoint based on wind estimate for more stability in higher winds.
|
||||
if (_airspeed_valid && _wind_valid && _param_fw_wind_arsp_sc.get() > FLT_EPSILON) {
|
||||
calibrated_min_airspeed = math::min(calibrated_min_airspeed + _param_fw_wind_arsp_sc.get() * _wind_vel.length(),
|
||||
_param_fw_airspd_max.get());
|
||||
}
|
||||
|
||||
// Stall speed increases with the square root of the load factor times the weight ratio
|
||||
// Vs ~ sqrt(load_factor * weight_ratio)
|
||||
calibrated_min_airspeed = constrain(_param_fw_airspd_stall.get() * sqrtf(load_factor * weight_ratio),
|
||||
|
||||
Reference in New Issue
Block a user