# 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

`DoubleChannel`

A channel to take the absolute values of.vector

Returns

`DoubleChannel`

A 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[]`

An array of channel to take the absolute values of.vectors

Returns

`DoubleChannel[]`

An array of channels containing only positive decimals.

##### Abs(double value)

Returns the absolute value of the input.

Parameters

`double`

An array of positive decimals.value

Returns

`double`

A 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

`DoubleChannel`

A channel of numbers with values greater than or equal to -1, but less than or equal to 1.vector

Returns

`DoubleChannel`

A 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[]`

An array of channels with values greater than or equal to -1, but less than or equal to 1.vectors

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

`double`

A number representing a cosine, must be greater than or equal to -1, but less than or equal to 1.value

Returns

`double`

Returns 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

`DoubleChannel`

A channel of numbers with values greater than or equal to -1, but less than or equal to 1.vector

Returns

`DoubleChannel`

A 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[]`

An array of channels with values greater than or equal to -1, but less than or equal to 1.vectors

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

`double`

A number representing a sine, must be greater than or equal to -1, but less than or equal to 1.value

Returns

`double`

An 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

`DoubleChannel`

A channel of numbers.vector

Returns

`DoubleChannel`

A 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[]`

An array of channels.vectors

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

`double`

A number representing a tangent.value

Returns

`double`

An 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

`DoubleChannel`

A channel of numbers.vector

Returns

`double`

A 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[]`

An array of one or more channels.vectors

Returns

`double`

An array of numbers

##### AverageAll(double value)

Returns the value passed.

Parameters

`double`

A numbervalue

Returns

`double`

A 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[]`

An array of one or more numbers.values

Returns

`double`

An array of numbers

Examples`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

`DoubleChannel`

A double channel.vector

Returns

`double`

The 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[]`

An array of channels.vectors

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

`DoubleChannel`

A double channel.vector

`DoubleChannel`

A double channel.vector1

Returns

`DoubleChannel`

A 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[]`

An array of channels.vectors

`DoubleChannel[]`

An array of channels of the same length as the first parameter.vectors1

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

`double`

A numbervalue

`double`

A numbervalue1

Returns

`double`

The 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[]`

An array of numbersvalues

`double[]`

An array of numbersvalues1

Returns

`double`

A 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

`DoubleChannel`

A double channel.input

Returns

`DoubleChannel`

A 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[]`

An array of channels.inputs

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

`DoubleChannel`

A double channel.input

`BooleanChannel`

The channel that determines what values should be considered fromcondition.input

Returns

`DoubleChannel`

A 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[]`

An array of channels.inputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.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

`DoubleChannel`

A double channel.input

`BooleanChannel`

The channel that determines what values should be considered fromcondition.input

`BooleanChannel`

A boolean channel that when a true value is encountered, resets the computation.reset

Returns

`DoubleChannel`

A 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[]`

An array of channels.inputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.input

`BooleanChannel[]`

An array of boolean channels that, when a true value is encountered, resets the computation.resets

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 from each value in the input channel and returns the new channel of bits.shift |

BitDecode(DoubleChannel[], double) | Extracts the value of a certain bit defined by zero-based from each value in each input channel and returns an array of channels of the same length as the input.shift |

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 and shiftlength |

BitDecode(DoubleChannel[], double, double) | Extracts the value of certains bits defined by zero-based and shiftlength |

BitDecode(double, double, double) | Extracts the value of certains bits defined by zero-based and shiftlength |

##### 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

`DoubleChannel`

A channelvector

`double`

The number of bits to shift the input by.shift

Returns

`DoubleChannel`

A 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[]`

An array of channelsvectors

`double`

The number of bits to shift the input by.shift

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

`double`

The base value.value

`double`

The zero-based index of the bit to extract.shift

Returns

`double`

The value of a specific bit defined byshift

Examples`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

`DoubleChannel`

The the channel to take from.vector

`double`

The zero-based index of the first bit to takeshift

`double`

The number of bits to take from the right.length

Returns

`DoubleChannel`

A 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[]`

