feature request kmh or mph reported by tracker

Jess-UK8 years ago

would it be possible to add support for setting whether a tracker is reporting in mph or kmh when it sends data to the traccar server as an option when adding a new device.

this is due to trackers that are seemingly identical and sending data with the same protocol but some of them report their speed in kmh and others are reporting it in mph.

Anton Tananaev8 years ago

What protocol are we talking about?

Jess-UK8 years ago

I have 2 trackers using the xexun protocol (from different suppliers) both use an identical command structure and their output is the same except one has the speed in mph the other has it in kmh.

to be clear..
externally they are identical
internally they are identical (same board revision / same components)
the only difference appears to be a software revision which makes one report speed differently to the other one (manually converting the speed of one from mph to kmh produces near identical speeds from both)

Anton Tananaev8 years ago

Interesting because current protocol decoder expects speed in knots for Xexun protocol.

Jess-UK8 years ago

I have been going over things again, and it appears that the xexun clones with the shorter hex string (which you added about a month ago) are reporting their speed in KMH whereas the ones with the longer hex string are in MPH or Knots (most likely knots if that is what they are meant to be)

as an example a reading from when I was driving with the tracker in the car reported a speed of 98.29 (as recorded in the database) where I know that my speed along that section of road was around 60Mph (speed limit is 60 mph)
if we treat the 98.29 as knots it works out to just over 113 Mph (highly unlikely)
if we treat the 98.29 as Kmh it works out to 61.1 Mph which is very likely to be accurate

is it possible to modify the xexun decoder to convert the speed from kmh to knots if it's the shorter string but not convert if it's the longer string?

Anton Tananaev8 years ago

Can you please provide some HEX samples for both types of devices.