trails/packages/gpx/src
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
..
compute-days.test.ts feat(gpx): per-day ascent/descent from cleaned elevation 2026-07-14 01:04:12 +02:00
compute-days.ts feat(gpx): per-day ascent/descent from cleaned elevation 2026-07-14 01:04:12 +02:00
daybreaks-extraction.test.ts Add per-day map coloring and remaining unit tests 2026-04-11 00:12:27 +02:00
elevation-clean.test.ts feat(gpx): elevation cleaning primitives (despike + hysteresis totals) 2026-07-14 00:46:13 +02:00
elevation-clean.ts feat(gpx): elevation cleaning primitives (despike + hysteresis totals) 2026-07-14 00:46:13 +02:00
elevation-series.test.ts feat(gpx): apply elevation cleaning to totals + profile chart 2026-07-14 00:56:36 +02:00
elevation-series.ts feat(gpx): apply elevation cleaning to totals + profile chart 2026-07-14 00:56:36 +02:00
generate.test.ts Add per-waypoint notes and nearby POI snap to Planner 2026-05-17 23:58:21 +02:00
generate.ts Add per-waypoint notes and nearby POI snap to Planner 2026-05-17 23:58:21 +02:00
geom.test.ts feat(gpx): lenient point parsing + route (<rte>) support 2026-07-14 00:06:35 +02:00
index.ts journal-elevation-profile: elevation chart + map↔chart sync 2026-06-12 15:34:45 +02:00
moving-time.test.ts activity-stats: shared StatRow + canonical metrics across surfaces 2026-06-12 14:48:36 +02:00
moving-time.ts activity-stats: shared StatRow + canonical metrics across surfaces 2026-06-12 14:48:36 +02:00
nogo.test.ts Add unit tests for no-go area round-trip and waypoint extraction 2026-04-03 12:50:57 +01:00
parse-node.test.ts test(gpx): fixture corpus + verification (groups 5–6) 2026-07-14 00:30:46 +02:00
parse.test.ts feat(gpx): apply elevation cleaning to totals + profile chart 2026-07-14 00:56:36 +02:00
parse.ts feat(gpx): apply elevation cleaning to totals + profile chart 2026-07-14 00:56:36 +02:00
timestamp-repair.test.ts feat(gpx): post-parse timestamp repair 2026-07-14 00:10:57 +02:00
timestamp-repair.ts feat(gpx): post-parse timestamp repair 2026-07-14 00:10:57 +02:00
types.ts feat(gpx): apply elevation cleaning to totals + profile chart 2026-07-14 00:56:36 +02:00
waypoints.ts Include waypoint note in GPX export and extractWaypoints type 2026-05-18 07:38:55 +02:00