Hi! I am trying to replace the GpsImgDirection value with the value of the yaw tag but in the format of 0-360. The yaw values goes from -180 to + 180. So I want the positive values to be copied to the GpsImgDirection value and the negative ones firstly to be added 360 and then be copied.
I tried with the if function to do so but all I get is Warning: Not a floating point number.
Help!
See this thread (https://exiftool.org/forum/index.php?topic=12832.0) from a couple weeks ago.
Yes I saw the thread but when I Tried to apply it for my case a warning pops up.
Warning: Must be a positive number for GPS:GPSImgDirection
I just want to tranform the yaw values of m y images to a 0-360 format (if thery are negative) and then replace the GSPImgDirection value to them.
I don't have a csv.
Oops, my mistake for not reading more carefully. Your use is much simpler, only requiring the math part of that command.
Try this
exiftool "-GpsImgDirection<${Yaw;$_=$_+($_<0?360:0)}" /path/to/files/
It works like a charm. Thank you so much!!!
Quote from: StarGeek on September 18, 2021, 09:58:55 AMOops, my mistake for not reading more carefully. Your use is much simpler, only requiring the math part of that command.
Try this
exiftool "-GpsImgDirection<${Yaw;$_=$_+($_<0?360:0)}" /path/to/files/
does this command only work on images with a negative YAW. I just come across this issue with some of my drone files
The command add 360 to the angle if the value is negative.
- Phil
Quote from: Phil Harvey on November 15, 2022, 02:02:26 PMThe command add 360 to the angle if the value is negative.
- Phil
Thanks