Convert hexagon to latitude longitude from dashcam.MOV file

I have an OEM dashcam that saves video in .MOV format. I want to programmatically extract data from embedded GPS data from video files. By opening the .mov file in a hex editor, I found data packets with freeGPS headers, and I can confirm that there are 7 packets for my 7 second video sample, so I know where the gps data comes from.

I already found the date and time, but I'm stuck in converting hexadecimal values โ€‹โ€‹to longitude latitude. Below are the hexadecimal values โ€‹โ€‹and their equivalent coordinates when retrieving using the recorder viewer.

273108AC1C7996 404E, 0D022B873EA3C7 4045 - 14.637967,121.041475 516B9A771C7996 404E, 0D022B873EA3C7 4045 - 14.637963,121.041475 B9FC87F41B7996 404E, 52499D803EA3C7 4045 - 14.637955,121.041472 B9FC87F41B7996 404E, 52499D803EA3C7 4045 - 14.637955,121.041472 B459F5B91A7996 404E, C442AD693EA3C7 4045 - 14.637935,121.041460 1DEBE2361A7996 404E, ACADD85F3EA3C7 4045 - 14.637927,121.041455 08CE19511A7996 404E , 4FD1915C3EA3C7 4045 - 14.637928,121.041453

Bold bytes are directly translated to @N and @E, so I think they are not part of the conversion. I already tried the following answers, but I was not able to get the correct coordinates.

How to convert GPS longitude and latitude from hex file

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

I already sent an email to the dashcam provider asking them to provide their protocol documentation, but it doesnโ€™t look like it is because they sent the recorder viewer when I asked for their own video player.

I will also include the first freeGPS package in case I am looking for the wrong place.

00 00 80 00 66 72 65 65 47 50 53 20 98 00 00 00 00 78 2E 78 78 00 00 00 00 00 00 00 00 00 00 00 00 30 30 30 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 03 00 00 00 27 00 00 00 41 00 00 00 27 31 08 AC 1C 79 96 40 4E 00 00 00 00 00 00 00 0D 02 2B 87 3E A3 C7 40 45 00 00 00 00 00 00 00 8F C2 F5 28 5C 8F E2 3F 48 E1 7A 14 AE 07 68 40 11 00 00 00 06 00 00 00 14 00 00 00 76 00 00 00 88 00 00 00 DE 00 00 00 4D 00 00 00 49 00 00 00 4F 00 00 00 2D 00 00 00 2B 00 00 00 00 00 00 00

Data is shown in bold in the order: freeGPS, time, latitude @N ?, longitude @E ?, date

I can confirm the correct time and date. The speed should be 1 km / h, but I also can not find it.

Thanks in advance to those who can help.

EDIT: Here is the link for a test video. Video testing

+5
source share
1 answer

Not sure how useful this is, but if you convert the hexadecimal string (including 0x40 at the end) to the small final version of IEEE-754 with double precision, you will get about 100X lat / lon.

In C, I did something like

 printf( "%f\n", *(double*)"\x27\x31\x08\xAC\x1C\x79\x96\x40" ); printf( "%f\n", *(double*)"\x0D\x02\x2B\x87\x3E\xA3\xC7\x40" ); 

and went out

 1438.278000 12102.488500 

Update thanks to @ TDG

If 1438.278 interpreted as 14 degrees 38.278 minutes, you get the decimal value 14.6379666666666667 . If 12102.4885 interpreted as 121 degrees and 2.4885 minutes, the decimal equivalent is 121.041475 .

C code example for this

 #include<stdio.h> double convert( double input ) { int i = input/100; return ( input - i*100 ) / 60 + i; } int main(){ printf( "%f\n", convert( *(double*)"\x27\x31\x08\xAC\x1C\x79\x96\x40" ) ); printf( "%f\n", convert( *(double*)"\x0D\x02\x2B\x87\x3E\xA3\xC7\x40" ) ); } 
+5
source

Source: https://habr.com/ru/post/1270514/


All Articles