Reputation: 141
in advance I want to appreciate any answer and suggestion on this problem,
I am am working on a GPS tracker module (Model: m528), It's poorly documented so I dont have any paper on the data format which it sends,
I have my own server that listens to a special port and gets the data packets sent by the module,
I know the position of the latitude and longitude in the received packets, each of them have 4 bytes without N, W, S, E indicators,
this are the examples which I think would help,
stored latitude data in hex: 03447535 latitude value: 34.79225
stored longitude data in hex: 04830690 longitude value: 48.51150
any help and suggestion would be appreciated, thanks every one
Upvotes: 0
Views: 4110
Reputation: 23538
it's easy to convert, first you separate 3 decimal places, that would be degrees:
03447535 -> 034 degrees
then you take the rest and divide by 60000:
47535 / 60000 = 0.79225
finally you add 34 degrees and the result:
34.79225
same with the other number:
04830690 -> 48 degrees + 30690 / 60000 = 48.5115
Upvotes: 3
Reputation: 3630
What you have there doesn't seem to be any hex representation. It seems to be degrees/minutes: 03447535 = 34°47.535' = 34.79225 decimal...
Upvotes: 5