Wiki source code of Analog FLS setting

Last modified by Андрей Калиновский on 2023/04/26 11:17

Show last authors
1 (% class="wikigeneratedid" id="H41D43044144244043E43943A43843443044244743843A43044344043E43243D44F44243E43F43B43843243043443B44F43E43144A43543A44243044143043D43043B43E43343E43244B43C43443044244743843A43E43C" %)
2 (((
3
4
5 {{video url="https://www.youtube.com/watch?v=0lT2iJJK0p0&list=PLnkd3b-WBcpHWYhylpHeysMaTpqLc4Tlm&index=6"/}}
6
7 A feature of analog sensors is that when the ignition is turned off and on, according to the parameter from which the readings are taken, messages with false data are received for several seconds until the desired value is reached. It is necessary to cut off the period with false data.
8
9 If data from an analog sensor is received by the parameter **in** * or **adc** *, where * is the input number, then you can use them directly. Otherwise, you must first create a sensor with the type **Simple** , sensor type **Arbitrary** , input type **Analog** . Specify the number of the input through which the data is received. We also specify an alias, in our case **fuel** .
10
11 [[image:image-20230425141934-1.png]]
12
13 When creating a fuel level sensor, we need to set its type ** **to **Virtual** , sensor type to **Fuel Level** , and function to **Expression** , which will allow us to enter **a Formula. ** Specify the type of calibration as **Table** .
14
15 [[image:image-20230425141938-2.png]]
16
17 The formula creates a function that checks for the presence of two conditions: the ignition is on and the speed is higher than the specified one. The function will cut off the period when false values ​​were received in the analog sensor. [[Feature Reference>>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/]] .
18
19 //if(ign and ((prev(speed)+speed)/2)>14,adc2,0)//
20
21 here **ign**  is the alias of the ignition sensor, **//((prev(speed)+speed)/2)>14//  - ** checking the condition that the average speed of the object between two messages is greater than 14 km/h. The average speed between messages is calculated to reduce the effect of speed fluctuations due to shielding while stationary. **adc2 is**  the parameter from which the values ​​of the fuel level sensor are read, earlier we created an arbitrary sensor with the alias **fuel** , which can be used in this formula instead of **adc2** . In this formula, you can change the speed, the higher, the more the vehicle needs to accelerate so that the data is not discarded.
22
23 We also enable **Median filtering** , which will allow us to smooth the graph and get fewer fuel surges. You can, as in the example, start with a value of 20, and change depending on how often false fuel surges occur.
24
25 After configuring the **fuel level** sensor , it is necessary to configure the **Filling**  and ** Draining** templates . They are located in the **Templates** tab .
26
27 In the **Filling ** and **Draining ** templates , the settings are the same. It is necessary to change the condition **Parameter value** , circled in blue, reduced to 1 s. Thus, the sensor will be more sensitive to vibrations. If any gas stations are not displayed, set the value to 0 sec or remove this condition.
28
29 [[image:image-20230425141943-3.png]]
30
31 We double-click on the parameter circled in red and **the Conditions for defining an event** window opens . Here we delete the event **Stop (150m)** . This change will allow tracking fillings and drains when **the Stop (150m)** event is inactive .
32
33 [[image:image-20230425141950-5.png]]
34
35
36 )))

Меню

GLONASSSoft wiki - 2023 г