DeadBand and Rate Limiter:
Implementation of a linear mapping of an input x to an output y
with the input x between xmin and xmax and output y between 0 and 100%
on both sides of the center position of the input
xmin and xmax adjustable in-flight by any control source
y = sign(x)* minimum(xmax, maximum(xmin, ( (abs(x)-xmin) * 100%/(xmax-xmin) ) )
To be used to create a dead band (zero output y) for any input abs(x) smaller than xmin
and limit the output y to 100% for any input abs(x) greater then xmax
and have a linear interpolation between these two endpoints (xmin,0) and (xmax,100)
Source x to be provided in the script setup: i.e. snapflap -> choose stick ele (raw) or input ele
Source to be provided to supply xmin: to allow in flight adaptation through i.e. slider S1.
Source to be provided to supply xmax: to allow in flight adaptation through i.e. slider S2.
Value xminv will override the xmin source value: set to -1 to disable value override.
Value xmaxv will override the xmax source value: set to -1 to disable value override.
Output y is provided as output
To check the correct function and settings:
Source x is provided as output
xmin is provided as output
xmax is provided as output
- Download: Previous versions
DBLIM.lua 2.68 Kb 1406
Filename Version File size Changes DBLIM.lua 1.0
- Firmware compatibility: 2.0,2.1,2.2,2.3
- Device Compatibility: Taranis X-Lite,Taranis X7(S),Taranis X9D(+),Taranis X9E,Horus X10(S),Horus X12,Other
- Author: l Shems
- E-mail or Website: www.justfly.solutions
- License: GPL