An array of channels to take from.vectors

`double`

The zero-based index of the first bit to takeshift

`double`

The number of bits to take from the right.length

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

`double`

A double.value

`double`

The zero-indexed first bit to take.value1

`double`

The number of bits to take, from the right.length

Returns

`double`

A 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

`DoubleChannel`

A channelvector

Returns

`DoubleChannel`

A 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[]`

An array of channelsvectors

Returns

`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

`double`

A doublevalue

Returns

`double`

The 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

`DoubleChannel`

A channel.vector

Returns

`double`

A 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[]`

An array of channels containing numerical datavectors

Returns

`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 if the condition is true, otherwise returns trueResult.falseResult |

##### Choose(bool condition, object trueResult, object falseResult)

Returns a channel with ** trueResult** if the condition is true, otherwise returns

**.**

*falseResult*

Parameters

`bool`

A boolean condition to evaluate.condition

`object`

The value to return iftrueResultevalutes tocondition.true

`object`

The value to return iffalseResultevalutes tocondition.false

Returns

`object`

EitherortrueResult.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

`DoubleChannel`

The channel to take the cosine of.vector

Returns

`DoubleChannel`

A 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[]`

An array of channels containing numerical datavectors

Returns

`DoubleChannel[]`

An array of channels of the same dimension as the input.

##### Cos(double value)

Returns the cosine of the value.

Parameters

`double`

The number to take the cosine of.value

Returns

`double`

The 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

`DoubleChannel`

A channel.vector

Returns

`double`

A 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[]`

An array of channels containing numerical datavectors

Returns

`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

`BooleanChannel`

A channel.vector

Returns

`double`

A single integer.

##### Count(BooleanChannel[] vectors)

Returns an array containing the number of points in each channel given.

Parameters

`BooleanChannel[]`

An array of channels containing boolean datavectors

Returns

`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

`DoubleChannel`

A channelvector

Returns

`double`

An 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[]`

An array of channels containing numerical datavectors

Returns

`double`

An 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

`double`

A single value.value

Returns

`double`

An integer

##### CountAll(double[] values)

Returns a single value that is the count of all elements in all arrays and channels given.

Parameters

`double[]`

An array of values to count.values

Returns

`double`

An 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

`DoubleChannel`

The channel to take the derivative of.vector

Returns

`DoubleChannel`

A channel

Examples`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[]`

An array of channels to take the derivative of.vectors

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

`BooleanChannel`

Channel to delay.vector

`double`

Amount of time to delay by (seconds).value

Returns

`BooleanChannel`

A 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[]`

An array of channels to delay.vectors

`double`

Amount of time to delay by (seconds).value

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

`BooleanChannel`

Channel to delay.vector

`double`

Amount of time to delay by (seconds).value

Returns

`BooleanChannel`

A 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[]`

An array of channels to delay.vectors

`double`

Amount of time to delay by (seconds).value

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

`DoubleChannel`

A channelvector

Returns

`DoubleChannel`

A 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[]`

An array of channels containing numerical datavectors

Returns

`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

`double`

A doublen

Returns

`double`

e raised to theth powern

Examples`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

`DoubleChannel`

A channelvector

Returns

`DoubleChannel`

A 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[]`

An array of channels containing numerical datavectors

Returns

`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

`DoubleChannel`

A double channel.vector

`double`

The value to filter on.value

Returns

`DoubleChannel`

The filtered double channel.

Examples`FilterLp(rpm, 2)`

##### FilterLp(DoubleChannel[] vectors, double value)

Applies a low pass (RC) filter to each input channel.

Parameters

`DoubleChannel[]`

An array of channels.vectors

`double`

The value to filter on.value

Returns

`DoubleChannel[]`

An array of filtered channels.

#### FlipFlop

FlipFlop(BooleanChannel, BooleanChannel) | Result becomes true when changes to true and false when vector changes to falsevector1 |

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

**changes to false**

*vector1*

Parameters

`BooleanChannel`

A boolean channel.vector

`BooleanChannel`

A boolean channel.vector1

Returns

`BooleanChannel`

A 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[]`

An array of channels containing boolean datavectors

`BooleanChannel[]`

An array of channels containing boolean datavectors1

Returns

`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

`DoubleChannel`

A double channel.vector

Returns

`DoubleChannel`

A 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[]`

An array of channels containing numerical datavectors

Returns

`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

`double`

A double.value

Returns

`double`

The 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 between the start- and end-coordinatesoutputChannel |

##### 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

`DoubleChannel`

A double channel.gpsLatChannel

`DoubleChannel`

A double channel.gpsLongChannel

`double`

A number, degrees of latitudestartLat

`double`

A number, degrees of longitude.startLong

`double`

A number, degrees of latitudeendLat

`double`

A number, degrees of longitude.endLong

Returns

`double`

A 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

`DoubleChannel`

A double channel.gpsLatChannel

`DoubleChannel`

A double channel.gpsLongChannel

`double[]`

Array of numbers, degrees of latitude.startLats

`double[]`

Array of numbers, degrees of longitude.startLongs

`double[]`

Array of numbers, degrees of latitude.endLats

`double[]`

Array of numbers, degrees of longitude.endLongs

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

`DoubleChannel`

A double channel.gpsLatChannel

`DoubleChannel`

A double channel.gpsLongChannel

`DoubleChannel`

A double channel.outputChannel

`double`

A number, degrees of latitudestartLat

`double`

A number, degrees of longitude.startLong

`double`

A number, degrees of longitude.endLat

`double`

Degree of longitude, or list of degrees.endLong

Returns

`DoubleChannel`

Values ofbetween the start- and end-coordinatesoutputChannel

Examples`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

`DoubleChannel`

A double channel.gpsLatChannel

`DoubleChannel`

A double channel.gpsLongChannel

`DoubleChannel`

A double channel.outputChannel

`double[]`

Array of numbers, degrees of latitude.startLats

`double[]`

Array of numbers, degrees of longitude.startLongs

`double[]`

Array of numbers, degrees of latitude.endLats

`double[]`

Array of numbers, degrees of longitude.endLongs

Returns

`DoubleChannel[]`

An array of the same length as the number of coordinate groupings, containing values ofbetween the start- and end-coordinatesoutputChannel

#### 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 is truecondition |

Integrate(DoubleChannel[], BooleanChannel[]) | Returns an array of channels populated with the average values from the channels, allows a boolean channel to be used to control when the calculation is performed.condition |

Integrate(DoubleChannel, BooleanChannel, BooleanChannel) | Returns a channel of the cumulative integral from the beginning of the channel when is true and resets whenever condition contains a true value.reset |

Integrate(DoubleChannel[], BooleanChannel[], BooleanChannel[]) | Returns an array of channels populated with the average values from the channels, allows a boolean channel to be used to control when the calculation is performed, and condition can be used to reset the calculation.reset |

##### Integrate(DoubleChannel input)

Returns a channel of the cumulative integral from the beginning of the channel.

Parameters

`DoubleChannel`

A double channel.input

Returns

`DoubleChannel`

A 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[]`

An array of channels containing numerical datainputs

Returns

`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

`DoubleChannel`

A double channel.input

`BooleanChannel`

The channel that determines when the values inconditionshould be considered.input

Returns

`DoubleChannel`

A channel of the cumulative integral from the beginning of the channel whenis true.condition

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[]`

An array of channels containing numerical datainputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.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

**contains a true value.**

*reset*

Parameters

`DoubleChannel`

A double channel.input

`BooleanChannel`

The channel that determines when the values inconditionshould be considered.input

`BooleanChannel`

A boolean channel that when areset`true`

value is encountered, resets the computation.

Returns

`DoubleChannel`

A channel of the cumulative integral from the beginning of the channel whenis true. Resets when acondition`true`

