Home / Blog / Car Mileage: Why Do GLONASS and Odometer Differ? Part 6. Comparison and Conclusions

Car Mileage: Why Do GLONASS and Odometer Differ? Part 6. Comparison and Conclusions

We have reached the final part of the article series, which examined aspects of calculating the mileage of a vehicle using data from satellite systems and a standard odometer.

Car Mileage: Why Do GLONASS and Odometer Differ? Part 6. Comparison and Conclusions

The purpose of this series was to study the reasons for the discrepancy between the mileage recorded by the odometer and satellite navigation, as well as to propose methods for correcting the data to improve the accuracy of measurements. 

In previous publications, we looked at the key factors affecting the accuracy of measurements: the condition of the vehicle and its operating conditions, altitude above sea level, the quality of navigation equipment and the processing of the obtained data. Now it’s time to move on to the final comparison – mileage according to GNSS data versus mileage obtained from the standard odometer via the car’s CAN bus.

The final part of the cycle will allow you to form a holistic understanding of the use of mileage values ​​obtained in various ways in transport monitoring tasks.

Key takeaways from previous publications:

  • Part 1.  Discrepancies between mileage indicated by the odometer and satellite navigation are due to differences in the principles of measurement and their accuracy.
  • Part 2.  To compare the mileage using satellites and the odometer, it is necessary to take into account the availability of data and its quality, as well as the influence of various external factors.
  • Part 3.  Taking into account the altitude above sea level affects the accuracy of the calculation of the mileage using satellites, since ignoring vertical movements leads to errors in comparison with the odometer data.
  • Part 4.  The accuracy of calculations in satellite navigation depends on the quality of data and algorithms for their processing, but the combined use of GNSS, inertial sensors and CAN bus allows for minimizing errors and increasing the reliability of transport monitoring systems.
  • Part 5.  The quality of satellite navigation data, determined by the number of visible satellites, their position (HDOP) and validation algorithms, has a significant impact on the accuracy of mileage calculations, and track analysis and software processing are required to minimize errors.

In this article, we will compare the mileage obtained from the standard odometer via the CAN bus with the mileage calculated using satellite navigation, taking into account everything said above. First, let’s recall the methods for calculating mileage. In previous articles, we used the built-in functions of the PostGIS extension for the PostgreSQL RDBMS, namely:

  • ST_Distance is a function for calculating the minimum distance, which works with both the geometry and geography types. For geometry, it returns the Cartesian distance in the specified projection units, for geography, it returns the minimum geodetic distance in meters. Depending on the use_spheroid flag, the following is used:
    • ST_DistanceSpheroid – a spheroid defined in the specified SRID. The distance is calculated more precisely.
    • ST_DistanceSphere – sphere and radius derived from the spheroid defined by the SRID. Distance is calculated faster but less accurately.
  • ST_3DDistance – function for calculating the minimum three-dimensional Cartesian distance in projection units, but works only with the geometry type. Allows you to take into account the 3rd component of coordinates – height.

These functions allow you to calculate the distance between two adjacent coordinates, respectively, the final mileage is the sum of all distances. PostGIS has a similar function ST_Length, let’s compare it with the self-written implementation for the tracker from the previous article for the entire 2024:

As a result, we get a discrepancy in the mileage in meters only in the 6th decimal place, so for further calculations we will use the ST_Length function instead of a self-written implementation.

Now let’s calculate the mileage using the standard odometer data. Everything is simple here, it is enough to take the starting and ending points and calculate the difference between them, since the odometer is a monotonically increasing value with a time reference (fix_time):

We get the total mileage for the entire period according to the odometer of 10,887 km. At the same time, the mileage calculated above by satellites is 18,302 km. The difference is 8 thousand kilometers, and this is almost half of the total mileage for the year! Let’s figure it out… Let’s display the mileage graph according to CAN for the entire period:

