WIP: [core] Add the timestamps to the tracks #9107

Closed
kirylkaveryn wants to merge 8 commits from add-timestamps-to-track into master
Member

References:

http://www.topografix.com/gpx/1/1/#type_wptType
https://developers.google.com/kml/documentation/kmlreference#gx:track

TODO:

### References: http://www.topografix.com/gpx/1/1/#type_wptType https://developers.google.com/kml/documentation/kmlreference#gx:track ### TODO: - [x] store the timestamps as a vector in the Multiline geometry - [x] save the timestamps to the kml https://developers.google.com/kml/documentation/kmlreference#gxtrack - [x] save the timestamps to the gpx http://www.topografix.com/gpx/1/1/#type_wptType - [x] parse the timestamps from the gpx - [x] parse the timestamps from the kml - [x] support for the `MultiTrack` - [ ] Fix timestamps parsing https://git.omaps.dev/organicmaps/organicmaps/issues/9127 - [ ] Support for the `<altitudeMode>` (see https://developers.google.com/kml/documentation/kmlreference#elements-specific-to-track) - [ ] Unit test - Fix the old and and cover the new logic
biodranik (Migrated from github.com) reviewed 2024-08-26 08:36:26 +00:00
biodranik (Migrated from github.com) commented 2024-08-26 08:36:26 +00:00

I don't see any reason to duplicate GpsInfo with GpsTrackInfo now when we decided to save detailed track data. GPX and KML can also store accuracy and bearing. Instead of copying the same functionality, it looks like GpsTrackInfo can be deleted completely and replaced by GpsInfo struct everywhere in a separate PR.

I don't see any reason to duplicate GpsInfo with GpsTrackInfo now when we decided to save detailed track data. GPX and KML can also store accuracy and bearing. Instead of copying the same functionality, it looks like GpsTrackInfo can be deleted completely and replaced by GpsInfo struct everywhere in a separate PR.
biodranik (Migrated from github.com) reviewed 2024-08-26 09:42:29 +00:00
biodranik (Migrated from github.com) commented 2024-08-26 09:42:29 +00:00
See https://git.omaps.dev/organicmaps/organicmaps/pulls/9109
biodranik (Migrated from github.com) reviewed 2024-08-27 11:11:02 +00:00
@ -490,0 +529,4 @@
CHECK_EQUAL(line.size(), timestampsForLine.size(), ("Timestamps size mismatch for track:", lineIndex));
auto const timeStr = base::SecondsSinceEpochToString(timestampsForLine[pointIndex]);
writer << linesIndent << kIndent4 << "<when>" << timeStr << "</when>\n";
}
biodranik (Migrated from github.com) commented 2024-08-27 11:11:02 +00:00

Should the old approach be used for tracks without timestamps, and gx:Track/MultiTrack for timestamped data?

Should the old approach be used for tracks without timestamps, and gx:Track/MultiTrack for timestamped data?
kirylkaveryn reviewed 2024-08-27 11:21:19 +00:00
@ -490,0 +529,4 @@
CHECK_EQUAL(line.size(), timestampsForLine.size(), ("Timestamps size mismatch for track:", lineIndex));
auto const timeStr = base::SecondsSinceEpochToString(timestampsForLine[pointIndex]);
writer << linesIndent << kIndent4 << "<when>" << timeStr << "</when>\n";
}
Author
Member

The track can successfully be saved using only the gx:track tags without the timestamps (only the points).
Maybe only to support by the others apps (I dunno which)?

The track can successfully be saved using only the gx:track tags without the timestamps (only the points). Maybe only to support by the others apps (I dunno which)?
kirylkaveryn reviewed 2024-08-27 16:46:31 +00:00
@ -490,0 +529,4 @@
CHECK_EQUAL(line.size(), timestampsForLine.size(), ("Timestamps size mismatch for track:", lineIndex));
auto const timeStr = base::SecondsSinceEpochToString(timestampsForLine[pointIndex]);
writer << linesIndent << kIndent4 << "<when>" << timeStr << "</when>\n";
}
Author
Member

Fixed!

Fixed!
This repo is archived. You cannot comment on pull requests.
No reviewers
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#9107
No description provided.