-
-
Notifications
You must be signed in to change notification settings - Fork 279
improve correctness of GNSS datetime handling #6502
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
base: master
Are you sure you want to change the base?
Changes from all commits
5874f3a
9543d52
70d1283
2c7cebc
0bdbd7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -373,8 +373,12 @@ void FileUtils::addImageMetadata( const QString &imagePath, const GnssPositionIn | |
| metadata["Exif.GPSInfo.GPSSpeedRef"] = "K"; | ||
| } | ||
|
|
||
| metadata["Exif.GPSInfo.GPSDateStamp"] = positionInformation.utcDateTime().date(); | ||
| metadata["Exif.GPSInfo.GPSTimeStamp"] = positionInformation.utcDateTime().time(); | ||
| // slight change in behaviour, but more correct | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer to see changes in commit messages, and comments in the code describe how it is. I find "slight change in behavior" unhelpful, and it will not age well. Change from when? Why? What actual change? |
||
| if ( positionInformation.utcDateTime().isValid() ) | ||
| { | ||
| metadata["Exif.GPSInfo.GPSDateStamp"] = positionInformation.utcDateTime().date(); | ||
| metadata["Exif.GPSInfo.GPSTimeStamp"] = positionInformation.utcDateTime().time(); | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see what you're doing, but elsewhere you are using system time instead of gnss time if gnss time is not valid. Why is this different? I'm not saying you don't have a reason but that reason is what should be in the comment. Are you finding that there is a valid position but not valid time in gnss data? |
||
|
|
||
| metadata["Exif.GPSInfo.GPSSatellites"] = QString::number( positionInformation.satellitesUsed() ).rightJustified( 2, '0' ); | ||
|
|
||
|
|
||
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 code is repeated a bunch of times. That makes me wonder:
It seems clear something tricky is going on, but I don't understand it from the comments you didn't add, and I don't understand it from the commit message. Maybe GNSS data should not be used at all if the associated datetime is not valid, and that's the real bug.