Nikon 1 AW1 barometric depth/altitude to GPSAltitude

Started by Phil Harvey, May 06, 2014, 11:37:25 AM

Previous topic - Next topic

Phil Harvey

The Nikon 1 AW1 measures barometric pressure, and uses this to calculate an approximate altitude or depth underwater.  ExifTool 5.60 or later extracts this information as Nikon:Altitude.

Strictly speaking, this is very different from the GPSAltitude, which is the altitude calculated from a 3-D GPS position.  However, for the purposes of interoperability, it may be useful to copy this tag to a more standard location so it will be readable by other software.  The following command will accomplish this:

exiftool -gpsaltituderef=above "-gpsaltituderef<altitude" "-gpsaltitude<altitude" FILE

(where FILE is one or more file and/or directory names)

The command is a bit more complicated than it would be otherwise due to the fact that EXIF stores a separate reference point for GPSAltitude.  This command sets GPSAltitudeRef to "Above sea level" unless the Altitude value begins with a minus sign, in which as it sets it to "Below sea level" (via some ExifTool magic).  ExifTool takes the absolute value of the number when writing to GPSAltitude, so the value of this tag is always positive as per the EXIF specification.

Note that for the 1 AW1, a negative altitude actually indicates a depth below the surface of the water (which isn't necessarily sea level), so the "Below sea level" values are not technically correct when stored as a GPSAltitude.

- 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 ($).