Fleetrun
Hecterra
NimBus
Other apps
Wialon for Android/iOS
Logistics
Wialon Local
Wialon Hosting
WiaTag
Configurator
LeaseControl
en
Contents
Incorrect Mileage
  • technical_consulting
  • trips

Incorrect mileage can affect the calculation of average speed, average fuel consumption per kilometer, service intervals and, of course, the indicator of the distance traveled. Therefore, it is crucial to track and fix problems that arise both on the hardware and software side.

If you’re faced with the problem of incorrect mileage detection in a report, on a track, or in messages, the first thing you should do is to check what type of mileage counter is selected on the General tab in the unit properties:

  • GPS
  • GPS + ignition sensor
  • Mileage sensor
  • Relative odometer

After finding out which counter is used in your unit, choose the appropriate section of the article.

1. GPS

When using this type of counter, the mileage correctness can be affected by the unstable communication with satellites, data transmission failures, as well as the use of additional sensors. Let's consider these options in more detail.

a. Outliers of coordinates and incorrect message chronology

Outliers of coordinates may appear due to poor communication with satellites of the Global Navigation Satellite System (GNSS). To determine that outliers occurred, go to the Messages tab and upload data for the required unit for the problematic time interval. On the map, you will see a track that can be used to determine the fact of outliers: coordinates of messages are significantly spaced from the actual unit location.


In this example, a clear indication of problems with determining the unit location is the HDOP parameter — it has values >1.

Wialon has a limitation: no more than 1 message should come from a unit per 1 second. If the terminal transmits more than 1 message per 1 second, the chronology of messages may be disrupted and the track will look the same. The reason is incorrect arrangement of messages with positional data (coordinates) in the Wialon database. In such cases, you should reduce the frequency of sending messages with data in the terminal settings.

Possible solutions:

In the example above, we managed to get rid of outliers by using the ignition sensor in the trip detector, since they are detected in the interval when the ignition is switched off:



b. Using the mileage sensor

In some cases, the counter (the General tab in the unit properties) works based on GPS coordinates, but a separate mileage sensor is also created (the Sensors tab in the unit properties). In reports, for example, with the Trips table, the Mileage column will display the value based on GPS (total distance between coordinates), but the value of the Initial/Final mileage columns will be calculated using the following methods:

  • If the first/last message of the interval has the mileage sensor value, the system uses these values.
 Explanation

Let's agree that the unit actually traveled 2 km, and messages came in the following order:

  1. 10 km
  2. -- km
  3. -- km
  4. 15 km

In the Mileage column, we get 2 km (the total distance between coordinates without considering the mileage sensor); in the Initial mileage column, we get 10 km (as in the message); in the Final mileage column, we get 15 km (as in the message).

A similar example, but the value of the mileage sensor is available only in the last message:

  1. -- km
  2. -- km
  3. -- km
  4. 15 km

In the Mileage column, we get 2 km (the total distance between coordinates without considering the mileage sensor); in the Final mileage column, we get 15 km (as in the message).

And one more example, where the mileage sensor value is only available in the first message:

  1. 10 km
  2. -- km
  3. -- km
  4. -- km

In the Mileage column, we get 2 km (the total distance between coordinates without considering the mileage sensor); in the Initial mileage column, we get 10 km (as in the message).

  • If there is no mileage sensor value in the first message of the interval, the system looks for the first available message with the mileage sensor value for this interval, and then the mileage before the start of the trip, calculated from GPS coordinates, is subtracted from it.
 Explanation

Let's agree that the unit actually traveled 2 km, and messages came in the following order:

  1. -- km
  2. -- km
  3. -- km
  4. 15 km

In the Mileage column, we get 2 km (the total distance between coordinates without considering the mileage sensor); in the Initial mileage column, we get 15 km — the value calculated from GPS coordinates or 15 km - 2 km = 13 km; in the Final mileage column, we get 15 km (as in the message).

  • If there is no mileage sensor value in the last message of the interval, the system looks for the last available message with the mileage value for this interval, and then the mileage at the end of the trip, calculated from GPS coordinates, is added to it.
 Explanation

Let's agree that the unit actually traveled 2 km, and messages came in the following order:

  1. 10 km
  2. -- km
  3. -- km
  4. -- km

In the Mileage column, we get 2 km (the total distance between coordinates without considering the mileage sensor); in the Initial mileage column, we get 10 km (as in the message); in the Final mileage column, we get 10 km + the value calculated from GPS coordinates or 10 km + 2 km = 12 km.

  • If there is no mileage sensor value in the first and last messages, the system looks for the first available sensor value, and then subtracts the mileage calculated from GPS coordinates from it to get the initial value, and to get the final value, on the contrary, adds the mileage calculated from GPS coordinates to the mileage sensor value.
 Explanation

Let's agree that the unit actually traveled 2 km, and messages came in the following order:

  1. -- km
  2. 10 km
  3. 15 km
  4. -- km

In the Mileage column, we get 2 km (the total distance between coordinates without considering the mileage sensor); in the Initial mileage column, we get 10 km — the value calculated from GPS coordinates before the first message of the interval; in the Final mileage column, we get 10 km + the value calculated from GPS coordinates before the last message of the interval.

In such a situation, if due to some failures the mileage sensor didn’t work and sent 0 km, negative mileage values may appear:


