feat(trail): add trail recording with pause/resume and GPX 1.1 export#85
feat(trail): add trail recording with pause/resume and GPX 1.1 export#85jasoneplumb merged 2 commits intomainlinefrom
Conversation
Implements issue #77: trail recording with real-time polyline, pause/resume state machine, and GPX 1.1 auto-download on stop. Adds elevation (<ele>) capture from device GPS to satisfy GPX 1.1 schema and Strava/Garmin import. Applies accuracy >30m discard and <5m distance jitter filters on every fix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code ReviewThis is a clean, well-scoped PR. The altitude feature is added with minimal footprint across exactly the right three files. A few observations: What looks goodType propagation is consistent. GPX element ordering is spec-compliant. GPX 1.1 schema requires Null → undefined conversion is the right pattern. One concern worth verifying
Run const altM = (e.altitude as number | null) !== null ? e.altitude : undefined;Minor nit
SummaryThe implementation is correct and the scope is tight. The only thing worth a quick double-check is whether |
…time behavior Leaflet types altitude as number but it is null at runtime when the device does not report elevation. The cast makes the null-guard intentional and explicit rather than a no-op from TypeScript's view. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code ReviewThe previous review flagged the Leaflet type mismatch on What looks goodPrevious concern resolved. GPX spec compliance confirmed. GPX 1.1 requires
One informational note (no action required)
SummaryClean, minimal PR. The scope is tight (10 additions, 6 deletions across exactly the right three files), the previous review concern is addressed, and the GPX output is spec-compliant. No blockers. |
Closes #77
Summary
<trkseg>elements;<ele>tag now populated from device altitude when availableTest plan
track-YYYY-MM-DD-HHmm.gpx<ele>values appear in GPX🤖 Generated with Claude Code