value is encountered in`reset`

.

##### 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

**can be used to reset the calculation.**

*reset*

Parameters

`DoubleChannel[]`

An array of channels containing numerical datainputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.input

`BooleanChannel[]`

An array of boolean channels that, when aresets`true`

value 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

`object`

A 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

`DoubleChannel`

A channelvector

Returns

`BooleanChannel`

A 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[]`

An array of channelsvectors

Returns

`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

`BooleanChannel`

A boolean channelvector

Returns

`BooleanChannel`

A 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[]`

An array of boolean channelsvectors

Returns

`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

`double`

A nullable numbervalue

Returns

`bool`

A boolean

Examples`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[]`

An array of nullable numbersvalues

Returns

`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

`bool`

A nullable booleanvalue

Returns

`bool`

A boolean

Examples`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[]`

An array of nullable booleansvalues

Returns

`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

`DoubleChannel`

A double channel.vector

Returns

`double`

A number, the last value in the channel.

Examples`Last(Integrate(Abs(LateralG)))`

##### Last(DoubleChannel[] vectors)

Returns the last value of the channel.

Parameters

`DoubleChannel[]`

An array of channels containing numerical datavectors

Returns

`double[]`

An array of numbers, the last value of each channel given.

##### Last(BooleanChannel vector)

Returns the last value of the boolean channel.

Parameters

`BooleanChannel`

A boolean channel.vector

Returns

`bool`

A boolean, the last value in the channel.

##### Last(BooleanChannel[] vectors)

Returns the last value of the boolean channel.

Parameters

`BooleanChannel[]`

An array of channels containing boolean datavectors

Returns

`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

`DoubleChannel`

A double channel.input

Returns

`DoubleChannel`

A 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[]`

An array of channels containing numerical datainputs

Returns

`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

`DoubleChannel`

A double channel.input

`BooleanChannel`

The channel that determines when the value should be taken fromcondition.input

Returns

`DoubleChannel`

A double channel containing the value fromwhen the lastinput`true`

value inis encountered.condition

Examples`LastChannel(vGps, HighSpeedCornerGate)`

##### LastChannel(DoubleChannel[] inputs, BooleanChannel[] conditions)

Parameters

`DoubleChannel[]`

An array of channels containing numerical datainputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.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

`DoubleChannel`

A double channel.input

`BooleanChannel`

The channel that determines when the value should be taken fromcondition.input

`BooleanChannel`

A boolean channel that when a true value is encountered, resets the computation.reset

Returns

`DoubleChannel`

A double channel containing the value fromwhen the lastinput`true`

value inis encountered. Resets when acondition`true`

value is encountered in`reset`

.

Examples`LastChannel(vGps, HighSpeedCornerGate, StartEndHighSpeedCornerGate)`

##### LastChannel(DoubleChannel[] inputs, BooleanChannel[] conditions, BooleanChannel[] resets)

Parameters

`DoubleChannel[]`

An array of channels containing numerical datainputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.input

`BooleanChannel[]`

An array of boolean channels that, when a true value is encountered, resets the computation.resets

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

`DoubleChannel`

A channelvector

`DoubleChannel`

A channelvector1

Returns

`double`

The 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[]`

An array of channels containing numerical datavectors

`DoubleChannel[]`

An array of channels containing numerical datavectors1

Returns

`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

`DoubleChannel`

A channelvector

`DoubleChannel`

A channelvector1

Returns

`double`

A 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[]`

An array of channels containing numerical datavectors

`DoubleChannel[]`

An array of channels containing numerical datavectors1

Returns

`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[]`

The channels to evaluate.vector

Returns

`double`

A decimal

Examples`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[][]`

One or more arrays of one or more channels to compare.vectors

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[]`

The values to evaluate.value

Returns

`double`

The 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[][]`

One or more arrays of numbers to compare.values

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 channel for each.condition |

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 and condition channels for each.reset |

##### MaxChannel(DoubleChannel input)

