mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
some small fixes to airspeed compensation in Stabilization
This commit is contained in:
parent
2ecbf4a846
commit
4f6c3c98e3
@ -194,9 +194,9 @@ static void stabilizationTask(__attribute__((unused)) void *parameters)
|
||||
#ifdef REVOLUTION
|
||||
float speedScaleFactor;
|
||||
// Scale PID coefficients based on current airspeed estimation - needed for fixed wing planes
|
||||
if (settings.ScaleToAirspeed < 0.1f) {
|
||||
AirspeedStateGet(&airspeedState);
|
||||
if (settings.ScaleToAirspeed < 0.1f || airspeedState.CalibratedAirspeed<0.1f) {
|
||||
// feature has been turned off
|
||||
AirspeedStateGet(&airspeedState);
|
||||
speedScaleFactor = 1.0f;
|
||||
} else {
|
||||
// scale the factor to be 1.0 at the specified airspeed (for example 10m/s) but scaled by 1/speed^2
|
||||
|
Loading…
x
Reference in New Issue
Block a user