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

I have a binary data stream that transmits geolocation coordinates - latitude and longitude. I need to find the method that they are encoded.

4adac812 = 74°26.2851' = 74.438085
2b6059f9 = 43°0.2763'  = 43.004605

4adaee12 = 74°26.3003' = 74.438338
2a3c8df9 = 42°56.3177' = 42.938628

4ae86d11 = 74°40.1463' = 74.669105
2afd0efb = 42°59.6263' = 42.993772

1st value is a hexadecimal value. 2nd and 3rd are the values ​​that I get on the output (not sure which one is used in the conversion).

I found that the first byte represents the integer part of the value (0x4a = 74). But I can not find how the decimal part is encoded.

I am very grateful for any help!

Thank.

-

: "" gps tcp. clent. , V++ 6 .

-

: , :

Hex data:
41 00 00 00  13 bd b2 2c
4a e8 6d 11  2a 3c 8d f9
f6 0c ee 13

Log data in client soft:
[Lng] 74°40.1463', direction:1
[Lat] 42°56.3177', direction:1
[Head] direction:1006, speed:3318, AVA:1
[Time] 2011-02-25 19:52:19

Result data in client (UI):
74.669105
42.938628
Head 100 // floor(1006/10)
Speed 61.1 // floor(3318/54.3)


41 00 00 00  b1 bc b2 2c
4a da ee 12  2b 60 59 f9
00 00 bc 11
[Lng] 74°26.3003', direction:1
[Lat] 43°0.2763', direction:1
[Head] direction:444, speed:0, AVA:1
[Time] 2011-02-25 19:50:49
74.438338
43.004605


00 00 00 00  21 bd b2 2c
4a da c8 12  aa fd 0e fb
0d 0b e1 1d
[Lng] 74°26.2851', direction:1
[Lat] 42°59.6263', direction:1
[Head] direction:3553, speed:2829, AVA:1
[Time] 2011-02-25 19:52:33
74.438085
42.993772

, 4 .

, 7 5- . ( , 5-8 - ?) 9 Lat.

13 Lng.

Bytes 17-18 reverse (word byte) - .

19-20 - ava (?) (4 + 12 ). (, - , ava?)

. 13- , 7 . , 1- smth ( , , ).

+5
4

, 3 longances, 3 :

74.438085, 74.438338, 74.669105, 43.004605, 42.938628, 42.993772

, :

74.437368, 74.439881, 74.668392, 42.993224, 42.961388, 42.982391

: -0,000717, 0,001543, -0,000713, -0,011381, 0,022760, -0,011381.

, Hex'es (4 3 ):

int main(int argc, char** argv) {
    int a[] = { 0x4adac812, 0x4adaee12, 0x4ae86d11, 0x2b6059f9, 0x2a3c8df9, 0x2afd0efb };
    int i = 0;
    while(i<3) {
        double b = (double)a[i] / (2<<(3*8)) * 8.668993 -250.0197;
        printf("%f\n",b);
        i++;
    }
    while(i<6) {
        double b = (double)a[i] / (2<<(3*8)) *  0.05586007 +41.78172;
        printf("%f\n",b);
    i++;
    }
    printf("press key");
    getch();
}
+3

.

6 ( [1] & 0x3f), "" .

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

, ?

0

:

74 + 40,1463/60 74 + 26,3003/60 74 + 26,2851/60 42 + 56,3177/60 43 + 0,2763/60 42 + 59,6263/60

74.66910, 74.43834, 74.43809, 42.93863, 43.00460, 42.99377

:

74.668392, 74.439881, 74.437368, 42.961388, 42.993224, 39.407346

:

-0.000708,  0.001541,  -0.000722,  0.022758, -0.011376, -3.586424

4 i, , , , - . , , .

0
source

I have an example of a 32 bit hexadecimal string: e0ec041c-90d5700d-5cf7ab00 latitude longitude

I used about 10 converters from hexadecimal to decimal and without any good results it looks like long / lat. Just know that the coordinates must be somewhere in Europet.

I am familiar with the Python and R languages, so please, if you use a script, it will be great to use these languages.

Thanks Andrew

0
source

All Articles