Returns a channel populated with the maximum value from the channel.

Parameters

`DoubleChannel`

A double channel.input

Returns

`DoubleChannel`

A 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[]`

An array of channels containing numerical datainputs

Returns

`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

`DoubleChannel`

A double channel.input

`BooleanChannel`

The channel that determines what values should be considered fromcondition.input

Returns

`DoubleChannel`

A 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[]`

An array of channels containing numerical datainputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.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

`DoubleChannel`

A double channel.input

`BooleanChannel`

The channel that determines what values should be considered fromcondition.input

`BooleanChannel`

A boolean channel that determines when the computation should be reset.reset

Returns

`DoubleChannel`

A 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

**channels for each.**

*reset*

Parameters

`DoubleChannel[]`

An array of channels containing numerical datainputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.input

`BooleanChannel[]`

An array of boolean channels that, when a true value is encountered, resets the computation.resets

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[]`

The channels to evaluate.vector

Returns

`double`

A decimal

Examples`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[][]`

One or more arrays of one or more channels to compare.vectors

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[]`

The values to evaluate.value

Returns

`double`

A 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[][]`

One or more arrays of numbers to compare.values

Returns

`double[]`

An array of numbers

Examples`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[]`

The channels to evaluate.vector

Returns

`double`

A decimal

Examples`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[][]`

One or more arrays of one or more channels to compare.vectors

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[]`

The values to evaluate.value

Returns

`double`

The 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[][]`

One or more arrays of numbers to compare.values

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(double) | Returns a channel populated with the minimum value from the channel. |

MinChannel(double) | 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 channel for each.condition |

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 and condition channels for each.reset |

##### MinChannel(double input)

Returns a channel populated with the minimum value from the channel.

Parameters

`double`

A double channel.input

Returns

`DoubleChannel`

A channel populated with the minimum value from the input channel.

Examples`MinChannel(vGps,)`

##### MinChannel(double input)

Returns an array containing the minimum value from each channel given.

Parameters

`double`

A double channel.input

Returns

`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

`DoubleChannel`

A double channel.input

`BooleanChannel`

The channel that determines what values should be considered fromcondition.input

Returns

`DoubleChannel`

A 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[]`

An array of channels containing numerical datainputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.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

`DoubleChannel`

A double channel.input

`BooleanChannel`

A boolean channel that determines what values should be considered fromcondition.input

`BooleanChannel`

A boolean channel that determines when the computation should be reset.reset

Returns

`DoubleChannel`

A 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

**channels for each.**

*reset*

Parameters

`DoubleChannel[]`

An array of channels containing numerical datainputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.input

`BooleanChannel[]`

An array of boolean channels that, when a true value is encountered, resets the computation.resets

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

`DoubleChannel`

A double channeldividend

`double`

A double.divisor

Returns

`DoubleChannel`

A 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[]`

An array of channels containing numerical datadividends

`double`

A double.divisor

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

`double`

A doubledividend

`double`

A doubledivisor

Returns

`double`

An 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

`DoubleChannel`

A channelvector

`double`

A number, the percentile to take.k

Returns

`double`

The 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[]`

An array of channels containing numerical datavectors

`double`

A number, the percentile to take.k

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 powered to the base.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

`DoubleChannel`

A channelbases

`double`

A double.exponent

Returns

`DoubleChannel`

A 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[]`

An array of channels containing numerical databases

`double`

A double.exponent

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

`double`

The base.base

`double`

The exponent.exponent

Returns

`double`

A double.

Examples`Pow(2,3) = 8`

#### 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

`DoubleChannel`

A channel.vector

Returns

`DoubleChannel`

A 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[]`

An array of channels containing numerical datavectors

Returns

`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

`DoubleChannel`

The channel to round.vector

`double`

The number of fractional digits to round to.value

Returns

`DoubleChannel`

A 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[]`

An array of channels to round.vectors

`double`

The number of fractional digits to round to.value

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

`double`

The value to round.value

