Relative engine hours
Sensor type Relative engine hours allows you to calculate the time of the engine in relation to its revolutions.
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 .
Engine speed
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 .
Hour factor
To calculate the coefficient of engine hours, a sensor is created with the Virtual type, Arbitrary sensor type , Expression function , Table calibration type .
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 .
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.
Relative engine hours
To create a sensor, you must specify its type as Virtual , sensor type Relative engine hours , Expression function , leave the calibration type as Default .
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 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.