Typo in lib/Image/ExifTool/Geotag.pm breaks geotagging of $PTNTHPR

Started by POTN, December 09, 2017, 03:42:17 PM

Previous topic - Next topic

POTN

Hi,

as per Honeywell docs http://www.kontest.ru/datasheet/honeywell/hmr3000d00232.pdf:
$PTNTHPR,x.x,a,x.x,a,x.x,a*hh<cr><lf>
or an example:
$PTNTHPR,354.9,N,5.2,N,0.2,N*3A

but the code at lib/Image/ExifTool/Geotag.pm, line 472 reads:
/^\$PTNTHPR,(-?[\d.]+),[MNO],(-?[\d.]+),[MNO],(-?[\d.]+),[MNO],/ or next;

where the last "," (comma) in the /search/ pattern effectively results in "not-found". Removing the comma works.

$ ./exiftool -ver
10.68
$ uname -a
Linux athlon 4.14.3-1-ARCH #1 SMP PREEMPT Thu Nov 30 18:33:13 UTC 2017 x86_64 GNU/Linux
$ ./exiftool -v2 -geotag=../S171209.log  -geotime="2017:12:09 19:13:15" ../sample.jpeg

(I provide neither image nor the log file since I believe the bug exhibits always.)

P.S. I found some old posts showing a redundant character before the *checksum field at http://gpsbabel.2324879.n4.nabble.com/heading-pitch-and-roll-data-from-Solmeta-Geotagger-Pro-td4842.html
$GPRMC,003334.821,A,3342.0580,S,15105.1157,E,0.04,210.87,090910,,,A*7F
$PTNTHPR,265.2,N,-7.5,N,0.0,N,A*56

So it might be that at a certain point of time Solmeta used the extra ",A", but that does not seem to be true anymore (I have Solmeta GMAX-EOS) and does not correspond with the proprietary definition either.

Phil Harvey

OK, thanks for this report.  I'll remove the comma for ExifTool 10.69.

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

POTN

Thank you.

P.S. I actually found exiftool to be the only one, which can geotag "direction" from NMEA to Exif, at least on Linux. Useful.