Long time listener first time caller...
I am trying to assign a relative altitude value (XMP-drone-dji:RelativeAltitude (real)) to the GPS altitude value (GPS:GPSAltitude(rational64u))
The DJI relative altitude is signed (e.g: +39.6), and the GPS Altitude is unsigned (e.g. 50 m).
When I try to write the relative altitude to gps altitude as below:
exiftool -n -GPS:GPSAltitude=XMP-drone-dji:AbsoluteAltitude dir
I get an error:
Warning: Error converting value for GPS:GPSAltitude (ValueConvInv)
Nothing to do.
Is there a protocol to convert signed to unsigned?
Welcome willm,
The problem is you need to use "<" instead of "=" when copying the value of another tag. "=" is for assigning a literal value. This is common mistake 5c (https://exiftool.org/mistakes.html#M5).
- Phil
Thanks Phil! I knew it would be something silly but could just not figure it out. Working great now, thanks for the fantastic tool!
Thank you very much for the solution, how can I make it add the "+" sign as well?
-exiftool -n -XMP-drone-dji:AbsoluteAltitude<GPS:GPSAltitude -dir
Like this?:
exiftool -n "-XMP-drone-dji:AbsoluteAltitude<+$GPS:GPSAltitude" DIR
- Phil