`double`

The number of fractional digits to round to.value1

Returns

`double`

The rounded value.

Examples`Round(3 / 2, 1) = 1.5`

##### Round(DoubleChannel vector)

Returns a channel with each value rounded to the nearest integer.

Parameters

`DoubleChannel`

The channel to round.vector

Returns

`DoubleChannel`

A 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[]`

An array of channels to round.vectors

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

`double`

A double value.value

Returns

`double`

An 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

`DoubleChannel`

A channel.vector

Returns

`DoubleChannel`

A channel containing integers 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[]`

An array of channels containing numerical datavectors

Returns

`DoubleChannel[]`

An array of channels containing integers 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

`double`

The numerical value to determine the sign of.value

Returns

`double`

An integer 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

`DoubleChannel`

The channel to take the sine of.vector

Returns

`DoubleChannel`

A 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[]`

An array of channels to take the sine of.vectors

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

`double`

The value to take the sine of.value

Returns

`double`

The 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

`DoubleChannel`

The channel to smooth.vector

Returns

`DoubleChannel`

The 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[]`

An array of channels to smooth.vectors

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

`DoubleChannel`

The channel to smooth.vector

`double`

The window size to use (seconds).windowSize

Returns

`DoubleChannel`

A 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[]`

An array of channels to smooth.vectors

`double`

The window size to use (seconds).windowSize

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

`DoubleChannel`

The channel to take the square root of.vector

Returns

`DoubleChannel`

A 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[]`

An array of channels to take the square root of.vectors

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

`double`

The number whose square root is to be found.value

Returns

`double`

The 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

`DoubleChannel`

The channel to take the first value of.vector

Returns

`double`

A 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[]`

An array of channels to take the first values of.vectors

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

`BooleanChannel`

The channel to take the first value of.vector

Returns

`bool`

A 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[]`

An array of channels to take the first values of.vectors

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 parameter allows a boolean channel to be used to control when the calculation is performed.condition |

StartChannel(DoubleChannel[], BooleanChannel[]) | Returns an array of channels, each populated with the value from when the first input`true` value in is encountered.condition |

StartChannel(DoubleChannel, BooleanChannel, BooleanChannel) | Returns a channel populated with the first value from the channel, the parameter allows a boolean channel to be used to control when the calculation is performed, and the condition parameter can be used to reset the calculation.reset |

StartChannel(DoubleChannel[], BooleanChannel[], BooleanChannel[]) | Returns an array of channels, each populated with the value from when the first input`true` value in is encountered. Resets when a condition`true` value is encountered in `reset` . |

##### StartChannel(DoubleChannel input)

Returns a channel populated with the first value from the channel.

Parameters

`DoubleChannel`

A double channel.input

Returns

`DoubleChannel`

A 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[]`

An array of double channels.inputs

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

`DoubleChannel`

The double channel to copy the value from.input

`BooleanChannel`

The channel that determines when the value should be taken fromcondition.input

Returns

`DoubleChannel`

A double channel containing the value fromwhen the firstinput`true`

value inis encountered.condition

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 **is encountered.**

*condition*

Parameters

`DoubleChannel[]`

An array of channels containing numerical datainputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.input

Returns

`DoubleChannel[]`

An array of channels, each populated with the value fromwhen the firstinput`true`

value inis encountered.condition

##### 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

**parameter can be used to reset the calculation.**

*reset*

Parameters

`DoubleChannel`

The double channel to copy the value from.input

`BooleanChannel`

The channel that determines when the value should be taken fromcondition.input

`BooleanChannel`

A boolean channel that when a true value is encountered, resets the computation.reset

Returns

`DoubleChannel`

A double channel containing the value fromwhen the firstinput`true`

value inis encountered. Resets when acondition`true`

value is encountered in`reset`

.

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 **is encountered. Resets when a**

*condition*`true`

value is encountered in `reset`

.

Parameters

`DoubleChannel[]`

An array of channels containing numerical datainputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.input

`BooleanChannel[]`

An array of boolean channels that, when a true value is encountered, resets the computation.resets

Returns

`DoubleChannel[]`

An array of channels, each populated with the value fromwhen the firstinput`true`

value inis encountered. Resets when acondition`true`

value is encountered in`reset`

.

#### 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[]`

The channels to take the standard deviation of.vector

Returns

`double`

The 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[][]`

One or more arrays of one or more channels to take the standard deviation of.vectors

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[]`

The values to take the standard deviation of.value

Returns

`double`

The 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[][]`

One or more arrays of one or more values to take the standard deviation of.values

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 parameter allows a boolean channel to be used to control when the calculation is performed.condition |

StdDevChannel(DoubleChannel[], BooleanChannel[]) | Returns an array of channels populated with the standard deviation of each of the input channels, the parameter allows a boolean channel to be used to control when the calculation is performed.condition |

StdDevChannel(DoubleChannel, BooleanChannel, BooleanChannel) | Returns a channel populated with the standard deviation of the channel, the parameter allows a boolean channel to be used to control when the calculation is performed, and the condition parameter can be used to reset the calculation.reset |

StdDevChannel(DoubleChannel[], BooleanChannel[], BooleanChannel[]) | Returns an array of channels populated with the standard deviation of each of the input channels, the parameter allows a boolean channel to be used to control when the calculation is performed, and the condition parameter can be used to reset the calculation.reset |

##### StdDevChannel(DoubleChannel input)

Returns a channel populated with the standard deviation of the channel.

Parameters

`DoubleChannel`

The channel to take the standard deviation of.input

Returns

`DoubleChannel`

A 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[]`

The array of channels to take the standard deviation of.inputs

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

`DoubleChannel`

The channel to take the standard deviation of.input

`BooleanChannel`

The channel that determines when the value should be taken fromcondition.input

Returns

`DoubleChannel`

A 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[]`

The array of channels to take the standard deviation of.inputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.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

**parameter can be used to reset the calculation.**

*reset*

Parameters

`DoubleChannel`

The channel to take the standard deviation of.input

`BooleanChannel`

The channel that determines when the value should be taken fromcondition.input

`BooleanChannel`

A boolean channel that when a true value is encountered, resets the computation.reset

Returns

`DoubleChannel`

A 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

**parameter can be used to reset the calculation.**

*reset*

Parameters

`DoubleChannel[]`

The array of channels to take the standard deviation of.inputs

`BooleanChannel[]`

An array of channels, of the same length asconditionsthat determines what values should be considered frominput.input

`BooleanChannel[]`

An array of boolean channels that, when a true value is encountered, resets the computation.resets

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[]`

The channels to sum.vector

Returns

`double`

The 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[][]`

One or more arrays of one or more channels to sum.vectors

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[]`

The values to sum.value

Returns

`double`

The 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[][]`

One or more arrays of numbers to sum.values

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

`DoubleChannel`

The channel to sum.vector

Returns

`double`

The sum

Examples`SumAll(vCornerMin)`

##### SumAll(DoubleChannel[] vectors)

Returns a single value that is the sum of all samples in all channels given.

Parameters

`DoubleChannel[]`

An array of channels to sum.vectors

Returns

`double`

The cumulative sum of each channel given.

##### SumAll(double value)

Returns the sum of all values given.

Parameters

`double`

The number to sum.value

Returns

`double`

The number

##### SumAll(double[] values)

Returns the sum of all values given.

Parameters

`double[]`

An array of numbers to sumvalues

Returns

`double`

The 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

`DoubleChannel`

A channel.vector

Returns

`DoubleChannel`

A 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[]`

An array of channels.vectors

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

`double`

The value to take the tangent of.value

Returns

`double`

The tangent.

Examples`Tan(0) = 0`

#### TimeShift

TimeShift(DoubleChannel, double) | Offsets a double channel by 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.offset |

TimeShift(DoubleChannel[], double) | Returns a copy of each given channel offset by 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.offset |

