How to convert my binary (hex) data to latitude and longitude?

前端 未结 3 821
伪装坚强ぢ
伪装坚强ぢ 2021-01-06 01:41

I have some binary data stream which passes geo location coordinates - latitude and longitude. I need to find the method they are encoded.

4adac812 = 74°26.2         


        
3条回答
  •  长发绾君心
    2021-01-06 02:34

    Brainstorming here.

    If we look at the lower 6 bits of the second byte (data[1]&0x3f) we get the "minutes" value for most of the examples.

    0xda & 0x3f = 0x1a = 26; // ok
    0x60 & 0x3f = 0; // ok
    0xe8 & 0x3f = 0x28 = 40; // ok
    0x3c & 0x3f = 0x3c = 60; // should be 56
    0xfd & 0x3f = 0x3d = 61; // should be 59
    

    Perhaps this is the right direction?

提交回复
热议问题