When using the filtering, make sure to:
- enable the Calculate data by the sensor option in the sensor properties;
- select Median filtering or Adaptive median filtering for the Filtering 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 filtering
When adaptive median filtering is selected, the algorithm automatically adjusts the filtering 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 filtering
When simple median filtering is selected, the user should specify the filtering level themselves. 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 filtering level is too high, the data may be distorted. Therefore, we don’t recommend specifying a value higher than 10.
To disable filtering completely, select None for the Filtering type option.
The images below show fuel level charts with median filtering turned off and on.