Gps tracker received data,

一曲冷凌霜 提交于 2019-12-13 07:59:43

问题


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


回答1:


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



回答2:


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...



来源:https://stackoverflow.com/questions/13543321/gps-tracker-received-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!