diff --git a/flight/modules/ManualControl/stabilizedhandler.c b/flight/modules/ManualControl/stabilizedhandler.c index 8cb6d3156..ab28b6312 100644 --- a/flight/modules/ManualControl/stabilizedhandler.c +++ b/flight/modules/ManualControl/stabilizedhandler.c @@ -51,14 +51,14 @@ static float sinAngle = 0.0f; static float applyExpo(float value, float expo) { // note: fastPow makes a small error, therefore result needs to be bound - float exp = boundf(fastPow(1.00695f, expo), 0.5f, 2.0f); + float exp = boundf(fastPow(1.01395948f, expo), 0.25f, 4.0f); // magic number scales expo // so that // expo=100 yields value**10 // expo=0 yields value**1 // expo=-100 yields value**(1/10) - // (pow(2.0,1/100)~=1.00695) + // (pow(4.0,1/100)~=1.01395948) if (value > 0.0f) { return boundf(fastPow(value, exp), 0.0f, 1.0f); } else if (value < -0.0f) { diff --git a/ground/gcs/src/plugins/config/configstabilizationwidget.h b/ground/gcs/src/plugins/config/configstabilizationwidget.h index 529a81a0b..7c18d8b4d 100644 --- a/ground/gcs/src/plugins/config/configstabilizationwidget.h +++ b/ground/gcs/src/plugins/config/configstabilizationwidget.h @@ -63,7 +63,7 @@ private: static const int AUTOMATIC_UPDATE_RATE = 500; static const int EXPO_CURVE_POINTS_COUNT = 100; - constexpr static const double EXPO_CURVE_CONSTANT = 1.00695; + constexpr static const double EXPO_CURVE_CONSTANT = 1.01395948; int boardModel; int m_stabSettingsBankCount;