Author Topic: GPS metadata in Flir FFF images  (Read 1004 times)

joshvm

  • Newbie
  • *
  • Posts: 2
GPS metadata in Flir FFF images
« on: October 25, 2018, 09:23:37 AM »
Hi,

I've been using exiftool to grab metadata from some images taken with a Duo Pro R. I was wondering if geotagging information is currently supported? I've had a look at a hex dump for the image which is attached, as well as the FFF file. I had a quick search, but I couldn't see anything related to this on the forum already.

The GPS sequence is near the end, before the datum which is readable if viewed as ASCII. It looks like a bastardised version of the EXIF GPS tags: https://www.exiftool.org/TagNames/GPS.html.

The format is:
Code: [Select]
4 bytes 0x32323030 - "2200" (magic?)
2 bytes longitude (N or S, null terminated)
2 bytes latitude (E or W, null terminated)
4 bytes null
8 bytes longitude in degrees  (double precision float)
8 bytes latitude in degrees (double precision float)
4 bytes altitude in metres (single precision float)
32 bytes null
2 bytes "K"+null (speed reference - K/M/N /s)
2 bytes "T"+null ((T)rue or (M)agnetic North)
4 bytes speed
4 bytes heading

Example sequence (this image was taken in Indonesia, presumably just as the drone was taking off):

Code: [Select]
0x32323030 :  "2200"
0x53004500 : "S E "
0x00000000
0xDDABFB6C896102C0 : -2.2976254
0x710CB73217825C40 : 114.0326659
0x14AE4742 : 8.72000026702881 m
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x4B005400 : "K T "
0x00000000
0x85EB513F : 0.819999992847443 km/s
0xCD4CD942 : 108.650001525879 deg
0x00000000
0x57475338 34000000  "WGS84"

Note even though you're given the direction, the decimal coordinates are always referenced to North/East.

It would be useful to see this in the tag output, as it doesn't seem to be picked up at the moment.

Thanks!
« Last Edit: October 25, 2018, 09:48:17 AM by joshvm »

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16906
    • ExifTool Home Page
Re: GPS metadata in Flir FFF images
« Reply #1 on: October 25, 2018, 09:44:55 AM »
Great, thanks!  I didn't have any FLIR samples with known coordinates so I hadn't been able to decode this.  ExifTool was only decoding the GPSMapDatum from this block.

ExifTool 11.16 (to be released in about a week) will extract the following information from this image:

Code: [Select]
> exiftool ../pics/FLIR_DuoProR.fff "-gps*"
GPS Version ID                  : 2.2.0.0
GPS Latitude Ref                : South
GPS Longitude Ref               : East
GPS Latitude                    : 2.297368 S
GPS Longitude                   : 114.032183 E
GPS Altitude                    : 8.72 m
GPS Speed Ref                   : km/h
GPS Track Ref                   : True North
GPS Speed                       : 0.81
GPS Track                       : 108.65
GPS Map Datum                   : WGS84
GPS Position                    : 2.297368 S, 114.032183 E

- Phil

Edit:  Actually, some of my FLIR samples DID have GPS, but I just didn't know it!
« Last Edit: October 25, 2018, 11:06:29 AM by Phil Harvey »
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

joshvm

  • Newbie
  • *
  • Posts: 2
Re: GPS metadata in Flir FFF images
« Reply #2 on: October 25, 2018, 09:57:27 AM »
Awesome, thanks!

Looking at the Duo Pro R documentation, there are lots of other fields that it could potentially save, depending on what gets sent by the drone. I assume the built-in GPS was used for that flight, which is why we have e.g. no precision information. It'd be interesting to see if that 32-byte block gets filled in if we feed more data into the camera.

Let me know if you need any more files to test against.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16906
    • ExifTool Home Page
Re: GPS metadata in Flir FFF images
« Reply #3 on: October 25, 2018, 10:01:14 AM »
Great.  Please let me know if you discover anything else.  I don't need more GPS FFF samples, but a JPG sample would be nice.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16906
    • ExifTool Home Page
Re: GPS metadata in Flir FFF images
« Reply #4 on: October 25, 2018, 11:21:03 AM »
The last 4 bytes of the 32-byte block store the GPS DOP (dilution of precision).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16906
    • ExifTool Home Page
Re: GPS metadata in Flir FFF images
« Reply #5 on: October 26, 2018, 09:29:00 AM »
I think the first 4 bytes (just before the start of your hex dump) are a 4-byte integer that is 1 if GPS is valid, or 0 otherwise.  And there is definitely some more information in this record that looks interesting but isn't yet decoded.  At offset 0xa4 from the GPSValid flag there is a 6-byte string that has values of 000208, 081210, 020409, 000608, 010408, 020808 and 091011 in my samples.  I don't know what this is (it isn't the camera serial number).

Also, there are two doubles at offset 0x78 that are 0 or -1 in all my samples, and two floats at offset 0x88 that are 0 or -1 in all my samples.

I think I'll release version 11.16 today instead of waiting until next week.

- Phil
« Last Edit: October 26, 2018, 09:41:07 AM by Phil Harvey »
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).