Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Odometer jumping a dial? 999-->001

This site may earn commission on affiliate links.
Hi together

Today while driving I reached 160'999km...and after driving a bit further I thought why isn't it reaching 161'000km...but then a few meters further it jumped directly to 161'001km....???

Have you experienced a similar behaviour?

best regards
Thomas
 
I guess that could happen if the odometer is incrementing in unit miles and then converting to km. The log file reports the odometer in 10th of miles, and if the calculation to km were done including the fraction of a mile, it would not be a problem. So the algorithm must be rounding (or truncating) to unit miles first, then converting to km. I'd say that qualifies as a bug.
 
What Steve said. The car works in Miles, and converts to Kilometers for the display.

Something like this:

Code:
Miles                             Kilometers
(100061*1609)/1000 = 160998
(100062*1609)/1000 = 160999
(100063*1609)/1000 = 161001

Back in the early days of OVMS we tried to match what the car did (for both odometer and speed) as closely as possible. The *1609 then /1000 formula seemed the best approach using integer maths (floating point is computationally expensive in little microcontrollers).

That said, the CAN bus message for odometer is in 1/10th of a mile (as is the log file, as Steve points out), so most likely a bug/limitation that it rounds up to the nearest mile before doing the conversion.