转换不明16进制数到经纬度 [英] Convert unknown Hex digits to a Longitude and Latitude

查看:2063
本文介绍了转换不明16进制数到经纬度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

F3 c8 42 14 - latitude //05.13637° should be nearby this coordinate
5d a4 40 b2  - longitude //100.47629° should be nearby this coordinate

这是十六进制数据,我从GPS设备获取,如何转换为可读的协调?
我没有任何手动document.please help.thanks

this is the hex data i get from GPS device, how to convert to readable coordinate? i don't have any manual document.please help.thanks

    22 00 08 00 c3 80 00 20 00 dc f3 c8 42 14 5d a4 40 b2 74 5d 34 4e 52 30 39
47 30 35 31 36 34 00 00 00

这是我的我收到完整的字节,但这位工程师告诉我,F3 C8 42 14为纬度和5D A4 40 b2为经度

this is my full bytes i received,but the engineer told me that F3 c8 42 14 is latitude and 5d a4 40 b2 is longitude

推荐答案

我觉得值是32位浮点。但是,字节您显示流中有轻微的偏移。以经度:100.47629 32位浮点是42C8F3DC这些都是10字节通过你流中13(最低显著字节在前)。
对于32位浮点纬度5.13637是40A45D24这些字节14至17,但它的字节流中40A45D14所以它取下一小在最显著十进制数字(同样,它至少显著字节在前)。

I think the values are in 32-bit floating point. However, the bytes are slightly shifted in the stream that you show. Taking longitude first: 100.47629 in 32-bit floating point is 42C8F3DC these are bytes 10 through 13 in your stream (Least significant byte first). For latitude 5.13637 in 32-bit floating point is 40A45D24 these are bytes 14 through 17 but it's 40A45D14 in the byte stream so it's off a little in the least significant decimal digit (Again, it's least significant byte first).

这篇关于转换不明16进制数到经纬度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