trails/packages
Ullrich Schäfer 29be9cbe5f
feat(gpx): apply elevation cleaning to totals + profile chart
Task group 2 (part a) of elevation-profile-hardening — wire the group-1
primitives into the headline stat and the chart.

- computeElevation (parse.ts): despike each segment's elevation sequence,
  then take filteredTotals; gain/loss are now noise-filtered (no more
  20–50% inflation from per-point jitter), the profile is built from the
  despiked data, and additive gainRaw/lossRaw expose the unfiltered sums.
- elevationSeries: despike per segment (no cross-trkseg interpolation)
  before downsampling, so the chart and the headline totals derive from
  the same cleaned data.
- types.ts: GpxData.elevation gains gainRaw/lossRaw (additive).

Well-formed monotonic climbs are unchanged (steps exceed the 5 m
threshold → filtered == raw); a shared noisy-track test proves jitter is
filtered and a 300 m single-point spike is interpolated out of both the
totals and the chart.

Verified: gpx 111/111; full pnpm typecheck 13/13, lint 13/13, test 11/11
(journal + planner compile with the additive fields).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 00:56:36 +02:00
..
api route-surface-breakdown (Phase 1): Planner-path surface/waytype bars 2026-06-14 18:46:49 +02:00
db feat(journal): federation instance blocklist 2026-07-13 22:59:11 +02:00
fit test(fit): adapt single-point GPX case to the parser's <2-point drop 2026-07-14 00:17:49 +02:00
gpx feat(gpx): apply elevation cleaning to totals + profile chart 2026-07-14 00:56:36 +02:00
i18n route-surface-breakdown (Phase 1): Planner-path surface/waytype bars 2026-06-14 18:46:49 +02:00
jobs build(deps): bump the production group across 1 directory with 35 updates 2026-07-13 09:29:56 +02:00
map-core poi-index: Grafana dashboard/alert, docs, privacy manifest 2026-07-12 22:54:51 +02:00
sentry-config Fix sentry-config typecheck: explicit types: [node] in tsconfig 2026-04-18 00:43:48 +02:00
types one source of truth for Route/Activity shapes; enforce api contracts 2026-06-10 07:39:50 +02:00