TimeShift(BooleanChannel, double) | Offsets a boolean channel by 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.offset |

TimeShift(BooleanChannel[], double) | Returns a copy of each given channel offset by 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.offset |

##### TimeShift(DoubleChannel vector, double offset)

Offsets a double channel by ** offset** seconds. A positive

**means the values are getting shifted to the right, and a negative**

*offset***means they are getting shifted to the left.**

*offset*

Parameters

`DoubleChannel`

The double channel to shift.vector

`double`

A decimal representing the number of seconds to shift by. A positive value shifts right, a negative value shifts left.offset

Returns

`DoubleChannel`

The 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

**means the values are getting shifted to the right, and a negative**

*offset***means they are getting shifted to the left.**

*offset*

Parameters

`DoubleChannel[]`

An array of double channels to shift.vectors

`double`

A decimal representing the number of seconds to shift by. A positive value shifts right, a negative value shifts left.offset

Returns

`DoubleChannel[]`

An array of shifted double channels.

##### TimeShift(BooleanChannel vector, double offset)

Offsets a boolean channel by ** offset** seconds. A positive

**means the values are getting shifted to the right, and a negative**

*offset***means they are getting shifted to the left.**

*offset*

Parameters

`BooleanChannel`

The boolean channel to shift.vector

`double`

A decimal representing the number of seconds to shift by. A positive value shifts right, a negative value shifts left.offset

Returns

`BooleanChannel`

The shifted boolean channel

Examples`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

**means the values are getting shifted to the right, and a negative**

*offset***means they are getting shifted to the left.**

*offset*

Parameters

`BooleanChannel[]`

An array of boolean channels to shift.vectors

`double`

offset

Returns

`BooleanChannel[]`

An array of shifted boolean channels.

#### TimeShiftSamples

TimeShiftSamples(DoubleChannel, double) | Offsets a channel of doubles by 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.offset |

TimeShiftSamples(DoubleChannel[], double) | Returns a copy of each given channel offset by 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.offset |

TimeShiftSamples(BooleanChannel, double) | Offsets a channel of booleans by 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.offset |

TimeShiftSamples(BooleanChannel[], double) | Returns a copy of each given channel offset by 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.offset |

##### 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

`DoubleChannel`

The double channel to shift.vector

`double`

The number of samples to shift by. A positive value shifts right, a negative value shifts left.offset

Returns

`DoubleChannel`

The 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[]`

An array of double channels to shift.vectors

`double`

The number of samples to shift by. A positive value shifts right, a negative value shifts left.offset

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

`BooleanChannel`

The boolean channel to shift.vector

`double`

The number of samples to shift by. A positive value shifts right, a negative value shifts left.offset

Returns

`BooleanChannel`

The 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[]`

An array of boolean channels to shift.vectors

`double`

offset

Returns

`BooleanChannel[]`

An array of shifted boolean channels.

#### UpSample

UpSample(DoubleChannel, double) | Upsamples a channel to the defined frequency. |

UpSample(DoubleChannel[], double) | Upsamples a number of channels to the defined frequency. |

##### UpSample(DoubleChannel vector, double value)

Upsamples a channel to the defined frequency.

Parameters

`DoubleChannel`

The channel to upsample.vector

`double`

The frequency to upsample to (Hz).value

Returns

`DoubleChannel`

An upsampled channel

Examples`UpSample(vGPS, 200)`

##### UpSample(DoubleChannel[] vectors, double value)

Upsamples a number of channels to the defined frequency.

Parameters

`DoubleChannel[]`

An array of channels to upsample.vectors

`double`

The frequency to upsample to (Hz).value

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

`BooleanChannel`

The boolean channel to test the validity of.vector

`double`

The duration to check.duration

Returns

`BooleanChannel`

A 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[]`

An array of boolean channels to test the validity of.vectors

`double`

The duration to check.duration

Returns

`BooleanChannel[]`

An array of boolean channels of the same size as the input.