<
From version < 24.1 >
edited by Андрей Калиновский
on 2022/10/07 11:39
To version < 26.1 >
edited by Андрей Калиновский
on 2023/04/25 15:22
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Справочник функций и параметров виртуального датчика
1 +Reference of functions and parameters of the virtual sensor
Content
... ... @@ -1,66 +1,66 @@
1 -|=Функция или зарезервированный параметр|=Описание
2 -|if(<condition>, <then>, <else>)|Оператор if. При выполнении условия, заданного логическим выражением <condition> выполняется оператор <then>, иначе - <else>
3 -|time|Дата и время (UTC)
4 -|t|Время (UTC) в секундах
5 -|date|Дата (UTC)
6 -|cdate(<время>, <формат времени>)|Функция конвертирования времени записи пакета (выполняется преобразование даты из текстового представления в тип структуры даты и времени); используется при сравнении дат и времени. Параметр <формат времени> зависим от регистра. Примеры. 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)
7 -|()|Операторы группировки
8 -|*, /, %|Операторы умножения, деления, получения остатка от деления
9 -|+, -|Операторы сложения
10 -|=, ==, ~!=,|Операторы сравнения
11 -|&&, and|Логическое И
12 -|II, or|Логическое ИЛИ
13 -|!, not|Логическое НЕ
14 -|Abs(х)|Возвращает абсолютное значение числа x
15 -|Acos(х)|Возвращает угол, косинус которого равен числу x
16 -|Asin(х)|Возвращает угол, синус которого равен числу x
17 -|Atan(х)|Возвращает угол, тангенс которого равен числу x
18 -|Ceiling(х)|Округление до целого вверх
19 -|Cos(х)|Возвращает косинус угла x
20 -|Exp(х)|Возвращает число e, возведенное в степень x
21 -|Floor(х)|Округление до целого вниз
22 -|Getbit(x,y)|Возвращает y-й бит числа x
23 -|IEEERemainder(x,y)|Остаток от деления x на y: Число, равное x (y Q), где Q является частным x / y, округленным до ближайшего целого числа (если x / y находится на равном расстоянии от двух целых чисел, выбирается четное число). Если значение x - ( y Q) равно нулю, возвращается значение +0 при положительном x, или значение -0 при отрицательном x.
24 -|Log(x,y)|Логарифм числа x по основанию y
25 -|Log10(х)|Десятичный логарифм числа x
26 -|Max(x,y)|Возвращает большее из двух указанных чисел
27 -|Min(x,y)|Возвращает меньшее из двух указанных чисел
28 -|Pow(x,y)|Возведение числа x в степень y
29 -|Round(x,y)|Округляет десятичное значение x до указанного числа знаков после запятой y; значения посередине округляются до ближайшего четного числа.
30 -|Sign(х)|Возвращает целое число, указывающее знак числа x
31 -|Sin(х)|Возвращает синус угла x
32 -|Sqrt(х)|Возвращает квадратный корень из числа x
33 -|Tan(х)|Возвращает тангенс угла x
34 -|lat|Возвращает значение широты
35 -|lоn|Возвращает значение долготы
36 -|speed|Возвращает значение параметра «Скорость»
1 +|=Function or reserved parameter|=Description
2 +|if(<condition>, <then>, <else>)|if statement. When the condition specified by the logical expression <condition> is met, the <then> operator is executed, otherwise - <else>
3 +|time|Date and time (UTC)
4 +|t|Time (UTC) in seconds
5 +|date|Date (UTC)
6 +|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)
7 +|()|Grouping Operators
8 +|*, /, %|Operators for multiplication, division, getting the remainder of a division
9 +|+, -|Addition Operators
10 +|=, ==, ~!=,|Comparison Operators
11 +|&&, and|logical AND
12 +|II, or|Logical OR
13 +|!, not|Logical NOT
14 +|Abs(x)|Returns the absolute value of the number x
15 +|Acos(x)|Returns the angle whose cosine is x
16 +|Asin(x)|Returns the angle whose sine is x
17 +|Atan(x)|Returns the angle whose tangent is x
18 +|Ceiling(x)|Round up to whole number
19 +|Cos(x)|Returns the cosine of angle x
20 +|exp(x)|Returns the number e raised to the x power
21 +|Floor(x)|Rounding down to the nearest integer
22 +|getbit(x,y)|Returns the y-th bit of x
23 +|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.
24 +|log(x,y)|Logarithm of number x to base y
25 +|Log10(x)|Decimal logarithm of x
26 +|max(x,y)|Returns the greater of two specified numbers
27 +|min(x,y)|Returns the smaller of two specified numbers
28 +|Pow(x,y)|Raising a number x to the power y
29 +|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.
30 +|Sign(x)|Returns an integer indicating the sign of the number x
31 +|Sin(x)|Returns the sine of angle x
32 +|sqrt(x)|Returns the square root of x
33 +|Tan(x)|Returns the tangent of x
34 +|lat|Returns the latitude value
35 +|lon|Returns the longitude value
36 +|speed|Returns the value of the "Speed" parameter
37 37  |sats|(((
38 -Возвращает количество спутников GPS
38 +Returns the number of GPS satellites
39 39  )))
40 -|glonass|Возвращает количество спутников GLONASS
40 +|glonass|Returns the number of GLONASS satellites
41 41  |sats+glonass|(((
42 -Возвращает количество всех спутников
42 +Returns the number of all satellites
43 43  )))
44 -|prev(параметр)|Вычисляет значение выражения для предыдущего сообщения в наборе
45 -|unix(параметр)|Преобразует результат выражения, тип которого должен быть временной меткой, в Unix-время
44 +|prev(option)|Calculates the value of an expression for the previous message in a set
45 +|unix(option)|Converts the result of an expression whose type must be a timestamp to Unix time
46 46  
47 47  === ===
48 48  
49 -=== Побитовый контроль параметра ===
49 +=== Bitwise parameter control ===
50 50  
51 -На платформе мониторинга ГЛОНАССSoft предусмотрен побитовый контроль параметра, который предполагает возможность контролировать не весь параметр в целом, а конкретный бит.
51 +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.
52 52  
53 -Это удобно, если устройство через один параметр показывает множество разнообразных данных: например, первый бит отображает состояние сигнализации (вкл/выкл), второй состояние водительской двери (открыта/закрыта), третий состояние фар и т.д. Таким образом, при помощи побитового контроля параметра можно на основе одного параметра создать несколько различных датчиков, например, применительно к терминалам УМКа3хх можно контролировать девятый или пятнадцатый бит параметра STATUS (детектор глушения GNSS или вкл/выкл тангенты соответственно).
53 +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).
54 54  
55 -Для этого необходимо создать виртуальный датчик с указанием ссылки в формуле getbit(x,y), где: x - ссылка на датчик из параметра которого требуется получить бит; y - порядковый номер нужного бита, нумерация начинается с 0, где 0 - младший бит. Результат функции - значение бита с номером «y» (0 или 1).
55 +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).
56 56  
57 -Например для терминалов УМКа3хх поле STATUS отображается в десятичном виде на входе *А(100), подавление сигнала GNSS - девятый бит.
57 +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.
58 58  
59 -~1. Создаем виртуальный датчик с выражением getbit(adc100,9).
59 +~1. Create a virtual sensor with the expression getbit(adc100,9).
60 60  
61 61  [[image:image-20221007112742-1.jpeg]]
62 62  
63 -В результате мы сможем наблюдать факт глушения GNSS.
63 +As a result, we will be able to observe the fact of GNSS jamming.
64 64  
65 65  
66 66  

Menu

GLONASSSoft wiki - 2023 г