Topin Protocol GPS Data

Abolfazl4 years ago

I have downloaded the Topin protocol from www.traccar.org/protocols/. however I don't know how to extract latitude and longitude values from Positioning data packets (0x10 function code). Can't quite understand the example given in the document.
it uses the following data as an example:

7878 12 10 0A03170F3217 9C 026B3F3E 0C22AD65 1F 3460 0D0A

and explains how to extract gps lat(or long) like this :

The gps module output latitude and longitude value is converted into a fraction of the unit, and
then multiplied by the converted number of 30000, the multiplication of the results can be converted to hexadecimal.
Such as 22 "32.7658 ', (22X60 + 32.7658) X30000 = 40582974, converted to hexadecimal for 0x02 0x6B 0x3F 0x3E, 22X60 is to turn to'.

where does the 22X60 come from? what does it mean 22X60 is to turn to? is 22x60 a constant? is it written somewhere in the data?
If I understand correctly I should divide the received value by 30000 and do some more calculations to get the latitude or longitude values.
any help is really appreciated.

Zeratul3 years ago

40582974 / 30000 / 60 = 22.54609 (22 is your degrees)

Get the remainder 5 digits (54609) and multiply it by 60 = 32676540

now divide it (32676540 / 100000) to get 32.7654

Explanation:
0.54609 is your Minutes and Seconds represented by a number.

Zeratul3 years ago

In order to get the minutes, you need to convert the 54609 remainder number by multiplying it by 60 and dividing it by 100000. (100000 because you have 5 digits in your remainder to get precision value for seconds).

After getting the minutes, get the remainder again and do the process again to get the seconds.

Now you have 22 Degrees, 32 Minutes, 46 Seconds