feat(node): add GPX export to position log screen#5919
Merged
Conversation
Adds a GPX 1.1 export button to PositionLogScreen alongside the existing
CSV export. The local node's own track is already available there via
NodeMapViewModel's MeshLog.NODE_NUM_LOCAL routing — no new map overlay
needed. buildGpx() uses kotlinx-datetime Instant for UTC timestamps and
formatString("%.7f", ...) to avoid scientific notation in xs:decimal attrs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PositionLogScreenalready displays position history for any node, including the local device (viaNodeMapViewModel'sMeshLog.NODE_NUM_LOCALrouting). The only missing piece was GPX export. This adds it as a second export button alongside the existing CSV export, with no new screens, view models, or map overlays.🌟 New Features
FileDownloadicon) onPositionLogScreen, gated onpositions.isNotEmpty()savePositionGpx(uri, data, trackName)onMetricsViewModelmirroring the existingsavePositionCSVpatternbuildGpx()emits valid GPX 1.1 with<trkpt lat lon>, optional<ele>, and<time>(ISO-8601 UTC viakotlinx-datetime); coordinates formatted withformatString("%.7f", …)to avoid scientific notation inxs:decimalattributes; positions withtime <= 0are skipped🧹 Chores
export_gpxstring resource