-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve printing of GPS info #1551
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Milos. That looks fine. Thank You for dealing with this.
knot is a measure of speed...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. A few comments:
1 Converting rationalToFloat()
I'm a little surprised that so much code is necessary in printDegrees(). Is there a lesson to be learned here. There is a API:
EXIV2API Rational floatToRationalCast(float f);
I thought there are one to convert rationalToFloat(), or Long, or Double. I can't find it. Is there something special and unusual about degrees() such as doing arithmetic on several values.
-
Is the result the same as ExifTool?
-
Well spotted that I put "knots" in the man page. It should of course be nautical miles.
There are two ways of lat/lon encoding w/ 3 RATIONALs according to Exif spec: integer degrees and minutes and then anything goes for seconds (integer or fractional) like [ DD/1, MM/1, SS/1 or SSSS/frac], or fractional minutes with seconds "unused" [ DD/1, MMMM/frac, 0/1 ]. We need to convert the second case (I chose to make it fit the first one), and then print consistently in the usual degree/minute/second format...
One exception: ExifTool prints |
Right. You've got your head round this one. That cosmetic difference with ExifTool seems OK to me. I'm happy for you to merge. |
Let's agree on a team convention. The person who opens a PR also does the merge. Why? Because if you suddenly think of a modification to the PR, you can update it before merging. |
Thanks. Fine by me. |
Addresses #1541