When using the filtration, make sure to:
- enable the Calculate data in reports by the sensor option in the sensor properties;
- select Median filtration or Adaptive median filtration for the Filtration type option.
Filtering should be used when it is necessary to remove erroneous values, significantly larger or smaller than the remaining values. During filtering, median smoothing is used.
Adaptive median filtration
When adaptive median filtration is selected, the algorithm automatically adjusts the filtration level. It automatically selects a suitable value based on the unit data. The algorithm smoothes small random fluctuations in fuel level without affecting significant variations. This allows detecting fuel fillings and potential drains more efficiently and determining their volume more accurately.
Median filtration
When simple median filtration is selected, the user should specify the filtration level themselves. Typically, values from 0 to 5 are used. The value 0 doesn't mean zero filtering, but the minimum possible filtering for three messages since this is the minimum amount of data required for median smoothing.
In other cases, the number of messages on the basis of which smoothing should be carried out is calculated as follows:
- if the field value is an odd number from 1 to 255, it is multiplied by 5;
- if the value is an even number from 2 to 254, it is multiplied by 5, and 1 is subtracted from the result.
If the filtration level is too high, the data may be distorted. Therefore, we don’t recommend specifying a value higher than 8.
To disable the filtration completely, select None for the Filtration type option.
The images below show fuel level charts with median filtration turned off and on.