The Signal Mapper, Alarm Manager and others share a library of transforms. These transforms, which may be chained with a '|' (the UNIX pipe symbol), together perform configurable transformations or filtering of input signals. Some transforms take additional parameters. Parameters should be specified as a comma-separated list inside of parentheses immediately following the transform name, e.g GAIN(5). Many filters feature channel:signal pairs as parameters. A channel:signal pair is a string consisting of an LCM channel followed by a ':' followed by a signal that is published on that channel. Signals may be 'analogs' whose values are double precision floating point numbers, 'digitals', whose values are booleans, or 'strings' whose values are strings. Many transforms drop their input messages if certain conditions are not met, or if they receive an input of the incorrect type.
The following table describing the transforms available, their parameters, and a brief description of their purpose and operation.
Filter Name | Parameters | Description |
AND |
Comma-separated list of digital channel:signal pairs (optionally prepended with '!' for logical inversion). |
Outputs a digital with the value of the logical AND of the input signal and all of the parameter signals. |
OR |
Comma-separated list of digital channel:signal pairs (optionally prepended with '!' for logical inversion). |
Outputs a digital with the value of the logical OR of the input signal and all of the parameter signals. |
ANY |
Comma-separated list of digital channel:signal pairs (optionally prepended with '!' for logical inversion). |
Drops the input signal unless one of the parameter signals is true. |
ALL |
Comma-separated list of digital channel:signal pairs (optionally prepended with '!' for logical inversion). |
Drops the input signal unless all of the parameter signals are true. |
BIAS |
Scalar value or analog channel:signal pair. |
Adds the scalar or the value of the analog channel:signal to the input value. If the input is digital it is converted to analog with the argument bias. |
CONCAT |
String or channel:signal containing a string. |
Append fixed string or value of string channel:signal to the input string. Drops non-string inputs. |
DELAY_EQUALS |
First parameter is the comparison value, second is the delay period in seconds. |
The comparison may be a fixed scalar, 'true' or 'false', a string or a channel:signal. The message is dropped unless the input value matches the type and value of the comparison for greater than delay seconds. |
DELAY_GREATER |
First parameter is the comparison value, second is the delay period in seconds. |
The comparison may be a fixed scalar or an analog channel:signal. The message is dropped unless the input value is analog and is greater than the comparison for greater than delay seconds. Drops non-analog inputs. |
DELAY_LESSER |
First parameter is the comparison value, second is the delay period in seconds. |
The comparison may be a fixed scalar or an analog channel:signal. The message is dropped unless the input value is analog and is less than the comparison for greater than delay seconds. Drops non-analog inputs. |
DUAL_LINEAR |
The parameters, in order, are - input minimum - deadband low - deadband high - input maximum - output min - output null - output max |
Provides complete functionality for a bi-directional proportional control with dead-bands. Often used to transform an analog input to a percent deflection output. Input values are clamped to [input_minimum,input_maximum]. If they fall within [deadband low, deadband high] then output null is returned, otherwise they are transformed from either [input minimum, deadband low) to [output min, output null) or (deadband high, input maximum] to (output null, output max]. Drops non-analog inputs. |
EQUALS |
First parameter is the comparison value, second is the delay period in seconds. |
Same behavior as DELAY_EQUALS without a delay. |
FALSE | None. |
Converts any input to a digital with value false. |
TRUE | None. |
Converts any input to a digital with value true. |
GAIN |
Scalar value or channel:signal. |
Multiply a scalar or the value of an external analog channel:signal by the input value. |
GREATER | First parameter is the comparison value, seconds is the delay period in seconds. |
Same behavior as DELAY_GREATER without a delay. |
IGNORE |
None. |
Used to temporarily disable a transform. |
INCREMENT | Scalar representing the maximum counter value. |
Used to encapsulate a wrapping counter to provide a monotonically increasing output number. Drops non-analog inputs. |
INVERT |
None. |
Inverts digital inputs or the sign of analog inputs. Drops all others. |
LESSER |
First parameter is the comparison value, second is the delay period in seconds. |
Same behavior as DELAY_LESSER without a delay. |
LINEAR |
First parameter is gain (m), the second parameter is bias (b). The parameters 'm' and 'b' may presented as scalar values or analog channel:signal strings. |
Performs a linear transformation of analog input values where output = input * m + b. |
LOCK |
A single digital channel:signal. |
When the parameter signal becomes true it will 'lock' the output value to last input value up to that point. This transform is often used to provide joystick locking functionality. |
MIX |
Comma-separated list of analog channel:signals. |
Output the largest absolute value of the analog input signal and parameter signals. Drops non-analog inputs. This transform is often used to combine multiple inputs to single control output; E.G. pilot and copilot pan & tilt joysticks. |
ON_CHANGE | None. |
Passes the input once each time a signal value changes. |
FALSE_EDGE | None. |
Passes the input once each time a digital input changes from true to false. Drops non-digital inputs. |
TRUE_EDGE | None. |
Passes the input once each time a digital input changes from true to false. Drops non-digital inputs. |
POLAR_DIFF |
A single scalar or analog channel:signal parameter whose value is in degrees. |
Outputs the signed shortest distance in degrees from the input value, also understood to be in degrees, to the value of the parameter. As the bearing values are normalized the distance will never be greater than 180. Drops non-analog values. |
PREPEND |
A string or a string channel:signal pair. |
Prepend the fixed string or value of string channel:signal to the input string. Drops non-string inputs. |
TOGGLE |
A single digital channel:signal pair. |
Outputs the opposite of the last value of its parameter channel:signal. Drops non-digital inputs. |
TRIG_ACOS | None. |
Outputs the arc-cosine of the input. Drops non-analog values. |
TRIG_ASIN | None. |
Outputs the arc-sine of the input. Drops non-analog values. |
TRIG_COS | None. |
Outputs the cosine of the input. Drops non-analog values. |
TRIG_SIN | None. |
Outputs the sine of the input. Drops non-analog values. |
TRIG_TAN | None. |
Outputs the tangent of the input. Drops non-analog values. |
WINDOWED_CV |
The size of the window as a scalar or an analog channel:signal. |
Outputs the coefficient of variation of the input over the samples in the window. Drops non-analog values. |
WINDOWED_MAX |
The size of the window as a scalar or an analog channel:signal. |
Outputs the maximum input value over the samples in the window. Drops non-analog values. |
WINDOWED_MEAN |
The size of the window as a scalar or an analog channel:signal. |
Outputs the mean of the input values over the samples in the window. Drops non-analog values. |
WINDOWED_MIN |
The size of the window as a scalar or an analog channel:signal. |
Outputs the minimum input value over the samples in the window. Drops non-analog values. |
WINDOWED_STD |
The size of the window as a scalar or an analog channel:signal |
Outputs the standard deviation of the input values over the samples in the window. Drops non-analog values. |
WINDOWED_VAR |
The size of the window as a scalar or an analog channel:signal. |
Outputs the variance of the input values over the samples in the window. Drops non-analog values. |
BOUNDS |
Two scalar values, min and max. |
Provides value bounds defined by minimum and maximum limits. |
RATE_OF_CHANGE |
An optional channel:signal pair representing containing the value to calculate the rate of change over. |
Performs a calculation for rate of change and returns that value. |
WINDOWED_SNR |
The size of the window as a scalar or an analog channel:signal |
Calculate and return the signal to noise ratio |