mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-21 11:54:15 +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
|
#ifdef REVOLUTION
|
||||||
float speedScaleFactor;
|
float speedScaleFactor;
|
||||||
// Scale PID coefficients based on current airspeed estimation - needed for fixed wing planes
|
// 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
|
// feature has been turned off
|
||||||
AirspeedStateGet(&airspeedState);
|
|
||||||
speedScaleFactor = 1.0f;
|
speedScaleFactor = 1.0f;
|
||||||
} else {
|
} else {
|
||||||
// scale the factor to be 1.0 at the specified airspeed (for example 10m/s) but scaled by 1/speed^2
|
// 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