Wiki source code of Relative engine hours

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

Show last authors
1 Sensor type **Relative engine hours** allows you to calculate the time of the engine in relation to its revolutions.
2
3 To create a relative engine hours sensor, we first need to create a sensor with the **Engine RPM** type and a sensor that calculates **Engine hours coefficient** .
4
5 ==== **Engine speed** ====
6
7 To create a sensor, you need to specify the type **Simple** , the sensor type **Engine speed** , specify the type and number of the input from which the engine speed values ​​come from, and set an alias. In our example, the alias is specified as  **mh** .
8
9 [[image:image-20230425144047-1.png]]
10
11 ==== **Hour factor** ====
12
13 To calculate the coefficient of engine hours, a sensor is created with the **Virtual type, Arbitrary** sensor type , **Expression** function , **Table** calibration type .
14
15 [[image:image-20230425144054-2.png]]
16
17 The formula contains the following expression:  //(prev(mh)+mh)/2// , where //prev()// is a function that allows you to access the previous message, //mh//  is an alias for the engine speed sensor. This formula allows you to calculate the average value of the engine revolution between the last two messages. Thus, jumps in engine speed at the time the message was created are leveled. We set an alias, in our case  **koef** .
18
19 After we create a calibration that will allow us to correlate the value of engine speed obtained from the formula with the value of the coefficient.
20
21 [[image:image-20230425144100-3.png]]
22
23 ==== **Relative engine hours** ====
24
25 To create a sensor, you must specify its type as  **Virtual** , sensor type ** Relative engine hours , Expression** function , leave the calibration type **as Default** .
26
27 [[image:image-20230425144104-4.png]]
28
29 Specify the following expression in the formula:  //if(unix(prev(time))=0, 0, (unix(time)-unix(prev(time~)~)~)*koef) , where// if //( , , )// , //unix()// , //prev ()// - functions described in [[this>>url:https://wiki.glonasssoft.ru/bin/view/%D0%9F%D0%B0%D0%BD%D0%B5%D0%BB%D1%8C%20%D1%83%D0%BF%D1%80%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F/%D0%9E%D1%81%D0%BD%D0%BE%D0%B2%D0%BD%D1%8B%D0%B5%20%D1%81%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA%D0%B8/%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA%20%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B9%20%D0%B8%20%D0%BF%D0%B0%D1%80%D0%B0%D0%BC%D0%B5%D1%82%D1%80%D0%BE%D0%B2%20%D0%B2%D0%B8%D1%80%D1%82%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D0%B3%D0%BE%20%D0%B4%D0%B0%D1%82%D1%87%D0%B8%D0%BA%D0%B0/#]] article. //time// - message creation time,  //koef//  - sensor alias **Engine hour factor** . The formula calculates the time between messages, to which the engine hour factor is applied. As a result, we obtain the value of engine hours, taking into account the height of the engine speed.

Меню

GLONASSSoft wiki - 2023 г