trails/openspec/changes/elevation-profile-hardening
Ullrich Schäfer 3db59d99e3
feat(gpx): per-day ascent/descent from cleaned elevation
Task group 2 (part b) + verification of elevation-profile-hardening.

compute-days.ts no longer sums every raw point-to-point delta for
cumulative ascent/descent (which overstated day totals the same 20–50%).
It now despikes each segment, runs cumulativeFilteredTotals once over the
despiked track, and maps the running filtered ascent/descent back onto the
flat allPoints indices (carrying forward across ele-less points). Day
totals = cumulative[end] − cumulative[start] therefore match the filtered
route total by construction. DayStage shape + rounding unchanged.

Test: a two-day split over the shared noisy/spiky track reports filtered
(not inflated) per-day ascent, and the day ascents sum exactly to the
whole-route filtered ascent.

Completes the change (11/11). Verified: gpx 112/112; full pnpm typecheck
13/13, lint 13/13, test 11/11 (journal + planner compile unchanged).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 01:04:12 +02:00
..
specs/elevation-computation docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
.openspec.yaml docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
design.md docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
proposal.md docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
tasks.md feat(gpx): per-day ascent/descent from cleaned elevation 2026-07-14 01:04:12 +02:00