Reference of functions and parameters of the virtual sensor

Last modified by Андрей Калиновский on 2023/04/25 15:23

Function or reserved parameterDescription
if(<condition>, <then>, <else>)if statement. When the condition specified by the logical expression <condition> is met, the <then> operator is executed, otherwise - <else>
timeDate and time (UTC)
tTime (UTC) in seconds
dateDate (UTC)
cdate(<time>, <time format>)The function of converting the time of the package recording (the date is converted from a textual representation to a date and time structure type); used when comparing dates and times. The <time format> parameter is case sensitive. Examples. if(date > cdate('2019-01-04', 'yyyy-MM-dd'), 1, 0) if(time > cdate('2019-01-04 05:30:00', 'yyyy-MM -dd HH:mm:ss'), 1, 0)
()Grouping Operators
*, /, %Operators for multiplication, division, getting the remainder of a division
+, -Addition Operators
, ==, !=,Comparison Operators
&&, andlogical AND
II, orLogical OR
!, notLogical NOT
Abs(х)Returns the absolute value of the number x
Acos(х)Returns the angle whose cosine is x
Asin(х)Returns the angle whose sine is x
Atan(х)Returns the angle whose tangent is x
Ceiling(х)Round up to whole number
Cos(х)Returns the cosine of angle x
exp(х)Returns the number e raised to the x power
Floor(х)Rounding down to the nearest integer
getbit(x,y)Returns the y-th bit of x
IEEERemainder(x,y)Remainder of x divided by y: The number equal to x - (y Q), where Q is the quotient of x / y rounded to the nearest integer (if x / y is equidistant from two integers, an even number is chosen). If x - ( y Q) is zero, +0 is returned if x is positive, or -0 if x is negative.
log(x,y)Logarithm of number x to base y
Log10(х)Decimal logarithm of x
max(x,y)Returns the greater of two specified numbers
min(x,y)Returns the smaller of two specified numbers
Pow(x,y)Raising a number x to the power y
Round(x,y)Rounds the decimal value x to the specified number of decimal places y; values ​​in the middle are rounded up to the nearest even number.
Sign(х)Returns an integer indicating the sign of the number x
Sin(х)Returns the sine of angle x
sqrt(х)Returns the square root of x
Tan(х)Returns the tangent of x
latReturns the latitude value
lonReturns the longitude value
speedReturns the value of the "Speed" parameter
sats

Returns the number of GPS satellites

glonassReturns the number of GLONASS satellites
sats+glonass

Returns the number of all satellites

prev(option)Calculates the value of an expression for the previous message in a set
unix(option)Converts the result of an expression whose type must be a timestamp to Unix time

Bitwise parameter control

The GLONASSSoft monitoring platform provides bit-by-bit parameter control, which implies the ability to control not the entire parameter as a whole, but a specific bit.

This is convenient if the device displays a lot of various data through one parameter: for example, the first bit displays the alarm status (on / off), the second - the driver's door status (open / closed), the third - the state of the headlights, etc. Thus, with the help of bit-by-bit parameter control, it is possible to create several different sensors based on one parameter, for example, with respect to UMK-3xx terminals, it is possible to control the ninth or fifteenth bit of the STATUS parameter (GNSS jamming detector or on/off PTT, respectively).

To do this, you need to create a virtual sensor with a link in the getbit(x,y) formula, where: x - a link to the sensor from whose parameter you want to get a bit; y - serial number of the desired bit, numbering starts from 0, where 0 is the least significant bit. The result of the function is the value of the bit with the number "y" (0 or 1).

For example, for UMKa3xx terminals, the STATUS field is displayed in decimal form at the input *A(100), GNSS signal suppression is the ninth bit.

1. Create a virtual sensor with the expression getbit(adc100,9).

image-20221007112742-1.jpeg

As a result, we will be able to observe the fact of GNSS jamming.

image-20221007112758-2.jpeg

image-20221007112813-3.jpeg

Tags:
   

Меню

GLONASSSoft wiki - 2023 г