SView math functions

Locked
pat
Syvecs Staff - Cleaner
Posts: 356
Joined: Fri May 23, 2008 10:23 am
Location: Out there... somewhere
Contact:

SView math functions

Post by pat »

In addition to being able to display the logged data, SView is able to display math channels, pseudo data channels which are the result of some mathematical functions applied to zero or more logged channels. While simple maths functions are self explanatory, there is no list of functions in the online help, so listed below are those functions and operators that SView understands :

Functions

floor(val) - Rounds val down to the nearest integer
ceil(val) - Rounds val up to the nearest integer
round(val) - Rounds val to the nearest integer
sin(val) - Returns the sine of val (where val is in radians)
cos(val) - Returns the cosine of val (where val is in radians)
tan(val) - Returns the tangent of val (where val is in radians)
pow(x, y) - Raises x to the power y
filter(val, constant) - Recursively filters val, 0<=constant<=1, 0=no filtering, 1=infinite filtering
cfilter(condition, val, constant) - Same as filter() but only when condition is met
cfilter2(condition, val, min, max, constant) - Same as filter() but only when condition is met
derivative(val) - Differentiates val w.r.t time
integral(val) - Integrates val w.r.t time
min(val, samples) - Minimum value of val within a window of samples. 0<samples<16.
max(val, samples) - Maximum value of val within a window of samples. 0<samples<16.
runavg(val, samples) - Running average value of val within a window of samples. 0<samples<16.

Operators

+ Plus
- Minus
* Multiply
/ Divide
% Modulus
<< Logical shift left
>> Logical shift right
< Less than
<= Less than or equal to
> Greater than
>= Greater than or equal to
== Equal
!= Not equal
~ Bitwise NOT
& Bitwise AND
^ Bitwise XOR
| Bitwise OR
! Logical NOT
&& Logical AND
|| Logical OR
? : If Then

Hope this sheds a little light on the obscure subject of what the math channels can actually do!
Locked