KPI Expressions
This sections explains the syntax, and available functions for the KPI expressions. This language is similar in concept to the Math Expressions but has some differences in behaviour and functions available due to the different applications of the language (operating on time series data versus the structured parameters that the Math Expressions are used to interact with).
When writing a math expression there will be an auto complete functionality that can help to find channel and function names.
Syntax
When writing a KPI expression, math channels, constants, data channels and custom expressions from the current Data Analysis Profile can be accessed and functions can be called to perform operations. Basic numerical operators are available.
Operators
The following numerical operators are available:
+addition-subtraction*multiplication/division
The following boolean operators are available:
<less than<=less than or equal<greater than<=greater than or equal&&and||or==equal!=not equal
Unit Management
Whenever a data channel is accessed, a unit conversion can be performed to change the returned unit. The base unit of the data channel is defined by the data file that is read. This is done using square brackets, for example xDamperFL["mm"]. A list of all available dimensions and units can be found in the units documentation.
Function Reference
This section lists all functions that are available to be used in math expressions. Note that some functions return a vector and therefore cannot be used directly as KPI results, as the KPI results must be a scalar value. Functions that return scalar values and can be used as KPI results are highlighted in blue text.
Abs
| Abs(DoubleChannel) | Returns a channel containing the absolute value for each point of the input. |
| Abs(DoubleChannel[]) | Returns an array of channels containing the absolute value for each data point. |
| Abs(double) | Returns the absolute value of the input. |
Abs(DoubleChannel vector)
Returns a channel containing the absolute value for each point of the input.
Parameters
DoubleChannelvector A channel to take the absolute values of.Returns
DoubleChannelA channel of positive decimals.Examples
Abs(Steering) = {0,0,0,15,17,20,12,0,0,0...}
Abs(DoubleChannel[] vectors)
Returns an array of channels containing the absolute value for each data point.
Parameters
DoubleChannel[]vectors An array of channel to take the absolute values of.Returns
DoubleChannel[]An array of channels containing only positive decimals.
Abs(double value)
Returns the absolute value of the input.
Parameters
doublevalue An array of positive decimals.Returns
doubleA positive decimal.Examples
Abs(-3) = 3
ACos
| ACos(DoubleChannel) | Returns a channel containing the arccosine of all the items in the original channel. |
| ACos(DoubleChannel[]) | Returns an array of channels containing the arccosine of all the items in the original channels. |
| ACos(double) | Returns the angle whose cosine is the specified value. |
ACos(DoubleChannel vector)
Returns a channel containing the arccosine of all the items in the original channel.
Parameters
DoubleChannelvector A channel of numbers with values greater than or equal to -1, but less than or equal to 1.Returns
DoubleChannelA channel of angles, measured in radians, such that each value θ obeys 0 ≤ θ ≤ π.Examples
ACos(Steering)
ACos(DoubleChannel[] vectors)
Returns an array of channels containing the arccosine of all the items in the original channels.
Parameters
DoubleChannel[]vectors An array of channels with values greater than or equal to -1, but less than or equal to 1.Returns
DoubleChannel[]A list of channels containing values measured in radians, such that each value θ obeys 0 ≤ θ ≤ π.
ACos(double value)
Returns the angle whose cosine is the specified value.
Parameters
doublevalue A number representing a cosine, must be greater than or equal to -1, but less than or equal to 1.Returns
doubleReturns the angle whose cosine is the specified number.Examples
ACos(1)=0
ASin
| ASin(DoubleChannel) | Returns a channel containing the arcsine of all the items in the original channel. |
| ASin(DoubleChannel[]) | Returns an array of channels containing the arcsine of all the items in the original channels. |
| ASin(double) | Returns the angle whose sine is the specified number. |
ASin(DoubleChannel vector)
Returns a channel containing the arcsine of all the items in the original channel.
Parameters
DoubleChannelvector A channel of numbers with values greater than or equal to -1, but less than or equal to 1.Returns
DoubleChannelA channel of angles, measured in radians, such that each value θ obeys -π/2 ≤ θ ≤ π/2.Examples
ASin(Steering)
ASin(DoubleChannel[] vectors)
Returns an array of channels containing the arcsine of all the items in the original channels.
Parameters
DoubleChannel[]vectors An array of channels with values greater than or equal to -1, but less than or equal to 1.Returns
DoubleChannel[]A list of channels containing values measured in radians, such that each value θ obeys -π/2 ≤ θ ≤ π/2.
ASin(double value)
Returns the angle whose sine is the specified number.
Parameters
doublevalue A number representing a sine, must be greater than or equal to -1, but less than or equal to 1.Returns
doubleAn angle, θ, measured in radians, such that -π/2 ≤ θ ≤ π/2.Examples
ASin(0)=0
ATan
| ATan(DoubleChannel) | Returns a channel containing the arctangent of all the items in the original channel. |
| ATan(DoubleChannel[]) | Returns an array of channels containing the arctangent of all the items in the original channels. |
| ATan(double) | Returns the angle whose tangent is the specified number. |
ATan(DoubleChannel vector)
Returns a channel containing the arctangent of all the items in the original channel.
Parameters
DoubleChannelvector A channel of numbers.Returns
DoubleChannelA channel of angles, measured in radians, such that each value θ obeys -π/2 ≤ θ ≤ π/2.Examples
ATan(Steering)
ATan(DoubleChannel[] vectors)
Returns an array of channels containing the arctangent of all the items in the original channels.
Parameters
DoubleChannel[]vectors An array of channels.Returns
DoubleChannel[]A list of channels containing values measured in radians, such that each value θ obeys -π/2 ≤ θ ≤ π/2.
ATan(double value)
Returns the angle whose tangent is the specified number.
Parameters
doublevalue A number representing a tangent.Returns
doubleAn angle, θ, measured in radians, such that -π/2 ≤ θ ≤ π/2.Examples
ATan(0)=0
AverageAll
| AverageAll(DoubleChannel) | Returns a single value that is the average of all values in the channel. |
| AverageAll(DoubleChannel[]) | Returns a single value that is the average of all values in all channels. |
| AverageAll(double) | Returns the value passed. |
| AverageAll(double[]) | Returns a single value that is the average of all values given. |
AverageAll(DoubleChannel vector)
Returns a single value that is the average of all values in the channel.
Parameters
DoubleChannelvector A channel of numbers.Returns
doubleA scalar decimal representing the average of all values in all channels passed.Examples
AverageAll(vCornerMin)
AverageAll(DoubleChannel[] vectors)
Returns a single value that is the average of all values in all channels.
Parameters
DoubleChannel[]vectors An array of one or more channels.Returns
doubleAn array of numbers
AverageAll(double value)
Returns the value passed.
Parameters
doublevalue A numberReturns
doubleA scalar decimal representing the average of all values passed.
AverageAll(double[] values)
Returns a single value that is the average of all values given.
Parameters
double[]values An array of one or more numbers.Returns
doubleAn array of numbersExamples
AverageAll({ 5, 6, 7, 8 }) = 6.5
Avg
| Avg(DoubleChannel) | Returns the mean value from the entire channel. |
| Avg(DoubleChannel[]) | An array containing the average value of each channel given. |
| Avg(DoubleChannel, DoubleChannel) | Returns a channel containing the avg point by point of two channels. |
| Avg(DoubleChannel[], DoubleChannel[]) | Returns an array of the same length as each input array of channels containing the element-wise average of the two arrays of channels zipped |
| Avg(double, double) | The average value of all values and arrays given. |
| Avg(double[], double[]) | The average value of all values and arrays given. |
Avg(DoubleChannel vector)
Returns the mean value from the entire channel.
Parameters
DoubleChannelvector A double channel.Returns
doubleThe average value of the input channel.Examples
Avg(FLWheelSpeed) = 175 // Mean value of the FLWheelSpeed over the lap
Avg(DoubleChannel[] vectors)
An array containing the average value of each channel given.
Parameters
DoubleChannel[]vectors An array of channels.Returns
double[]An array containing the average value of each channel given.Examples
Avg({ FLWheelSpeed, FRWheelSpeed }) = { 175, 176 } // The mean value of each front wheel speed over the lap
Avg(DoubleChannel vector, DoubleChannel vector1)
Returns a channel containing the avg point by point of two channels.
Parameters
DoubleChannelvector A double channel.
DoubleChannelvector1 A double channel.Returns
DoubleChannelA channel of the element-wise average of the two input channels.Examples
Avg(FLWheelSpeed, FRWheelSpeed) // Returns a channel with the average front wheel speed
Avg(DoubleChannel[] vectors, DoubleChannel[] vectors1)
Returns an array of the same length as each input array of channels containing the element-wise average of the two arrays of channels zipped
Parameters
DoubleChannel[]vectors An array of channels.
DoubleChannel[]vectors1 An array of channels of the same length as the first parameter.Returns
DoubleChannel[]An array of the same length as each input array of channels.Examples
Avg({ FLWheelSpeed, RLWheelSpeed }, { FRWheelSpeed, RRWheelSpeed }) // Returns { AvgFrontWheelSpeed, AvgRearWheelSpeed }
Avg(double value, double value1)
The average value of all values and arrays given.
Parameters
doublevalue A number
doublevalue1 A numberReturns
doubleThe average value of all values and arrays given.Examples
Avg(5,6) = 5.5
Avg(double[] values, double[] values1)
The average value of all values and arrays given.
Parameters
double[]values An array of numbers
double[]values1 An array of numbersReturns
doubleA number
AvgChannel
| AvgChannel(DoubleChannel) | Returns a channel populated with the average value from the channel. |
| AvgChannel(DoubleChannel[]) | Returns an array of channels populated with the average values from the channels. |
| AvgChannel(DoubleChannel, BooleanChannel) | Returns a channel populated with the average value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed. |
| AvgChannel(DoubleChannel[], BooleanChannel[]) | Returns an array of channels populated with the average values from the channels, the condition parameter allows a boolean channel to be used to control when the calculation is performed. |
| AvgChannel(DoubleChannel, BooleanChannel, BooleanChannel) | Returns a channel populated with the average value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation. |
| AvgChannel(DoubleChannel[], BooleanChannel[], BooleanChannel[]) | Returns an array of channels populated with the average values from the channels, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation. |
AvgChannel(DoubleChannel input)
Returns a channel populated with the average value from the channel.
Parameters
DoubleChannelinput A double channel.Returns
DoubleChannelA channel populated with the average value from the channel.Examples
AvgChannel(vGps)
AvgChannel(DoubleChannel[] inputs)
Returns an array of channels populated with the average values from the channels.
Parameters
DoubleChannel[]inputs An array of channels.Returns
DoubleChannel[]An array of channels of the same length as input.
AvgChannel(DoubleChannel input, BooleanChannel condition)
Returns a channel populated with the average value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed.
Parameters
DoubleChannelinput A double channel.
BooleanChannelcondition The channel that determines what values should be considered from input.Returns
DoubleChannelA channel populated with the average value from the channel.Examples
AvgChannel(vGps, HighSpeedCornerGate)
AvgChannel(DoubleChannel[] inputs, BooleanChannel[] conditions)
Returns an array of channels populated with the average values from the channels, the condition parameter allows a boolean channel to be used to control when the calculation is performed.
Parameters
DoubleChannel[]inputs An array of channels.
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.Returns
DoubleChannel[]An array of channels of the same length as input.
AvgChannel(DoubleChannel input, BooleanChannel condition, BooleanChannel reset)
Returns a channel populated with the average value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation.
Parameters
DoubleChannelinput A double channel.
BooleanChannelcondition The channel that determines what values should be considered from input.
BooleanChannelreset A boolean channel that when a true value is encountered, resets the computation.Returns
DoubleChannelA channel populated with the average value from the channel.Examples
AvgChannel(vGps, HighSpeedCornerGate, StartEndHighSpeedCornerGate)
AvgChannel(DoubleChannel[] inputs, BooleanChannel[] conditions, BooleanChannel[] resets)
Returns an array of channels populated with the average values from the channels, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation.
Parameters
DoubleChannel[]inputs An array of channels.
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.
BooleanChannel[]resets An array of boolean channels that, when a true value is encountered, resets the computation.Returns
DoubleChannel[]An array of channels of the same length as input.
BitDecode
| BitDecode(DoubleChannel, double) | Extracts the value of a certain bit defined by zero-based shift from each value in the input channel and returns the new channel of bits. |
| BitDecode(DoubleChannel[], double) | Extracts the value of a certain bit defined by zero-based shift from each value in each input channel and returns an array of channels of the same length as the input. |
| BitDecode(double, double) | Extracts the value of a certain bit defined by zero-based shift |
| BitDecode(DoubleChannel, double, double) | Extracts the value of certains bits defined by zero-based shift and length |
| BitDecode(DoubleChannel[], double, double) | Extracts the value of certains bits defined by zero-based shift and length |
| BitDecode(double, double, double) | Extracts the value of certains bits defined by zero-based shift and length |
BitDecode(DoubleChannel vector, double shift)
Extracts the value of a certain bit defined by zero-based shift from each value in the input channel and returns the new channel of bits.
Parameters
DoubleChannelvector A channel
doubleshift The number of bits to shift the input by.Returns
DoubleChannelA channel consisting of values of 0 and 1.Examples
BitDecode(SwitchPanelButtonStates, 2) -> extracts bit 2 (from the right) of the channel SwitchPanelButtonStates
BitDecode(DoubleChannel[] vectors, double shift)
Extracts the value of a certain bit defined by zero-based shift from each value in each input channel and returns an array of channels of the same length as the input.
Parameters
DoubleChannel[]vectors An array of channels
doubleshift The number of bits to shift the input by.Returns
DoubleChannel[]An array of channels consisting of values of 0 and 1.
BitDecode(double value, double shift)
Extracts the value of a certain bit defined by zero-based shift
Parameters
doublevalue The base value.
doubleshift The zero-based index of the bit to extract.Returns
doubleThe value of a specific bit defined by shiftExamples
BitDecode(57, 2) = 0 // (binary representation of 57 is 00111001 and the bit 2 (from the right) is 0)
BitDecode(DoubleChannel vector, double shift, double length)
Extracts the value of certains bits defined by zero-based shift and length
Parameters
DoubleChannelvector The the channel to take from.
doubleshift The zero-based index of the first bit to take
doublelength The number of bits to take from the right.Returns
DoubleChannelA channel of the selected bits from the input channel.Examples
BitDecode(SwitchPanelButtonStates, 2, 2) -> extracts the value of bits 2 + 3 (from the right) of the channel SwitchPanelButtonStates
BitDecode(DoubleChannel[] vectors, double shift, double length)
Extracts the value of certains bits defined by zero-based shift and length
Parameters
DoubleChannel[]vectors An array of channels to take from.
doubleshift The zero-based index of the first bit to take
doublelength The number of bits to take from the right.Returns
DoubleChannel[]An array of channels containing the selected bits from the input channels.
BitDecode(double value, double value1, double length)
Extracts the value of certains bits defined by zero-based shift and length
Parameters
doublevalue A double.
doublevalue1 The zero-indexed first bit to take.
doublelength The number of bits to take, from the right.Returns
doubleA base 10 decimal representation of the bits extracted from the input number.Examples
BitDecode(57, 2, 2) = 2 // (binary representation of 57 is 00111001 and the bits 2+3 (from the right) are 1 and 0. Binary 10 results in decimal 2)
Ceiling
| Ceiling(DoubleChannel) | Returns a channel containing each value in the input mapped to the smallest integer value that is greater than or equal to it. |
| Ceiling(DoubleChannel[]) | Returns an array of channels containing each value in the input mapped to the smallest integer value that is greater than or equal to it. |
| Ceiling(double) | Returns the smallest integer value that is greater than or equal to the specified double-precision floating-point number. |
Ceiling(DoubleChannel vector)
Returns a channel containing each value in the input mapped to the smallest integer value that is greater than or equal to it.
Parameters
DoubleChannelvector A channelReturns
DoubleChannelA channel of integers.Examples
Ceiling(rpm / 2) -> each value divided by 2 rounded up to the nearest integer in the rpm channel
Ceiling(DoubleChannel[] vectors)
Returns an array of channels containing each value in the input mapped to the smallest integer value that is greater than or equal to it.
Parameters
DoubleChannel[]vectors An array of channelsReturns
DoubleChannel[]An array of integer channels.
Ceiling(double value)
Returns the smallest integer value that is greater than or equal to the specified double-precision floating-point number.
Parameters
doublevalue A doubleReturns
doubleThe largest integer value less than or equal to the specified number.Examples
Ceiling(3 / 2) = 2
Change
| Change(DoubleChannel) | Returns the difference between the last value of the channel and the start value of a channel. |
| Change(DoubleChannel[]) | Returns the difference between the last value of the channel and the start value of a channel for each channel in the input. |
Change(DoubleChannel vector)
Returns the difference between the last value of the channel and the start value of a channel.
Parameters
DoubleChannelvector A channel.Returns
doubleA channel of the same length as the input.Examples
Change(FuelLevel)
Change(DoubleChannel[] vectors)
Returns the difference between the last value of the channel and the start value of a channel for each channel in the input.
Parameters
DoubleChannel[]vectors An array of channels containing numerical dataReturns
double[]An array of channels of the same length as the input.Examples
Change({ FuelLevel, OilTemp })
Choose
| Choose(bool, object, object) | Returns a channel with trueResult if the condition is true, otherwise returns falseResult. |
Choose(bool condition, object trueResult, object falseResult)
Returns a channel with trueResult if the condition is true, otherwise returns falseResult.
Parameters
boolcondition A boolean condition to evaluate.
objecttrueResult The value to return if condition evalutes to true.
objectfalseResult The value to return if condition evalutes to false.Returns
objectEither trueResult or falseResult.Examples
Choose(BrakePressure > 5,BrakePressure, Invalid())
Cos
| Cos(DoubleChannel) | Returns a channel containing the cosine of all the items in the original channel. |
| Cos(DoubleChannel[]) | Returns an array of channels containing the cosine of all the items in the original channels. |
| Cos(double) | Returns the cosine of the value. |
Cos(DoubleChannel vector)
Returns a channel containing the cosine of all the items in the original channel.
Parameters
DoubleChannelvector The channel to take the cosine of.Returns
DoubleChannelA channel containing the cosine of each individual value.Examples
Cos(Steering)
Cos(DoubleChannel[] vectors)
Returns an array of channels containing the cosine of all the items in the original channels.
Parameters
DoubleChannel[]vectors An array of channels containing numerical dataReturns
DoubleChannel[]An array of channels of the same dimension as the input.
Cos(double value)
Returns the cosine of the value.
Parameters
doublevalue The number to take the cosine of.Returns
doubleThe cosine.Examples
Cos(0)=1
Count
| Count(DoubleChannel) | Returns the number of points in the channel. |
| Count(DoubleChannel[]) | Returns an array containing the number of points in each channel given. |
| Count(BooleanChannel) | Returns the number of points in the channel. |
| Count(BooleanChannel[]) | Returns an array containing the number of points in each channel given. |
Count(DoubleChannel vector)
Returns the number of points in the channel.
Parameters
DoubleChannelvector A channel.Returns
doubleA single integer.Examples
Count(Choose(ThrottlePos>90,1,Invalid())) = 890
Count(DoubleChannel[] vectors)
Returns an array containing the number of points in each channel given.
Parameters
DoubleChannel[]vectors An array of channels containing numerical dataReturns
double[]An array of integers of the same length as the input.Examples
Count(ThrottlePos, BrakePressure)
Count(BooleanChannel vector)
Returns the number of points in the channel.
Parameters
BooleanChannelvector A channel.Returns
doubleA single integer.
Count(BooleanChannel[] vectors)
Returns an array containing the number of points in each channel given.
Parameters
BooleanChannel[]vectors An array of channels containing boolean dataReturns
double[]An array of integers of the same length as the input.
CountAll
| CountAll(DoubleChannel) | Returns a single value that is the count of all elements. |
| CountAll(DoubleChannel[]) | Returns a single value that is the count of all elements in all arrays and channels given. |
| CountAll(double) | Returns a single value that is the count of all elements. |
| CountAll(double[]) | Returns a single value that is the count of all elements in all arrays and channels given. |
CountAll(DoubleChannel vector)
Returns a single value that is the count of all elements.
Parameters
DoubleChannelvector A channelReturns
doubleAn integer value of the total number elements in the channel given.Examples
CountAll(vCornerMin)
CountAll(DoubleChannel[] vectors)
Returns a single value that is the count of all elements in all arrays and channels given.
Parameters
DoubleChannel[]vectors An array of channels containing numerical dataReturns
doubleAn integer value of the total number elements in the channels given.
CountAll(double value)
Returns a single value that is the count of all elements.
Parameters
doublevalue A single value.Returns
doubleAn integer
CountAll(double[] values)
Returns a single value that is the count of all elements in all arrays and channels given.
Parameters
double[]values An array of values to count.Returns
doubleAn integer
Derivative
| Derivative(DoubleChannel) | Returns a channel of the derivative for each point of the channel. A two-point forward method is used. |
| Derivative(DoubleChannel[]) | Returns an array of channels containing the derivatives for each point of the inputs. A two-point forward method is used. |
Derivative(DoubleChannel vector)
Returns a channel of the derivative for each point of the channel. A two-point forward method is used.
Parameters
DoubleChannelvector The channel to take the derivative of.Returns
DoubleChannelA channelExamples
Derivative(Speed)
Derivative(DoubleChannel[] vectors)
Returns an array of channels containing the derivatives for each point of the inputs. A two-point forward method is used.
Parameters
DoubleChannel[]vectors An array of channels to take the derivative of.Returns
DoubleChannel[]An array of channels
EdgeDelayFall
| EdgeDelayFall(BooleanChannel, double) | Offsets edges by time |
| EdgeDelayFall(BooleanChannel[], double) | Offsets the edges of each given channel by the given time |
EdgeDelayFall(BooleanChannel vector, double value)
Offsets edges by time
Parameters
BooleanChannelvector Channel to delay.
doublevalue Amount of time to delay by (seconds).Returns
BooleanChannelA boolean channel with the falling edge delayed by the specified amount.Examples
EdgeDelayFall(Throttle > 90, 1.0)
EdgeDelayFall(BooleanChannel[] vectors, double value)
Offsets the edges of each given channel by the given time
Parameters
BooleanChannel[]vectors An array of channels to delay.
doublevalue Amount of time to delay by (seconds).Returns
BooleanChannel[]An array of boolean channels with the falling edge delayed by the specified amount.
EdgeDelayRise
| EdgeDelayRise(BooleanChannel, double) | Offsets edges by time |
| EdgeDelayRise(BooleanChannel[], double) | Offsets the edges of each given channel by the given time |
EdgeDelayRise(BooleanChannel vector, double value)
Offsets edges by time
Parameters
BooleanChannelvector Channel to delay.
doublevalue Amount of time to delay by (seconds).Returns
BooleanChannelA boolean channel with the rising edge delayed by the specified amount.Examples
EdgeDelayRise(Throttle > 90, 1.0)
EdgeDelayRise(BooleanChannel[] vectors, double value)
Offsets the edges of each given channel by the given time
Parameters
BooleanChannel[]vectors An array of channels to delay.
doublevalue Amount of time to delay by (seconds).Returns
BooleanChannel[]An array of boolean channels with the rising edge delayed by the specified amount.
Exp
| Exp(DoubleChannel) | Returns a channel containing the EXP of all the items in the original channel, where EXP returns e raised to the nth power, where e = 2.71828183 |
| Exp(DoubleChannel[]) | Returns an array of channels containing the EXP of all the items in the original channels, where EXP returns e raised to the nth power, where e = 2.71828183 |
| Exp(double) | EXP returns e raised to the nth power, where e = 2.71828183 |
Exp(DoubleChannel vector)
Returns a channel containing the EXP of all the items in the original channel, where EXP returns e raised to the nth power, where e = 2.71828183
Parameters
DoubleChannelvector A channelReturns
DoubleChannelA channel of the same size of the input.Examples
Exp(Steering)
Exp(DoubleChannel[] vectors)
Returns an array of channels containing the EXP of all the items in the original channels, where EXP returns e raised to the nth power, where e = 2.71828183
Parameters
DoubleChannel[]vectors An array of channels containing numerical dataReturns
DoubleChannel[]An array of channels of the same dimension of the input.
Exp(double n)
EXP returns e raised to the nth power, where e = 2.71828183
Parameters
doublen A doubleReturns
doublee raised to the nth powerExamples
Exp(4) = 54.59815
FallingEdge
| FallingEdge(DoubleChannel) | Returns a channel of 1 and 0. 1 means that the previous item in the channel was larger than the current one. |
| FallingEdge(DoubleChannel[]) | Returns an array of channels matching the dimension of the input array of channels containing values of either 1 or 0. 1 means that the previous item in the channel was larger than the current one. |
FallingEdge(DoubleChannel vector)
Returns a channel of 1 and 0. 1 means that the previous item in the channel was larger than the current one.
Parameters
DoubleChannelvector A channelReturns
DoubleChannelA channel of the same length as the input with each value replaced with either an integer 0 or 1.Examples
FallingEdge(BrakePresF)
FallingEdge(DoubleChannel[] vectors)
Returns an array of channels matching the dimension of the input array of channels containing values of either 1 or 0. 1 means that the previous item in the channel was larger than the current one.
Parameters
DoubleChannel[]vectors An array of channels containing numerical dataReturns
DoubleChannel[]An array of channels of the same dimension as the input with each value replaced with either an integer 0 or 1.Examples
FallingEdge({ BrakePresF, BrakePresR })
FilterLp
| FilterLp(DoubleChannel, double) | Applies a low pass (RC) filter to the input channel. |
| FilterLp(DoubleChannel[], double) | Applies a low pass (RC) filter to each input channel. |
FilterLp(DoubleChannel vector, double value)
Applies a low pass (RC) filter to the input channel.
Parameters
DoubleChannelvector A double channel.
doublevalue The value to filter on.Returns
DoubleChannelThe filtered double channel.Examples
FilterLp(rpm, 2)
FilterLp(DoubleChannel[] vectors, double value)
Applies a low pass (RC) filter to each input channel.
Parameters
DoubleChannel[]vectors An array of channels.
doublevalue The value to filter on.Returns
DoubleChannel[]An array of filtered channels.
FlipFlop
| FlipFlop(BooleanChannel, BooleanChannel) | Result becomes true when vector changes to true and false when vector1 changes to false |
| FlipFlop(BooleanChannel[], BooleanChannel[]) | Returns an array of boolean channels based on the two input arrays zipped according to the non-array overload. |
FlipFlop(BooleanChannel vector, BooleanChannel vector1)
Result becomes true when vector changes to true and false when vector1 changes to false
Parameters
BooleanChannelvector A boolean channel.
BooleanChannelvector1 A boolean channel.Returns
BooleanChannelA boolean channel.Examples
FlipFlop(Throttle Position > 90, Throttle Position < 10)
FlipFlop(BooleanChannel[] vectors, BooleanChannel[] vectors1)
Returns an array of boolean channels based on the two input arrays zipped according to the non-array overload.
Parameters
BooleanChannel[]vectors An array of channels containing boolean data
BooleanChannel[]vectors1 An array of channels containing boolean dataReturns
BooleanChannel[]An array of boolean channels.
Floor
| Floor(DoubleChannel) | Returns a channel containing each value in the input mapped to the largest integer value that is less than or equal to it. |
| Floor(DoubleChannel[]) | Returns an array of channels containing each value in the input mapped to the largest integer value that is less than or equal to it. |
| Floor(double) | Returns the largest integer value that is less than or equal to the specified double-precision floating-point number. |
Floor(DoubleChannel vector)
Returns a channel containing each value in the input mapped to the largest integer value that is less than or equal to it.
Parameters
DoubleChannelvector A double channel.Returns
DoubleChannelA channel of integers.Examples
Floor(rpm / 2) -> each value divided by 2 rounded down to the nearest integer in the rpm channel
Floor(DoubleChannel[] vectors)
Returns an array of channels containing each value in the input mapped to the largest integer value that is less than or equal to it.
Parameters
DoubleChannel[]vectors An array of channels containing numerical dataReturns
DoubleChannel[]An array of integer channels.
Floor(double value)
Returns the largest integer value that is less than or equal to the specified double-precision floating-point number.
Parameters
doublevalue A double.Returns
doubleThe largest integer value less than or equal to the specified number.Examples
Floor(3 / 2) = 1
GpsGateSector
| GpsGateSector(DoubleChannel, DoubleChannel, double, double, double, double) | Returns time spent between start- and end-coordinates. The input vectors are: Lat-Coordinates, Long-Coordinates. The input values are: Start-Lat, Start-Long, End-Lat, End-Long |
| GpsGateSector(DoubleChannel, DoubleChannel, double[], double[], double[], double[]) | Returns an array of the time spent between each set of start- and end-coordinates. |
| GpsGateSector(DoubleChannel, DoubleChannel, DoubleChannel, double, double, double, double) | Returns values of "OutputChannel (i.e. Vector3)" between start- and end-coordinates, otherwise returns null. The input vectors are: Lat-Coordinates, Long-Coordinates and the Outputchannel. The input values are: Start-Lat, Start-Long, End-Lat, End-Long |
| GpsGateSector(DoubleChannel, DoubleChannel, DoubleChannel, double[], double[], double[], double[]) | Returns an array of the same length as the number of coordinate groupings, containing values of outputChannel between the start- and end-coordinates |
GpsGateSector(DoubleChannel gpsLatChannel, DoubleChannel gpsLongChannel, double startLat, double startLong, double endLat, double endLong)
Returns time spent between start- and end-coordinates. The input vectors are: Lat-Coordinates, Long-Coordinates. The input values are: Start-Lat, Start-Long, End-Lat, End-Long
Parameters
DoubleChannelgpsLatChannel A double channel.
DoubleChannelgpsLongChannel A double channel.
doublestartLat A number, degrees of latitude
doublestartLong A number, degrees of longitude.
doubleendLat A number, degrees of latitude
doubleendLong A number, degrees of longitude.Returns
doubleA double, time spent (seconds).Examples
GpsGateSector(GPS Latitude, GPS Longitude, 50.4457268, 5.9636154, 50.4461757, 5.9640969)
GpsGateSector(DoubleChannel gpsLatChannel, DoubleChannel gpsLongChannel, double[] startLats, double[] startLongs, double[] endLats, double[] endLongs)
Returns an array of the time spent between each set of start- and end-coordinates.
Parameters
DoubleChannelgpsLatChannel A double channel.
DoubleChannelgpsLongChannel A double channel.
double[]startLats Array of numbers, degrees of latitude.
double[]startLongs Array of numbers, degrees of longitude.
double[]endLats Array of numbers, degrees of latitude.
double[]endLongs Array of numbers, degrees of longitude.Returns
double[]An array of doubles, time spent (seconds).
GpsGateSector(DoubleChannel gpsLatChannel, DoubleChannel gpsLongChannel, DoubleChannel outputChannel, double startLat, double startLong, double endLat, double endLong)
Returns values of "OutputChannel (i.e. Vector3)" between start- and end-coordinates, otherwise returns null. The input vectors are: Lat-Coordinates, Long-Coordinates and the Outputchannel. The input values are: Start-Lat, Start-Long, End-Lat, End-Long
Parameters
DoubleChannelgpsLatChannel A double channel.
DoubleChannelgpsLongChannel A double channel.
DoubleChanneloutputChannel A double channel.
doublestartLat A number, degrees of latitude
doublestartLong A number, degrees of longitude.
doubleendLat A number, degrees of longitude.
doubleendLong Degree of longitude, or list of degrees.Returns
DoubleChannelValues of outputChannel between the start- and end-coordinatesExamples
GpsGateSector(GPS Latitude, GPS Longitude, aSteer, 50.4457268, 5.9636154, 50.4461757, 5.9640969)
GpsGateSector(DoubleChannel gpsLatChannel, DoubleChannel gpsLongChannel, DoubleChannel outputChannel, double[] startLats, double[] startLongs, double[] endLats, double[] endLongs)
Returns an array of the same length as the number of coordinate groupings, containing values of outputChannel between the start- and end-coordinates
Parameters
DoubleChannelgpsLatChannel A double channel.
DoubleChannelgpsLongChannel A double channel.
DoubleChanneloutputChannel A double channel.
double[]startLats Array of numbers, degrees of latitude.
double[]startLongs Array of numbers, degrees of longitude.
double[]endLats Array of numbers, degrees of latitude.
double[]endLongs Array of numbers, degrees of longitude.Returns
DoubleChannel[]An array of the same length as the number of coordinate groupings, containing values of outputChannel between the start- and end-coordinates
Integrate
| Integrate(DoubleChannel) | Returns a channel of the cumulative integral from the beginning of the channel. |
| Integrate(DoubleChannel[]) | Returns an array of channels populated with the average values from the channels. |
| Integrate(DoubleChannel, BooleanChannel) | Returns a channel of the cumulative integral from the beginning of the channel when the condition is true |
| Integrate(DoubleChannel[], BooleanChannel[]) | Returns an array of channels populated with the average values from the channels, condition allows a boolean channel to be used to control when the calculation is performed. |
| Integrate(DoubleChannel, BooleanChannel, BooleanChannel) | Returns a channel of the cumulative integral from the beginning of the channel when condition is true and resets whenever reset contains a true value. |
| Integrate(DoubleChannel[], BooleanChannel[], BooleanChannel[]) | Returns an array of channels populated with the average values from the channels, condition allows a boolean channel to be used to control when the calculation is performed, and reset can be used to reset the calculation. |
Integrate(DoubleChannel input)
Returns a channel of the cumulative integral from the beginning of the channel.
Parameters
DoubleChannelinput A double channel.Returns
DoubleChannelA channel of the cumulative integral from the beginning of the channel.Examples
Integrate(Abs(LateralG))
Integrate(DoubleChannel[] inputs)
Returns an array of channels populated with the average values from the channels.
Parameters
DoubleChannel[]inputs An array of channels containing numerical dataReturns
DoubleChannel[]An array of channels of the same length as input.
Integrate(DoubleChannel input, BooleanChannel condition)
Returns a channel of the cumulative integral from the beginning of the channel when the condition is true
Parameters
DoubleChannelinput A double channel.
BooleanChannelcondition The channel that determines when the values in input should be considered.Returns
DoubleChannelA channel of the cumulative integral from the beginning of the channel when condition is true.Examples
Integrate(Abs(LateralG), LateralG > 0)
Integrate(DoubleChannel[] inputs, BooleanChannel[] conditions)
Returns an array of channels populated with the average values from the channels, condition allows a boolean channel to be used to control when the calculation is performed.
Parameters
DoubleChannel[]inputs An array of channels containing numerical data
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.Returns
DoubleChannel[]An array of channels of the same length as input.
Integrate(DoubleChannel input, BooleanChannel condition, BooleanChannel reset)
Returns a channel of the cumulative integral from the beginning of the channel when condition is true and resets whenever reset contains a true value.
Parameters
DoubleChannelinput A double channel.
BooleanChannelcondition The channel that determines when the values in input should be considered.
BooleanChannelreset A boolean channel that when atruevalue is encountered, resets the computation.Returns
DoubleChannelA channel of the cumulative integral from the beginning of the channel when condition is true. Resets when atruevalue is encountered inreset.
Integrate(DoubleChannel[] inputs, BooleanChannel[] conditions, BooleanChannel[] resets)
Returns an array of channels populated with the average values from the channels, condition allows a boolean channel to be used to control when the calculation is performed, and reset can be used to reset the calculation.
Parameters
DoubleChannel[]inputs An array of channels containing numerical data
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.
BooleanChannel[]resets An array of boolean channels that, when atruevalue is encountered, resets the computation.Returns
DoubleChannel[]An array of channels of the same length as input.
Invalid
| Invalid() | Returns a null value. |
Invalid()
Returns a null value.
Returns
objectA null value.Examples
Invalid() = null
IsNull
| IsNull(DoubleChannel) | Returns a channel of the same size as the input with each value replaced with true if the value is null and false if not. |
| IsNull(DoubleChannel[]) | Returns an array of channels of the same size as the input with each value of each channel replaced with true if the value is null and false if not. |
| IsNull(BooleanChannel) | Returns a channel of the same size as the input with each value replaced with true if the value is null and false if not. |
| IsNull(BooleanChannel[]) | Returns an array of channels of the same size as the input with each value of each channel replaced with true if the value is null and false if not. |
| IsNull(double) | Returns true if the value is null and false if not. |
| IsNull(double[]) | Returns an array matching the length of the input with each value replaced with true if it is null and false if it is not. |
| IsNull(bool) | Returns true if the value is null and false if not. |
| IsNull(bool[]) | Returns an array matching the length of the input with each value replaced with true if it is null and false if it is not. |
IsNull(DoubleChannel vector)
Returns a channel of the same size as the input with each value replaced with true if the value is null and false if not.
Parameters
DoubleChannelvector A channelReturns
BooleanChannelA channel booleans matching the size of the input channel.Examples
IsNull(FuelAdded)
IsNull(DoubleChannel[] vectors)
Returns an array of channels of the same size as the input with each value of each channel replaced with true if the value is null and false if not.
Parameters
DoubleChannel[]vectors An array of channelsReturns
BooleanChannel[]An array of channels matching the length of the input array of channels.
IsNull(BooleanChannel vector)
Returns a channel of the same size as the input with each value replaced with true if the value is null and false if not.
Parameters
BooleanChannelvector A boolean channelReturns
BooleanChannelA channel booleans matching the size of the input channel.Examples
IsNull(GPS_Speed)
IsNull(BooleanChannel[] vectors)
Returns an array of channels of the same size as the input with each value of each channel replaced with true if the value is null and false if not.
Parameters
BooleanChannel[]vectors An array of boolean channelsReturns
BooleanChannel[]An array of channels matching the length of the input array of channels.
IsNull(double value)
Returns true if the value is null and false if not.
Parameters
doublevalue A nullable numberReturns
boolA booleanExamples
IsNull(12) = false
IsNull(double[] values)
Returns an array matching the length of the input with each value replaced with true if it is null and false if it is not.
Parameters
double[]values An array of nullable numbersReturns
bool[]An array of booleans of the same length as the input.Examples
IsNull({ 12, 0, 3 }) = { false, false, false }
IsNull(bool value)
Returns true if the value is null and false if not.
Parameters
boolvalue A nullable booleanReturns
boolA booleanExamples
IsNull(Invalid()) = true
IsNull(bool[] values)
Returns an array matching the length of the input with each value replaced with true if it is null and false if it is not.
Parameters
bool[]values An array of nullable booleansReturns
bool[]An array of booleans of the same length as the input.Examples
IsNull({ 1, 0 }) = { false, false }
Last
| Last(DoubleChannel) | Returns the last value of the channel. |
| Last(DoubleChannel[]) | Returns the last value of the channel. |
| Last(BooleanChannel) | Returns the last value of the boolean channel. |
| Last(BooleanChannel[]) | Returns the last value of the boolean channel. |
Last(DoubleChannel vector)
Returns the last value of the channel.
Parameters
DoubleChannelvector A double channel.Returns
doubleA number, the last value in the channel.Examples
Last(Integrate(Abs(LateralG)))
Last(DoubleChannel[] vectors)
Returns the last value of the channel.
Parameters
DoubleChannel[]vectors An array of channels containing numerical dataReturns
double[]An array of numbers, the last value of each channel given.
Last(BooleanChannel vector)
Returns the last value of the boolean channel.
Parameters
BooleanChannelvector A boolean channel.Returns
boolA boolean, the last value in the channel.
Last(BooleanChannel[] vectors)
Returns the last value of the boolean channel.
Parameters
BooleanChannel[]vectors An array of channels containing boolean dataReturns
bool[]An array of booleans, the last value of each channel given.
LastChannel
| LastChannel(DoubleChannel) | Returns a channel populated with the last value from the channel. |
| LastChannel(DoubleChannel[]) | Returns a channel populated with the last value from the channel. |
| LastChannel(DoubleChannel, BooleanChannel) | Returns a channel populated with the last value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed. |
| LastChannel(DoubleChannel[], BooleanChannel[]) | Returns a channel populated with the last value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed. |
| LastChannel(DoubleChannel, BooleanChannel, BooleanChannel) | Returns a channel populated with the last value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation. |
| LastChannel(DoubleChannel[], BooleanChannel[], BooleanChannel[]) | Returns a channel populated with the last value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation. |
LastChannel(DoubleChannel input)
Returns a channel populated with the last value from the channel.
Parameters
DoubleChannelinput A double channel.Returns
DoubleChannelA channel populated with the last value from the input channel.Examples
LastChannel(vGps)
LastChannel(DoubleChannel[] inputs)
Returns a channel populated with the last value from the channel.
Parameters
DoubleChannel[]inputs An array of channels containing numerical dataReturns
DoubleChannel[]An array containing the last value from each channel given.
LastChannel(DoubleChannel input, BooleanChannel condition)
Returns a channel populated with the last value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed.
Parameters
DoubleChannelinput A double channel.
BooleanChannelcondition The channel that determines when the value should be taken from input.Returns
DoubleChannelA double channel containing the value from input when the lasttruevalue in condition is encountered.Examples
LastChannel(vGps, HighSpeedCornerGate)
LastChannel(DoubleChannel[] inputs, BooleanChannel[] conditions)
Returns a channel populated with the last value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed.
Parameters
DoubleChannel[]inputs An array of channels containing numerical data
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.Returns
DoubleChannel[]An array containing the last value from each channel given.
LastChannel(DoubleChannel input, BooleanChannel condition, BooleanChannel reset)
Returns a channel populated with the last value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation.
Parameters
DoubleChannelinput A double channel.
BooleanChannelcondition The channel that determines when the value should be taken from input.
BooleanChannelreset A boolean channel that when a true value is encountered, resets the computation.Returns
DoubleChannelA double channel containing the value from input when the lasttruevalue in condition is encountered. Resets when atruevalue is encountered inreset.Examples
LastChannel(vGps, HighSpeedCornerGate, StartEndHighSpeedCornerGate)
LastChannel(DoubleChannel[] inputs, BooleanChannel[] conditions, BooleanChannel[] resets)
Returns a channel populated with the last value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation.
Parameters
DoubleChannel[]inputs An array of channels containing numerical data
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.
BooleanChannel[]resets An array of boolean channels that, when a true value is encountered, resets the computation.Returns
DoubleChannel[]An array containing the last value from each channel given.
LinCorrel
| LinCorrel(DoubleChannel, DoubleChannel) | Returns the linear correlation between the two input channels using the Pearson correlation coefficient. |
| LinCorrel(DoubleChannel[], DoubleChannel[]) | Returns the linear correlation of each pair of channels in the given two arrays using the Pearson correlation coefficient. |
LinCorrel(DoubleChannel vector, DoubleChannel vector1)
Returns the linear correlation between the two input channels using the Pearson correlation coefficient.
Parameters
DoubleChannelvector A channel
DoubleChannelvector1 A channelReturns
doubleThe linear correlation.Examples
LinCorrel(Lambda1,ThottlePos) = 1.12
LinCorrel(DoubleChannel[] vectors, DoubleChannel[] vectors1)
Returns the linear correlation of each pair of channels in the given two arrays using the Pearson correlation coefficient.
Parameters
DoubleChannel[]vectors An array of channels containing numerical data
DoubleChannel[]vectors1 An array of channels containing numerical dataReturns
double[]An array of numbers, the linear correlation of each pair of channels in the given two arrays.
LinFit
| LinFit(DoubleChannel, DoubleChannel) | Returns the slope between the two input channels using the least-squares regression method. |
| LinFit(DoubleChannel[], DoubleChannel[]) | Returns the slope between each pair of channels in the given two arrays using the least-squares regression method. |
LinFit(DoubleChannel vector, DoubleChannel vector1)
Returns the slope between the two input channels using the least-squares regression method.
Parameters
DoubleChannelvector A channel
DoubleChannelvector1 A channelReturns
doubleA number, the slope.Examples
LinFit(LateralForce,RollAngle) = 0.58
LinFit(DoubleChannel[] vectors, DoubleChannel[] vectors1)
Returns the slope between each pair of channels in the given two arrays using the least-squares regression method.
Parameters
DoubleChannel[]vectors An array of channels containing numerical data
DoubleChannel[]vectors1 An array of channels containing numerical dataReturns
double[]An array of numbers of the same length as the inputs, the slope between each pair of channels.
Max
| Max(params DoubleChannel[]) | Returns the largest value of the given channel. |
| Max(params DoubleChannel[][]) | Returns an array of the largest values in all the given channels at each index of the input arrays. |
| Max(params double[]) | Returns the largest value of all numbers given. |
| Max(params double[][]) | Returns an array of the largest values at each index of the input arrays. |
Max(params DoubleChannel[] vector)
Returns the largest value of the given channel.
Parameters
params DoubleChannel[]vector The channels to evaluate.Returns
doubleA decimalExamples
Max(FLWheelSpeed, FRWheelSpeed) = 289 // Largest value of FLWheelSpeed and FRWheelSpeed over the lap
Max(params DoubleChannel[][] vectors)
Returns an array of the largest values in all the given channels at each index of the input arrays.
Parameters
params DoubleChannel[][]vectors One or more arrays of one or more channels to compare.Returns
double[]An array of decimals of equal length to the input array.Examples
Max({FLWheelSpeed, RLWheelSpeed}, {FRWheelSpeed, RRWheelSpeed}) = {289, 295} // The highest speed either front wheel reached over the lap and the highest speed either rear wheel reached over the lap
Max(params double[] value)
Returns the largest value of all numbers given.
Parameters
params double[]value The values to evaluate.Returns
doubleThe largest value.Examples
Max(5,6,2) = 6
Max(params double[][] values)
Returns an array of the largest values at each index of the input arrays.
Parameters
params double[][]values One or more arrays of numbers to compare.Returns
double[]An array of decimals equal to the length of the longest input array.Examples
Max({3,1}, {0,2}) = { 3, 2 }
MaxChannel
| MaxChannel(DoubleChannel) | Returns a channel populated with the maximum value from the channel. |
| MaxChannel(DoubleChannel[]) | Returns an array containing the maximum value from each channel given. |
| MaxChannel(DoubleChannel, BooleanChannel) | Returns a channel populated with the maximum value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed. |
| MaxChannel(DoubleChannel[], BooleanChannel[]) | An array containing the maximum value from each channel given while respecting the matching condition channel for each. |
| MaxChannel(DoubleChannel, BooleanChannel, BooleanChannel) | Returns a channel populated with the maximum value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation. |
| MaxChannel(DoubleChannel[], BooleanChannel[], BooleanChannel[]) | An array containing the maximum value from each channel given while respecting the matching condition and reset channels for each. |
MaxChannel(DoubleChannel input)
Returns a channel populated with the maximum value from the channel.
Parameters
DoubleChannelinput A double channel.Returns
DoubleChannelA double channel containing the maximum value from input.Examples
MaxChannel(vGps)
MaxChannel(DoubleChannel[] inputs)
Returns an array containing the maximum value from each channel given.
Parameters
DoubleChannel[]inputs An array of channels containing numerical dataReturns
DoubleChannel[]An array containing the maximum value from each channel given.
MaxChannel(DoubleChannel input, BooleanChannel condition)
Returns a channel populated with the maximum value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed.
Parameters
DoubleChannelinput A double channel.
BooleanChannelcondition The channel that determines what values should be considered from input.Returns
DoubleChannelA double channel containing the maximum value from input.Examples
MaxChannel(vGps, HighSpeedCornerGate)
MaxChannel(DoubleChannel[] inputs, BooleanChannel[] conditions)
An array containing the maximum value from each channel given while respecting the matching condition channel for each.
Parameters
DoubleChannel[]inputs An array of channels containing numerical data
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.Returns
DoubleChannel[]An array containing the maximum value from each channel given.
MaxChannel(DoubleChannel input, BooleanChannel condition, BooleanChannel reset)
Returns a channel populated with the maximum value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation.
Parameters
DoubleChannelinput A double channel.
BooleanChannelcondition The channel that determines what values should be considered from input.
BooleanChannelreset A boolean channel that determines when the computation should be reset.Returns
DoubleChannelA double channel containing the maximum value from input.Examples
MaxChannel(vGps, HighSpeedCornerGate, StartEndHighSpeedCornerGate)
MaxChannel(DoubleChannel[] inputs, BooleanChannel[] conditions, BooleanChannel[] resets)
An array containing the maximum value from each channel given while respecting the matching condition and reset channels for each.
Parameters
DoubleChannel[]inputs An array of channels containing numerical data
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.
BooleanChannel[]resets An array of boolean channels that, when a true value is encountered, resets the computation.Returns
DoubleChannel[]An array containing the maximum value from each channel given.
Median
| Median(params DoubleChannel[]) | Returns the median value of the given channel. |
| Median(params DoubleChannel[][]) | Returns an array of the median values in all the given channels at each index of the input arrays. |
| Median(params double[]) | Returns the median value of all numbers given. |
| Median(params double[][]) | Returns an array of the median values at each index of the input arrays. |
Median(params DoubleChannel[] vector)
Returns the median value of the given channel.
Parameters
params DoubleChannel[]vector The channels to evaluate.Returns
doubleA decimalExamples
Median(TyreTempFL) = 100
Median(params DoubleChannel[][] vectors)
Returns an array of the median values in all the given channels at each index of the input arrays.
Parameters
params DoubleChannel[][]vectors One or more arrays of one or more channels to compare.Returns
double[]An array of decimals of equal length to the input array.Examples
Median({TyreTempFL, TyreTempRL}, {TyreTempFR, TyreTempRR}) = {100, 105} // The median temperature of both front wheels over the lap and the median temperature of both rear wheel over the lap
Median(params double[] value)
Returns the median value of all numbers given.
Parameters
params double[]value The values to evaluate.Returns
doubleA number representing the median of the input.Examples
Median(5,6,2) = 5
Median(params double[][] values)
Returns an array of the median values at each index of the input arrays.
Parameters
params double[][]values One or more arrays of numbers to compare.Returns
double[]An array of numbersExamples
Median({5, 1},{6, 4},{2, 5}) = {5, 4}
Min
| Min(params DoubleChannel[]) | Returns the smallest value out the given channel. |
| Min(params DoubleChannel[][]) | Returns an array of the smallest values in all the given channels at each index of the input arrays. |
| Min(params double[]) | Returns the smallest value of all numbers given. |
| Min(params double[][]) | Returns an array of the smallest values at each index of the input arrays. |
Min(params DoubleChannel[] vector)
Returns the smallest value out the given channel.
Parameters
params DoubleChannel[]vector The channels to evaluate.Returns
doubleA decimalExamples
Min(FLWheelSpeed, FRWheelSpeed) = 45 // Smallest value of FLWheelSpeed and FRWheelSpeed over the lap
Min(params DoubleChannel[][] vectors)
Returns an array of the smallest values in all the given channels at each index of the input arrays.
Parameters
params DoubleChannel[][]vectors One or more arrays of one or more channels to compare.Returns
double[]An array of decimals of equal length to the input array.Examples
Min({FLWheelSpeed, RLWheelSpeed}, {FRWheelSpeed, RRWheelSpeed}) = {45, 49} // The smallest speed either front wheel reached over the lap and the smallest speed either rear wheel reached over the lap
Min(params double[] value)
Returns the smallest value of all numbers given.
Parameters
params double[]value The values to evaluate.Returns
doubleThe smallest value.Examples
Min(5,6,2) = 2
Min(params double[][] values)
Returns an array of the smallest values at each index of the input arrays.
Parameters
params double[][]values One or more arrays of numbers to compare.Returns
double[]An array of decimals equal to the length of the longest input array.Examples
Min({3,1}, {0,2}) = { 0, 1 }
MinChannel
| MinChannel(DoubleChannel) | Returns a channel populated with the minimum value from the channel. |
| MinChannel(DoubleChannel[]) | Returns an array containing the minimum value from each channel given. |
| MinChannel(DoubleChannel, BooleanChannel) | Returns a channel populated with the minimum value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed. |
| MinChannel(DoubleChannel[], BooleanChannel[]) | An array containing the minimum value from each channel given while respecting the matching condition channel for each. |
| MinChannel(DoubleChannel, BooleanChannel, BooleanChannel) | Returns a channel populated with the minimum value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation. |
| MinChannel(DoubleChannel[], BooleanChannel[], BooleanChannel[]) | An array containing the minimum value from each channel given while respecting the matching condition and reset channels for each. |
MinChannel(DoubleChannel input)
Returns a channel populated with the minimum value from the channel.
Parameters
DoubleChannelinput A double channel.Returns
DoubleChannelA channel populated with the minimum value from the input channel.Examples
MinChannel(vGps,)
MinChannel(DoubleChannel[] inputs)
Returns an array containing the minimum value from each channel given.
Parameters
DoubleChannel[]inputs An array of channels containing numerical dataReturns
DoubleChannel[]An array of channels containing the minimum value from each channel given.
MinChannel(DoubleChannel input, BooleanChannel condition)
Returns a channel populated with the minimum value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed.
Parameters
DoubleChannelinput A double channel.
BooleanChannelcondition The channel that determines what values should be considered from input.Returns
DoubleChannelA double channel containing the minimum value from input.Examples
MinChannel(vGps, HighSpeedCornerGate)
MinChannel(DoubleChannel[] inputs, BooleanChannel[] conditions)
An array containing the minimum value from each channel given while respecting the matching condition channel for each.
Parameters
DoubleChannel[]inputs An array of channels containing numerical data
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.Returns
DoubleChannel[]An array of channels containing the minimum value from each channel given.
MinChannel(DoubleChannel input, BooleanChannel condition, BooleanChannel reset)
Returns a channel populated with the minimum value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation.
Parameters
DoubleChannelinput A double channel.
BooleanChannelcondition A boolean channel that determines what values should be considered from input.
BooleanChannelreset A boolean channel that determines when the computation should be reset.Returns
DoubleChannelA double channel containing the minimum value from input.Examples
MinChannel(vGps, HighSpeedCornerGate, StartEndHighSpeedCornerGate)
MinChannel(DoubleChannel[] inputs, BooleanChannel[] conditions, BooleanChannel[] resets)
An array containing the minimum value from each channel given while respecting the matching condition and reset channels for each.
Parameters
DoubleChannel[]inputs An array of channels containing numerical data
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.
BooleanChannel[]resets An array of boolean channels that, when a true value is encountered, resets the computation.Returns
DoubleChannel[]An array of channels containing the minimum value from each channel given.
Mod
| Mod(DoubleChannel, double) | Returns a channel of the same size as the input representing the remainders of an element-wise division. |
| Mod(DoubleChannel[], double) | Returns an array of channels of the same size as the input representing the remainders of an element-wise division. |
| Mod(double, double) | Returns the remainder resulting from dividing two specified values. |
Mod(DoubleChannel dividend, double divisor)
Returns a channel of the same size as the input representing the remainders of an element-wise division.
Parameters
DoubleChanneldividend A double channel
doubledivisor A double.Returns
DoubleChannelA channel of the same size as the input representing the remainders of an element-wise division.Examples
Mod(rpm, 3)
Mod(DoubleChannel[] dividends, double divisor)
Returns an array of channels of the same size as the input representing the remainders of an element-wise division.
Parameters
DoubleChannel[]dividends An array of channels containing numerical data
doubledivisor A double.Returns
DoubleChannel[]An array of channels of the same size as the input representing the remainders of an element-wise division.
Mod(double dividend, double divisor)
Returns the remainder resulting from dividing two specified values.
Parameters
doubledividend A double
doubledivisor A doubleReturns
doubleAn integer, the remainder.Examples
Mod(3, 2) = 1
Percentile
| Percentile(DoubleChannel, double) | Returns the k-th percentile of values in a range. You can use this function to establish a threshold of acceptance. |
| Percentile(DoubleChannel[], double) | Returns an array of numbers, the k-th percentile of each given channel. |
Percentile(DoubleChannel vector, double k)
Returns the k-th percentile of values in a range. You can use this function to establish a threshold of acceptance.
Parameters
DoubleChannelvector A channel
doublek A number, the percentile to take.Returns
doubleThe k-th percentile of a given channel.Examples
Percentile(Speed, 0.3)
Percentile(DoubleChannel[] vectors, double k)
Returns an array of numbers, the k-th percentile of each given channel.
Parameters
DoubleChannel[]vectors An array of channels containing numerical data
doublek A number, the percentile to take.Returns
double[]An array of numbers, the k-th percentile of each given channel.
Pow
| Pow(DoubleChannel, double) | Returns a channel where all the items in the original channel are powered to the scalar value defined. |
| Pow(DoubleChannel[], double) | Returns an array of channels where all the items in the original channels are powered to the scalar value defined. |
| Pow(double, double) | Returns the base powered to the exponent. |
Pow(DoubleChannel bases, double exponent)
Returns a channel where all the items in the original channel are powered to the scalar value defined.
Parameters
DoubleChannelbases A channel
doubleexponent A double.Returns
DoubleChannelA channel of the same size as the input, with each value raised to the specified exponent.Examples
Pow(Speed,2) returns a vector of the speed squared
Pow(DoubleChannel[] bases, double exponent)
Returns an array of channels where all the items in the original channels are powered to the scalar value defined.
Parameters
DoubleChannel[]bases An array of channels containing numerical data
doubleexponent A double.Returns
DoubleChannel[]An array of channels of the same size as the input, with each value raised to the specified exponent.
Pow(double base, double exponent)
Returns the base powered to the exponent.
Parameters
doublebase The base.
doubleexponent The exponent.Returns
doubleA double.Examples
Pow(2,3) = 8
ReSample
| ReSample(DoubleChannel, double) | Resamples a channel to the defined frequency. |
| ReSample(DoubleChannel[], double) | Resamples a number of channels to the defined frequency. |
ReSample(DoubleChannel vector, double value)
Resamples a channel to the defined frequency.
Parameters
DoubleChannelvector The channel to resample.
doublevalue The frequency to resample to (Hz).Returns
DoubleChannelA resampled channelExamples
ReSample(vGPS, 200)
ReSample(DoubleChannel[] vectors, double value)
Resamples a number of channels to the defined frequency.
Parameters
DoubleChannel[]vectors An array of channels to resample.
doublevalue The frequency to resample to (Hz).Returns
DoubleChannel[]An array of resampled channels.Examples
ReSample({ vWheelFL, vWheelFR, vWheelRL, vWheelRR }, 200)
RisingEdge
| RisingEdge(DoubleChannel) | Returns a channel consisting of integers 1 and 0. 1 means that the previous sample in the channel was smaller than the current one. |
| RisingEdge(DoubleChannel[]) | Returns an array of channels consisting of integers 1 and 0. 1 means that the previous sample in the channel was smaller than the current one. |
RisingEdge(DoubleChannel vector)
Returns a channel consisting of integers 1 and 0. 1 means that the previous sample in the channel was smaller than the current one.
Parameters
DoubleChannelvector A channel.Returns
DoubleChannelA channel of the same size as the input with each value replaced by either an integer 0 or 1.Examples
RisingEdge(TPS)
RisingEdge(DoubleChannel[] vectors)
Returns an array of channels consisting of integers 1 and 0. 1 means that the previous sample in the channel was smaller than the current one.
Parameters
DoubleChannel[]vectors An array of channels containing numerical dataReturns
DoubleChannel[]An array of channels of the same size as the inputs with each value replaced by either an integer 0 or 1.
Round
| Round(DoubleChannel, double) | Returns a channel with each value rounded to the specified number of fractional digits. |
| Round(DoubleChannel[], double) | Returns an array of channels with each value rounded to the specified number of fractional digits. |
| Round(double, double) | Rounds a value to the specified number of fractional digits. |
| Round(DoubleChannel) | Returns a channel with each value rounded to the nearest integer. |
| Round(DoubleChannel[]) | Returns an array of channels with each value rounded to the nearest integer. |
| Round(double) | Rounds a value to the nearest integer. |
Round(DoubleChannel vector, double value)
Returns a channel with each value rounded to the specified number of fractional digits.
Parameters
DoubleChannelvector The channel to round.
doublevalue The number of fractional digits to round to.Returns
DoubleChannelA channel with each value rounded to the specified number of fractional digits.Examples
Round(GForce_Lat, 1)
Round(DoubleChannel[] vectors, double value)
Returns an array of channels with each value rounded to the specified number of fractional digits.
Parameters
DoubleChannel[]vectors An array of channels to round.
doublevalue The number of fractional digits to round to.Returns
DoubleChannel[]An array of channels with each value rounded to the specified number of fractional digits.
Round(double value, double value1)
Rounds a value to the specified number of fractional digits.
Parameters
doublevalue The value to round.
doublevalue1 The number of fractional digits to round to.Returns
doubleThe rounded value.Examples
Round(3 / 2, 1) = 1.5
Round(DoubleChannel vector)
Returns a channel with each value rounded to the nearest integer.
Parameters
DoubleChannelvector The channel to round.Returns
DoubleChannelA channel with each value rounded to the nearest integer.Examples
Round(GForce_Lat)
Round(DoubleChannel[] vectors)
Returns an array of channels with each value rounded to the nearest integer.
Parameters
DoubleChannel[]vectors An array of channels to round.Returns
DoubleChannel[]An array of channels with each value rounded to the nearest integer.
Round(double value)
Rounds a value to the nearest integer.
Parameters
doublevalue A double value.Returns
doubleAn integer.Examples
Round(3 / 2) = 2
Sign
| Sign(DoubleChannel) | A channel containing integers representing the arithmetic sign of each individual value of the input channel (1, -1, or 0). |
| Sign(DoubleChannel[]) | An array of channels containing integers representing the arithmetic sign of each individual value of the input channels (1, -1, or 0). |
| Sign(double) | Returns the arithmetic sign (1, -1 or 0) of a supplied number. |
Sign(DoubleChannel vector)
A channel containing integers representing the arithmetic sign of each individual value of the input channel (1, -1, or 0).
Parameters
DoubleChannelvector A channel.Returns
DoubleChannelA channel containing values representing the arithmetic sign of each individual value of the input channel.Examples
Sign(GForceLat)
Sign(DoubleChannel[] vectors)
An array of channels containing integers representing the arithmetic sign of each individual value of the input channels (1, -1, or 0).
Parameters
DoubleChannel[]vectors An array of channels containing numerical dataReturns
DoubleChannel[]An array of channels containing values representing the arithmetic sign of each individual value of the input channels.Examples
Sign({ GForceLat, GForceLon })
Sign(double value)
Returns the arithmetic sign (1, -1 or 0) of a supplied number.
Parameters
doublevalue The numerical value to determine the sign of.Returns
doubleA value representing an arithmetic sign (1, -1 or 0).Examples
Sign(-3) = -1
Sin
| Sin(DoubleChannel) | Returns a channel containing the sine of all the items in the original channel. |
| Sin(DoubleChannel[]) | Returns an array of channels containing the sine of all the items in the original channels. |
| Sin(double) | Returns the sine of the value. |
Sin(DoubleChannel vector)
Returns a channel containing the sine of all the items in the original channel.
Parameters
DoubleChannelvector The channel to take the sine of.Returns
DoubleChannelA channel of the same size as the input containing the sine of each individual value.Examples
Sin(Steering)
Sin(DoubleChannel[] vectors)
Returns an array of channels containing the sine of all the items in the original channels.
Parameters
DoubleChannel[]vectors An array of channels to take the sine of.Returns
DoubleChannel[]An array of channels of the same size as the input containing the sine of each individual value.
Sin(double value)
Returns the sine of the value.
Parameters
doublevalue The value to take the sine of.Returns
doubleThe sine.Examples
Sin(0)=0
Smooth
| Smooth(DoubleChannel) | Smooths the input channel by averaging over a time interval of 1 second. |
| Smooth(DoubleChannel[]) | Smooths each input channel individually by averaging over a time interval of 1 second. |
| Smooth(DoubleChannel, double) | Smooths the input channel by averaging over a time interval defined by windowSize. |
| Smooth(DoubleChannel[], double) | Smooths each input channel individually by averaging over a time interval defined by windowSize. |
Smooth(DoubleChannel vector)
Smooths the input channel by averaging over a time interval of 1 second.
Parameters
DoubleChannelvector The channel to smooth.Returns
DoubleChannelThe smoothed channel using a window size of 1 second.Examples
Smooth(Steering) // Moving average of the Steering channel using a window size of 1 sec.
Smooth(DoubleChannel[] vectors)
Smooths each input channel individually by averaging over a time interval of 1 second.
Parameters
DoubleChannel[]vectors An array of channels to smooth.Returns
DoubleChannel[]An array of smoothed channels using a window size of 1 second.
Smooth(DoubleChannel vector, double windowSize)
Smooths the input channel by averaging over a time interval defined by windowSize.
Parameters
DoubleChannelvector The channel to smooth.
doublewindowSize The window size to use (seconds).Returns
DoubleChannelA smoothed channel.Examples
Smooth(Steering, 0.1) // Moving average of the Steering channel using a window size of 0.1 sec.
Smooth(DoubleChannel[] vectors, double windowSize)
Smooths each input channel individually by averaging over a time interval defined by windowSize.
Parameters
DoubleChannel[]vectors An array of channels to smooth.
doublewindowSize The window size to use (seconds).Returns
DoubleChannel[]An array of smoothed channels.
Sqrt
| Sqrt(DoubleChannel) | Returns a channel containing the square root of each sample in the original channel. |
| Sqrt(DoubleChannel[]) | Returns an array of channels containing the square root of each sample in the original channels. |
| Sqrt(double) | Returns the square root of a specified number. |
Sqrt(DoubleChannel vector)
Returns a channel containing the square root of each sample in the original channel.
Parameters
DoubleChannelvector The channel to take the square root of.Returns
DoubleChannelA channel of the same length as the input.Examples
Sqrt(Speed)
Sqrt(DoubleChannel[] vectors)
Returns an array of channels containing the square root of each sample in the original channels.
Parameters
DoubleChannel[]vectors An array of channels to take the square root of.Returns
DoubleChannel[]An array of channels of the same size as the input.
Sqrt(double value)
Returns the square root of a specified number.
Parameters
doublevalue The number whose square root is to be found.Returns
doubleThe positive square root.Examples
Sqrt(4)=2
Start
| Start(DoubleChannel) | Returns the first valid value in the given double channel. |
| Start(DoubleChannel[]) | Returns the first valid values of each of the given double channels. |
| Start(BooleanChannel) | Returns the first valid value in the given boolean channel. |
| Start(BooleanChannel[]) | Returns the first valid values of each of the given boolean channels. |
Start(DoubleChannel vector)
Returns the first valid value in the given double channel.
Parameters
DoubleChannelvector The channel to take the first value of.Returns
doubleA double, the first valid value in the channel.Examples
Start(FuelLevel)
Start(DoubleChannel[] vectors)
Returns the first valid values of each of the given double channels.
Parameters
DoubleChannel[]vectors An array of channels to take the first values of.Returns
double[]An array of doubles, the first valid values of each given channel.Examples
Start({ FuelLevel, vGPS })
Start(BooleanChannel vector)
Returns the first valid value in the given boolean channel.
Parameters
BooleanChannelvector The channel to take the first value of.Returns
boolA boolean, the first valid value in the channel.
Start(BooleanChannel[] vectors)
Returns the first valid values of each of the given boolean channels.
Parameters
BooleanChannel[]vectors An array of channels to take the first values of.Returns
bool[]An array of booleans, the first valid values of each given channel.
StartChannel
| StartChannel(DoubleChannel) | Returns a channel populated with the first value from the channel. |
| StartChannel(DoubleChannel[]) | Returns an array of channels, each populated with the first value from each of the input channels. |
| StartChannel(DoubleChannel, BooleanChannel) | Returns a channel populated with the first value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed. |
| StartChannel(DoubleChannel[], BooleanChannel[]) | Returns an array of channels, each populated with the value from input when the first true value in condition is encountered. |
| StartChannel(DoubleChannel, BooleanChannel, BooleanChannel) | Returns a channel populated with the first value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation. |
| StartChannel(DoubleChannel[], BooleanChannel[], BooleanChannel[]) | Returns an array of channels, each populated with the value from input when the first true value in condition is encountered. Resets when a true value is encountered in reset. |
StartChannel(DoubleChannel input)
Returns a channel populated with the first value from the channel.
Parameters
DoubleChannelinput A double channel.Returns
DoubleChannelA channel populated with the first value from the input channel.Examples
StartChannel(vGps)
StartChannel(DoubleChannel[] inputs)
Returns an array of channels, each populated with the first value from each of the input channels.
Parameters
DoubleChannel[]inputs An array of double channels.Returns
DoubleChannel[]An array of channels, each populated with the first value from each of the input channels.
StartChannel(DoubleChannel input, BooleanChannel condition)
Returns a channel populated with the first value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed.
Parameters
DoubleChannelinput The double channel to copy the value from.
BooleanChannelcondition The channel that determines when the value should be taken from input.Returns
DoubleChannelA double channel containing the value from input when the firsttruevalue in condition is encountered.Examples
StartChannel(vGps, HighSpeedCornerGate)
StartChannel(DoubleChannel[] inputs, BooleanChannel[] conditions)
Returns an array of channels, each populated with the value from input when the first true value in condition is encountered.
Parameters
DoubleChannel[]inputs An array of channels containing numerical data
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.Returns
DoubleChannel[]An array of channels, each populated with the value from input when the firsttruevalue in condition is encountered.
StartChannel(DoubleChannel input, BooleanChannel condition, BooleanChannel reset)
Returns a channel populated with the first value from the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation.
Parameters
DoubleChannelinput The double channel to copy the value from.
BooleanChannelcondition The channel that determines when the value should be taken from input.
BooleanChannelreset A boolean channel that when a true value is encountered, resets the computation.Returns
DoubleChannelA double channel containing the value from input when the firsttruevalue in condition is encountered. Resets when atruevalue is encountered inreset.Examples
StartChannel(vGps, HighSpeedCornerGate, StartEndHighSpeedCornerGate)
StartChannel(DoubleChannel[] inputs, BooleanChannel[] conditions, BooleanChannel[] resets)
Returns an array of channels, each populated with the value from input when the first true value in condition is encountered. Resets when a true value is encountered in reset.
Parameters
DoubleChannel[]inputs An array of channels containing numerical data
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.
BooleanChannel[]resets An array of boolean channels that, when a true value is encountered, resets the computation.Returns
DoubleChannel[]An array of channels, each populated with the value from input when the firsttruevalue in condition is encountered. Resets when atruevalue is encountered inreset.
StdDev
| StdDev(params DoubleChannel[]) | Returns the standard deviation value from the entire channel. If multiple channels are given, then the standard deviation of all channels combined is returned. |
| StdDev(params DoubleChannel[][]) | Returns an array of the standard deviation of the values in all the given channels at each index of the input arrays. |
| StdDev(params double[]) | Returns the standard deviation value between all arguments. |
| StdDev(params double[][]) | Returns the standard deviation value between all arguments. |
StdDev(params DoubleChannel[] vector)
Returns the standard deviation value from the entire channel. If multiple channels are given, then the standard deviation of all channels combined is returned.
Parameters
params DoubleChannel[]vector The channels to take the standard deviation of.Returns
doubleThe standard deviation of the given channels.Examples
StdDev(TyreTempFL) = 5.6
StdDev(params DoubleChannel[][] vectors)
Returns an array of the standard deviation of the values in all the given channels at each index of the input arrays.
Parameters
params DoubleChannel[][]vectors One or more arrays of one or more channels to take the standard deviation of.Returns
double[]An array of numbers containing the standard deviation of each respective channel given.Examples
StdDev({TyreTempFL) = 5.6
StdDev(params double[] value)
Returns the standard deviation value between all arguments.
Parameters
params double[]value The values to take the standard deviation of.Returns
doubleThe standard deviation.Examples
StdDev(2,4,4,4,5,5,7,9) = 2
StdDev(params double[][] values)
Returns the standard deviation value between all arguments.
Parameters
params double[][]values One or more arrays of one or more values to take the standard deviation of.Returns
double[]An array of decimals equal to the length of the longest input array.
StdDevChannel
| StdDevChannel(DoubleChannel) | Returns a channel populated with the standard deviation of the channel. |
| StdDevChannel(DoubleChannel[]) | Returns an array of channels, each populated with the standard deviation from each of the input channels. |
| StdDevChannel(DoubleChannel, BooleanChannel) | Returns a channel populated with the standard deviation of the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed. |
| StdDevChannel(DoubleChannel[], BooleanChannel[]) | Returns an array of channels populated with the standard deviation of each of the input channels, the condition parameter allows a boolean channel to be used to control when the calculation is performed. |
| StdDevChannel(DoubleChannel, BooleanChannel, BooleanChannel) | Returns a channel populated with the standard deviation of the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation. |
| StdDevChannel(DoubleChannel[], BooleanChannel[], BooleanChannel[]) | Returns an array of channels populated with the standard deviation of each of the input channels, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation. |
StdDevChannel(DoubleChannel input)
Returns a channel populated with the standard deviation of the channel.
Parameters
DoubleChannelinput The channel to take the standard deviation of.Returns
DoubleChannelA channel populated with the standard deviation of the input channel.Examples
StdDevChannel(vGps)
StdDevChannel(DoubleChannel[] inputs)
Returns an array of channels, each populated with the standard deviation from each of the input channels.
Parameters
DoubleChannel[]inputs The array of channels to take the standard deviation of.Returns
DoubleChannel[]An array of channels containing the standard deviation of each respective channel given.
StdDevChannel(DoubleChannel input, BooleanChannel condition)
Returns a channel populated with the standard deviation of the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed.
Parameters
DoubleChannelinput The channel to take the standard deviation of.
BooleanChannelcondition The channel that determines when the value should be taken from input.Returns
DoubleChannelA channel populated with the standard deviation of the input channel.Examples
StdDevChannel(vGps, HighSpeedCornerGate)
StdDevChannel(DoubleChannel[] inputs, BooleanChannel[] conditions)
Returns an array of channels populated with the standard deviation of each of the input channels, the condition parameter allows a boolean channel to be used to control when the calculation is performed.
Parameters
DoubleChannel[]inputs The array of channels to take the standard deviation of.
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.Returns
DoubleChannel[]An array of channels containing the standard deviation of each respective channel given.
StdDevChannel(DoubleChannel input, BooleanChannel condition, BooleanChannel reset)
Returns a channel populated with the standard deviation of the channel, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation.
Parameters
DoubleChannelinput The channel to take the standard deviation of.
BooleanChannelcondition The channel that determines when the value should be taken from input.
BooleanChannelreset A boolean channel that when a true value is encountered, resets the computation.Returns
DoubleChannelA channel populated with the standard deviation of the input channel.Examples
StdDevChannel(vGps, HighSpeedCornerGate, StartEndHighSpeedCornerGate)
StdDevChannel(DoubleChannel[] inputs, BooleanChannel[] conditions, BooleanChannel[] resets)
Returns an array of channels populated with the standard deviation of each of the input channels, the condition parameter allows a boolean channel to be used to control when the calculation is performed, and the reset parameter can be used to reset the calculation.
Parameters
DoubleChannel[]inputs The array of channels to take the standard deviation of.
BooleanChannel[]conditions An array of channels, of the same length as input that determines what values should be considered from input.
BooleanChannel[]resets An array of boolean channels that, when a true value is encountered, resets the computation.Returns
DoubleChannel[]An array of channels containing the standard deviation of each respective channel given.
Sum
| Sum(params DoubleChannel[]) | Returns the sum of the values of a given channel. |
| Sum(params DoubleChannel[][]) | Returns an array of the sum of the values in all the given channels at each index of the input arrays. |
| Sum(params double[]) | Returns the sum of all values given. |
| Sum(params double[][]) | Returns an array of the sum of the values at each index of the input arrays. |
Sum(params DoubleChannel[] vector)
Returns the sum of the values of a given channel.
Parameters
params DoubleChannel[]vector The channels to sum.Returns
doubleThe sum of the channel given.Examples
Sum(Steering) = 5800
Sum(params DoubleChannel[][] vectors)
Returns an array of the sum of the values in all the given channels at each index of the input arrays.
Parameters
params DoubleChannel[][]vectors One or more arrays of one or more channels to sum.Returns
double[]An array of numbers containing the sum of each respective channel given.Examples
Sum({pBrakeF, pBrakeR}) = {8200, 6900} // An array of the total front brake pressure and total rear brake pressure over the lap.
Sum(params double[] value)
Returns the sum of all values given.
Parameters
params double[]value The values to sum.Returns
doubleThe sum.Examples
Sum(2,4,8) = 14
Sum(params double[][] values)
Returns an array of the sum of the values at each index of the input arrays.
Parameters
params double[][]values One or more arrays of numbers to sum.Returns
double[]An array of decimals equal to the length of the longest input array.Examples
Sum({3,1}, {0,2}, {5, 9}) = { 8, 12 } // { 3 + 0 + 5, 1 + 2 + 9 }
SumAll
| SumAll(DoubleChannel) | Returns the sum of all samples in the channel given. |
| SumAll(DoubleChannel[]) | Returns a single value that is the sum of all samples in all channels given. |
| SumAll(double) | Returns the sum of all values given. |
| SumAll(double[]) | Returns the sum of all values given. |
SumAll(DoubleChannel vector)
Returns the sum of all samples in the channel given.
Parameters
DoubleChannelvector The channel to sum.Returns
doubleThe sumExamples
SumAll(vCornerMin)
SumAll(DoubleChannel[] vectors)
Returns a single value that is the sum of all samples in all channels given.
Parameters
DoubleChannel[]vectors An array of channels to sum.Returns
doubleThe cumulative sum of each channel given.
SumAll(double value)
Returns the sum of all values given.
Parameters
doublevalue The number to sum.Returns
doubleThe number
SumAll(double[] values)
Returns the sum of all values given.
Parameters
double[]values An array of numbers to sumReturns
doubleThe sum
Tan
| Tan(DoubleChannel) | Returns a channel containing the tangents of all values in the original channel. |
| Tan(DoubleChannel[]) | Returns an array of channels containing the tangents of all values in each of the original channels. |
| Tan(double) | Returns the tangent of the specified number. |
Tan(DoubleChannel vector)
Returns a channel containing the tangents of all values in the original channel.
Parameters
DoubleChannelvector A channel.Returns
DoubleChannelA channel containing the tangent of each value.Examples
Tan(Steering)
Tan(DoubleChannel[] vectors)
Returns an array of channels containing the tangents of all values in each of the original channels.
Parameters
DoubleChannel[]vectors An array of channels.Returns
DoubleChannel[]An array of channels containing the tangents of each value from the channels given.
Tan(double value)
Returns the tangent of the specified number.
Parameters
doublevalue The value to take the tangent of.Returns
doubleThe tangent.Examples
Tan(0) = 0
TimeShift
| TimeShift(DoubleChannel, double) | Offsets a double channel by offset seconds. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left. |
| TimeShift(DoubleChannel[], double) | Returns a copy of each given channel offset by offset seconds. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left. |
| TimeShift(BooleanChannel, double) | Offsets a boolean channel by offset seconds. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left. |
| TimeShift(BooleanChannel[], double) | Returns a copy of each given channel offset by offset seconds. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left. |
TimeShift(DoubleChannel vector, double offset)
Offsets a double channel by offset seconds. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left.
Parameters
DoubleChannelvector The double channel to shift.
doubleoffset A decimal representing the number of seconds to shift by. A positive value shifts right, a negative value shifts left.Returns
DoubleChannelThe shifted double channel.Examples
TimeShift(Throttle Pos, 1.5) // shifts the channel 'Throttle Position' by 1.5 seconds to the right
TimeShift(DoubleChannel[] vectors, double offset)
Returns a copy of each given channel offset by offset seconds. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left.
Parameters
DoubleChannel[]vectors An array of double channels to shift.
doubleoffset A decimal representing the number of seconds to shift by. A positive value shifts right, a negative value shifts left.Returns
DoubleChannel[]An array of shifted double channels.
TimeShift(BooleanChannel vector, double offset)
Offsets a boolean channel by offset seconds. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left.
Parameters
BooleanChannelvector The boolean channel to shift.
doubleoffset A decimal representing the number of seconds to shift by. A positive value shifts right, a negative value shifts left.Returns
BooleanChannelThe shifted boolean channelExamples
TimeShift(Throttle Pos > 90, 1.5) // shifts the expression 'Throttle Position > 90' by 1.5 seconds to the right
TimeShift(BooleanChannel[] vectors, double offset)
Returns a copy of each given channel offset by offset seconds. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left.
Parameters
BooleanChannel[]vectors An array of boolean channels to shift.
doubleoffset A decimal representing the number of seconds to shift by. A positive value shifts right, a negative value shifts left.Returns
BooleanChannel[]An array of shifted boolean channels.
TimeShiftSamples
| TimeShiftSamples(DoubleChannel, double) | Offsets a channel of doubles by offset samples. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left. |
| TimeShiftSamples(DoubleChannel[], double) | Returns a copy of each given channel offset by offset samples. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left. |
| TimeShiftSamples(BooleanChannel, double) | Offsets a channel of booleans by offset samples. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left. |
| TimeShiftSamples(BooleanChannel[], double) | Returns a copy of each given channel offset by offset samples. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left. |
TimeShiftSamples(DoubleChannel vector, double offset)
Offsets a channel of doubles by offset samples. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left.
Parameters
DoubleChannelvector The double channel to shift.
doubleoffset The number of samples to shift by. A positive value shifts right, a negative value shifts left.Returns
DoubleChannelThe shifted double channel.Examples
TimeShift(Throttle Pos, 2) -> shifts the channel 'Throttle Position' by 2 samples to the right
TimeShiftSamples(DoubleChannel[] vectors, double offset)
Returns a copy of each given channel offset by offset samples. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left.
Parameters
DoubleChannel[]vectors An array of double channels to shift.
doubleoffset The number of samples to shift by. A positive value shifts right, a negative value shifts left.Returns
DoubleChannel[]An array of shifted double channels.
TimeShiftSamples(BooleanChannel vector, double offset)
Offsets a channel of booleans by offset samples. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left.
Parameters
BooleanChannelvector The boolean channel to shift.
doubleoffset The number of samples to shift by. A positive value shifts right, a negative value shifts left.Returns
BooleanChannelThe shifted boolean channel.Examples
TimeShift(Throttle Pos > 90, 2) -> shifts the expression 'Throttle Position > 90' by 2 samples to the right
TimeShiftSamples(BooleanChannel[] vectors, double offset)
Returns a copy of each given channel offset by offset samples. A positive offset means the values are getting shifted to the right, and a negative offset means they are getting shifted to the left.
Parameters
BooleanChannel[]vectors An array of boolean channels to shift.
doubleoffset The number of samples to shift by. A positive value shifts right, a negative value shifts left.Returns
BooleanChannel[]An array of shifted boolean channels.
UpSample
| UpSample(DoubleChannel, double) | Upsamples a channel to the defined frequency. Note that this function will return an error if the up sample frequency is less than the channel frequency or if the up sample frequency is not an integer multiple of the channel frequency. It is therefore recommended to use the ReSample function which will automatically handle these cases. |
| UpSample(DoubleChannel[], double) | Upsamples a number of channels to the defined frequency. |
UpSample(DoubleChannel vector, double value)
Upsamples a channel to the defined frequency. Note that this function will return an error if the up sample frequency is less than the channel frequency or if the up sample frequency is not an integer multiple of the channel frequency. It is therefore recommended to use the ReSample function which will automatically handle these cases.
Parameters
DoubleChannelvector The channel to upsample.
doublevalue The frequency to upsample to (Hz).Returns
DoubleChannelAn upsampled channelExamples
UpSample(vGPS, 200)
UpSample(DoubleChannel[] vectors, double value)
Upsamples a number of channels to the defined frequency.
Parameters
DoubleChannel[]vectors An array of channels to upsample.
doublevalue The frequency to upsample to (Hz).Returns
DoubleChannel[]An array of upsampled channels.Examples
UpSample({ vWheelFL, vWheelFR, vWheelRL, vWheelRR }, 200)
ValidFor
| ValidFor(BooleanChannel, double) | Returns a channel of boolean values. The result is true when the input data is valid for the time specified in the duration argument. |
| ValidFor(BooleanChannel[], double) | Returns an array of boolean channels. The result is true when the input data is valid for the time specified in the duration argument. |
ValidFor(BooleanChannel vector, double duration)
Returns a channel of boolean values. The result is true when the input data is valid for the time specified in the duration argument.
Parameters
BooleanChannelvector The boolean channel to test the validity of.
doubleduration The duration to check.Returns
BooleanChannelA channel of boolean values.Examples
ValidFor(vGPS > 100, 5)
ValidFor(BooleanChannel[] vectors, double duration)
Returns an array of boolean channels. The result is true when the input data is valid for the time specified in the duration argument.
Parameters
BooleanChannel[]vectors An array of boolean channels to test the validity of.
doubleduration The duration to check.Returns
BooleanChannel[]An array of boolean channels of the same size as the input.