← blog

ThornPass 1.2: elevation smoothing and segment export

2026-04-14 · Marco Ferretti

ThornPass 1.2 ships with two long-requested features: configurable elevation smoothing and GPX segment export.

Elevation smoothing

Raw GPX elevation data from consumer GPS units is noisy. A single switchback can show 30-metre spikes that inflate your recorded gain by hundreds of metres over a long route. Earlier versions of ThornPass passed this data through unchanged, which frustrated people comparing their numbers against Strava or Garmin.

Version 1.2 adds a --smooth flag that applies a Savitzky-Golay filter with a configurable window. The default window (11 points at a typical GPS recording interval of 1 second) removes most noise while preserving real climbs. You can widen it if you're doing coarse route planning, or set it to 0 to disable.

Segment export

thornpass split now accepts a --max-distance argument and writes numbered output files. Useful if you've recorded a multi-day trip as a single track and want to analyse each day separately.

The splitting algorithm finds the closest track point to each target distance and cuts there, so the resulting files share no duplicate points and merge cleanly with thornpass merge.


Also: GPX parsing gotchas you won't find in the spec