There are no mileage rollbacks or any other anomalies on the odometer graph. It is only clear that towards the end of the year in the fourth quarter the car began to move less. Let’s try to superimpose the mileage change graph by the odometer on the mileage accumulation graph by GNSS. To do this, we will calculate the distance between each pair of points by GNSS and the odometer:

Interesting fact! The CAN bus of this vehicle records the mileage in 125 meter increments. At the same time, the mileage according to GNSS, which we calculate ourselves by coordinates, is closer to the real value at a specific moment in time. On the graph, it looks like this:

Let’s convert the graph values ​​into cumulative values ​​to estimate the total increase in mileage. To do this, we’ll organize adders for each of the values ​​for CAN and GPS and look at a small period of time:

Well, now let’s compare the dynamics of mileage growth according to the odometer and satellites over the entire time interval:

An interesting picture. According to the odometer, the car began to drive less at the end of the year, and according to GNSS, in the second half of the year, the growth in mileage increased. As a result, the mileage obtained in different ways diverged almost 2 times. Let’s try to divide 2024 into 2 halves and figure out what the difference is.

Traffic in the first half of the year in the city of Krasnodar without any problems:

Movement in the 2nd half of the year with departures towards the city of Slavyansk-na-Kubani with “teleports” and “circles”:

It is worth mentioning separately the electronic warfare, which became the main reason for the “winding up” of the mileage on satellites:

In the previous article, we already came up with our own filtering parameters to combat electronic warfare (as hard as it sounds). Let’s try to “defeat” EW with simple thresholds again, namely:

  • the validity flag must be TRUE;
  • HDOP accepts only ideal (value 0);
  • the number of satellites must be higher than 15;
  • We consider a height greater than 100 meters above sea level to be invalid;
  • and also ignore the data if the distance between coordinates is more than 1 km.

This filtering gives the following result on our graphs:

If we separate the data before and after the advent of electronic warfare, that is, when GNSS was working correctly, there will be an absolute correlation between the odometer readings and the satellites and a standard deviation of 50 kilometers:

When the vehicle began to be based in the EW zone, the correlation dropped to 0.95, and the deviation increased to 370 kilometers:

Conclusions

It is impossible to solve the problem of electronic warfare in transport monitoring by naive filtering with some threshold values. Probably the most obvious solution is a complete transition to odometer readings via CAN, but unfortunately, this will only work for cars with a connected and properly functioning CAN reader. 

For other vehicles without a CAN reader, which are the majority in transport telematics, the operation of electronic warfare remains a serious problem, and if we do not take into account the capabilities of LBS navigation and Map Matching technologies, which are beyond the scope of this series of articles, then all that remains is the development of more complex algorithms with adaptive parameters for each monitoring object, taking into account its current location. 

For most vehicles without serious deviations in the operation of the standard odometer and problems with jamming the satellite signal, a typical picture will be observed, in which the mileage value according to navigation is calculated faster than according to the odometer. And over time, this difference will only accumulate. We can say that this is the “standard” in transport monitoring:

Below is an example of a new car without problems with satellite communication, in which the odometer and satellite mileage readings perfectly match. Over time, the picture will change to the one presented above, since the operation of the vehicle will inevitably lead to an error in the odometer.

Here is an “excellent” example of the influence of electronic warfare on modern transport telematics:

Conclusion

As usual, there was no silver bullet! There is no universal and ideal method for calculating mileage, but a combination of several approaches and competent data analysis allows you to minimize errors and make more accurate management decisions.

The comparison showed that the difference in mileage between GNSS and odometer can reach significant values, especially under adverse conditions, such as the impact of electronic warfare, satellite signal errors or incorrect data processing algorithms. However, filtering data by key parameters – validity flag, HDOP, number of visible satellites and altitude – allowed to significantly reduce the error, but did not solve the problem completely.

To accurately monitor the vehicle fleet mileage, it is necessary to combine odometer and GNSS data, take into account external factors (urban development, terrain, interference), apply data filtering and take into account the operational features. Simple data correction methods (rigid thresholds) do not always help, so the development of adaptive correction algorithms remains an important task.