AxisInterpolator
@objc(GSAxisInterpolator)
public enum AxisInterpolator : Int
An interpolator applied on an axis.
An interpolator transforms the physical axis position (which varies in a linear scale from -100 when the axis is at start of its course, to 100 when the axis is at end of its course) by applying a predefined formula. The transformed value still varies in a [-100, 100] range, but the scale might not be linear, depending on the applied interpolator.
The interpolation formula applies before any axis event is sent either to the connected drone (in case the axis is not grabbed by the application) or to the application (when the axis is grabbed).
-
Physical linear axis position is not modified.
Declaration
Swift
case linear
-
A light exponential transform is applied to the axis physical position.
Formula (where x is the physical axis position in linear [-100, 100] range):
for x in [-100, 0[ : -100 * e^((x + 100) / x) for x = 0 : 0 for x in ]0, 100] : 100 * e^((x - 100) / x)
Declaration
Swift
case lightExponential
-
A medium exponential transform is applied to the axis physical position.
Formula (where x is the physical axis position in linear [-100, 100] range):
for x in [-100, 0[ : x * e^((x + 100) / x) for x = 0 : 0 for x in ]0, 100] : x * e^((x - 100) / x)
Declaration
Swift
case mediumExponential
-
A strong exponential transform is applied to the axis physical position.
Formula (where x is the physical axis position in linear [-100, 100] range):
for x in [-100, 0[ : -(x^2 / 100) * e^((x + 100) / x) for x = 0 : 0 for x in ]0, 100] : (x^2 / 100) * e^((x - 100) / x)
Declaration
Swift
case strongExponential
-
A very strong exponential transform is applied to the axis physical position.
Formula (where x is the physical axis position in linear [-100, 100] range):
for x in [-100, 0[ : -(x^3 / 10000) * e^((x + 100) / x) for x = 0 : 0 for x in ]0, 100] : (x^3 / 10000) * e^((x - 100) / x)
Declaration
Swift
case strongestExponential