Changes for page Reference of functions and parameters of the virtual sensor
Last modified by Андрей Калиновский on 2023/04/25 15:23
<
>
edited by Андрей Калиновский
on 2022/10/07 11:39
on 2022/10/07 11:39
edited by Андрей Калиновский
on 2023/04/25 15:22
on 2023/04/25 15:22
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
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( х)|Возвращаетабсолютноезначениечислаx15 -|Acos( х)|Возвращаетугол,косинускоторогоравенчислуx16 -|Asin( х)|Возвращаетугол,синускоторогоравенчислуx17 -|Atan( х)|Возвращаетугол,тангенскоторогоравенчислуx18 -|Ceiling( х)|Округлениедоцелоговверх19 -|Cos( х)|Возвращаеткосинусуглаx20 -| Exp(х)|Возвращаетчислоe,возведенноевстепеньx21 -|Floor( х)|Округлениедоцелоговниз22 -| Getbit(x,y)|Возвращаетy-йбитчислаx23 -|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пооснованиюy25 -|Log10( х)|Десятичныйлогарифмчислаx26 -| Max(x,y)|Возвращаетбольшееиздвухуказанныхчисел27 -| Min(x,y)|Возвращаетменьшееиздвухуказанныхчисел28 -|Pow(x,y)| Возведениечислаxвстепеньy29 -|Round(x,y)| Округляетдесятичноезначениеxдоуказанногочислазнаковпослезапятойy;значенияпосерединеокругляютсядоближайшегочетногочисла.30 -|Sign( х)|Возвращаетцелоечисло,указывающеезнакчислаx31 -|Sin( х)|Возвращаетсинусуглаx32 -| Sqrt(х)|Возвращаетквадратныйкореньизчислаx33 -|Tan( х)|Возвращаеттангенсуглаx34 -|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 - ВозвращаетколичествоспутниковGPS38 +Returns the number of GPS satellites 39 39 ))) 40 -|glonass| ВозвращаетколичествоспутниковGLONASS40 +|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