In this example, a mileage sensor was created for the unit based on the can_mileage parameter, which is absent in messages until 12/18/2019 4:38:54 PM:


After 4:38 PM onwards, the parameter always has the value 0, and the sensor, respectively, has the value 0 km.

Possible solutions:

  • Remove the mileage sensor and completely switch to the mileage using GPS coordinates;
  • Fix the problem on the hardware side or switch to a parameter with correct values.

In the example above, the solution was to remove the sensor and switch to GPS mileage only, since the parameter values were not read from the CAN bus.

2. GPS + ignition sensor

When using this type of counter, the mileage correctness can be affected by the unstable communication with satellites, data transmission failures, as well as the use of additional sensors. However, a significant difference from the GPS type and a fairly common cause of issues in this type of counter will be the use of an ignition sensor that doesn’t work correctly. Let's consider this option in more detail.

Incorrect value of the ignition sensor

The GPS + ignition sensor option is selected as the mileage counter. When building a track (via the Messages, Tracks or Reports tab), the mileage is 0 km, while the track itself is displayed on the map:



The track on the map is built according to coordinates from messages, while the mileage calculation algorithm takes into account not only coordinates and distance between messages, but also checks if the ignition is on.

In this example, a sensor with the Ignition type is not created for the unit, so the system ignores all messages and displays 0 km of mileage:


Possible solutions:

  • Switch the mileage counter to GPS;
  • Add a correctly working ignition sensor.


In the example above, the unit doesn’t send a parameter based on which the ignition state can be determined, therefore the problem is solved by switching to the GPS counter type.

3. Mileage sensor

The readings of any sensors, including mileage, can be exposed to external factors such as power shutdown, pickups, sensor malfunctions, errors of calibration and sensor/terminal configurations. Let's consider some examples of errors in more detail.

a. Resetting values of the mileage parameter

Some terminals stop transmitting mileage sensor readings for a short period of time (for example, due to power shutdown, pickups in the power supply circuit, other hardware issues). In such cases, the accumulated total mileage of the unit may differ from the last available sensor value:





In the example, the total mileage on the mileage counter is 26943 km, and on the mileage sensor — only 7069 km.

The reason is the reset of the mileage sensor parameter.


In such a situation, there occurs a reset to 0 km and then again an increase to 6452 km (in the example, such resets were repeated several times).

Possible solutions:

  • Use the Lower bound in the sensor settings;
  • Use Validation if the reset occurs under certain circumstances, and you can identify the dependence with other parameters (sensors).

In the example above, it is enough to apply the lower bound (0.01), since the reset occurs randomly and there is no dependence on other sensors.




Thus, by applying the lower bound, we managed to eliminate zero values (reset to 0 km) and avoid the incorrect mileage calculation.

b. Messages with the same timestamp (the With overflow option enabled)

Terminals may send messages too frequently. Wialon has a limitation: no more than 1 message should come from a unit per 1 second. When receiving data with a higher frequency, its chronology may be disrupted and a lower mileage value may end up in the database after a message with a larger value, an example is in the picture below:


In such situations, the counter overflows to the maximum possible value — 2147483648.

Possible solutions:

  • Disable the With overflow option in the sensor settings (if it was enabled).

In the example above, the With overflow option was enabled. Turning it off, we got a more correct mileage value:


с. Messages with the same timestamp (the With overflow option disabled)

Messages may come with the same timestamp, disrupting the chronology, for example:

In general, in the picture above, the mileage looks correct — 25.01 km, in contrast to the previous example, where the error was obvious. However, if we take from the messages the initial value of the mileage sensor in the interval — 9917.81 km and the final value — 9942.44 km, subtract the difference, then we get the mileage — 24.63 km.

The difference is 0.38 km on a relatively small section of the track. The inaccuracy will grow with the increasing amount of data (number of trips). The reason for this error is, of course, the disruption of message chronology. The system expects the sensor value to increase. In the example, we see a drop from 9931.03 km to 9930.85 km and a subsequent increase to 9931.29 km. The mileage between messages with the sensor value 9930.85 km and 9931.29 km is recalculated, i.e., an extra 0.44 km is added.

Possible solutions:

  • Switch the mileage counter to GPS;
  • Fix the problem on the hardware side;
  • Switch the mileage sensor to the Relative odometer type and apply validation.

In the example above, we managed to get more correct mileage values by switching the mileage sensor to the Relative odometer type with the added validation. The relative odometer sensor is based on a parameter represented as: mileage-#mileage. The validator is based on a parameter represented as: time-#time. The lower bound for the validator is 0, and the validation type is Not-null check. The mileage counter in the General tab is switched to Relative odometer.

After applying the validation, the mileage was 24.65 km. Messages with the same timestamp are excluded from the calculation.

If you have any questions on specific practical cases, you can contact technical support via email support@wialon.com. Make sure to indicate in your email a brief description of the situation with screenshots, the exact unit name, the report template name for verification, the minimum time interval for verification (for example, not a month, but one day), and other essential details.

Pavel Chebotarev,Customer Service Engineer

If you find a mistake in the text, please select it and press Ctrl+Enter.
Thank you for your feedback!
Report a mistake
Text with the mistake Comment
Maximum 500 characters