Skip to content

feat(node): add GPX export to position log screen#5919

Merged
jamesarich merged 1 commit into
mainfrom
feat/your-own-track
Jun 23, 2026
Merged

feat(node): add GPX export to position log screen#5919
jamesarich merged 1 commit into
mainfrom
feat/your-own-track

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

PositionLogScreen already displays position history for any node, including the local device (via NodeMapViewModel's MeshLog.NODE_NUM_LOCAL routing). 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

  • GPX 1.1 export button (FileDownload icon) on PositionLogScreen, gated on positions.isNotEmpty()
  • savePositionGpx(uri, data, trackName) on MetricsViewModel mirroring the existing savePositionCSV pattern
  • buildGpx() emits valid GPX 1.1 with <trkpt lat lon>, optional <ele>, and <time> (ISO-8601 UTC via kotlinx-datetime); coordinates formatted with formatString("%.7f", …) to avoid scientific notation in xs:decimal attributes; positions with time <= 0 are skipped

🧹 Chores

  • Added export_gpx string resource

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>
@github-actions github-actions Bot added the enhancement New feature or request label Jun 23, 2026
@jamesarich jamesarich enabled auto-merge June 23, 2026 19:34
@jamesarich jamesarich added this pull request to the merge queue Jun 23, 2026
Merged via the queue into main with commit e402df5 Jun 23, 2026
22 checks passed
@jamesarich jamesarich deleted the feat/your-own-track branch June 23, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant