Odomoter trip data for tax records


Hi one and all,

My company has asked me to investigate a way to track business trips for tax purposes on our vehicle fleet rather than filling in log books and my research has led me here to AutoPi.

I would like to record trip data (non gps as there is currently a privacy issue with staff) so needs to be odometer based distance, not GPS distance. Is this possible with the AutoPi?




Hi Stephen,

Welcome to the forum.

The AutoPi is limited to the information available the specific vehicle you are using. On some make/models, odometer information is available from the CAN bus of the vehichle. On others its not. So it depends on your fleet of vehicles.

If you need further clarification, you can always reach out to sales@autopi.io.



Thanks Peter,

Have emailed sales. Probably my first step is to put OBD diagnostic tool on vehicles and see if odometer reading is available.

Most of these are late model vehicles but a mix of manufactures and models.

From the looks of the standard the odometer PID should be there under Service 01 so would be surprised if its not there, but I guess its all down to the manufacturer


What I have seen done in the past, which may or may not be compliant for “tax purposes” is that there could be an API call which records the current odometer setting at that single point in time.

Then, at the end of each trip, you could simply increment that value by the distance of the trip. I suspect the distance of the trip would be based on GPS data.

Essentially a virtual odometer by leveraging the GPS.


One option might be to develop something utilising the OBD2 Mode 01 PID 31 “Distance traveled since codes cleared”.
This PID provides vehicle distance travelled since the OBD2 trouble codes were last cleared (you can clear them even if no codes are present).
If you clear the codes and note the odometer at that time as say, 50,000kms, you can then calculate the odometer in future as 50,000 + Distance since codes cleared.

You would need to account for the codes being cleared again in future, as this would skew the results. And also notice the PID delivers a value between 0 and 65,535kms - so you would need to clear the codes at least once every 65k kms.