diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-10-18 21:19:36 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-10-18 21:19:36 +0200 |
| commit | 8a0032d08862dcf28c653bee3fd21052e967e35d (patch) | |
| tree | 6cb0d8efe6f5c2bf9ce9eb3ef8306faecbe7cfeb /README.md | |
| parent | d575274d00c8da251df29d5d6a636044673944a3 (diff) | |
Cut climb profile sections in the backend
The chart steps are computed in Go and shipped as finished sections, next to
the profile statistics the climb package already owns: climb.ProfileSections
cuts a Route at its widest bends under a ProfilePolicy, and
rideanalysis.MergeClimbProfile takes over the merge that lived in
web/climbs.go, so web only loads the attempt rides and maps the DTOs.
The payload carries sections instead of raw elevations, and the browser keeps
what needs the canvas: slope bands, labels, distance ticks and colours.
official-climb-profile-logic.ts and its tests are gone, replaced by
climb/profile_test.go and a page test reading the embedded profile JSON.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -8,7 +8,7 @@ A Go toolkit for analyzing cycling rides from GPX exports: parse rides, detect c Rate limit aware and visible progress. **Climb detection** - Auto detect climbs with difficulty. Save official climbs for rematching. -Climb profile by 100m step. +Adaptive climb profile: drawn steps follow the slope changes. **Mountain pass** - Match climbs with mountain pass from OSM, and display on map. @@ -63,11 +63,11 @@ An OSM way is an ordered list of nodes; its `highway` tag describes the road typ - Go 1.27; SQLite via `mattn/go-sqlite3` - `geo` — coordinate distance, nearest-point, and shared `Interval` primitives; dependency-free -- `climb` — climb detection and scoring. A `Route` is the geometry-only trace (distances, elevations, coords), and `Detect` returns `[]DetectedClimb` (a climb plus its ride-relative start index). Provides slope and Cotacol difficulty scoring. Deliberately decoupled from `ride` +- `climb` — climb detection and scoring. A `Route` is the geometry-only trace (distances, elevations, coords), and `Detect` returns `[]DetectedClimb` (a climb plus its ride-relative start index). Provides slope and Cotacol difficulty scoring, and `ProfileSections` cuts a trace into the chart steps (widest bends first, bounded by a `ProfilePolicy`). Deliberately decoupled from `ride` - `ride` — GPX parsing and the ride value (embeds `climb.Route` for geometry, adding timestamps and telemetry), moving-time metrics, and SQLite persistence for imported ride metadata and versioned computed values - `official_climb` — matches official climbs against a route by endpoint coordinates and the recorded sample of the segment the climb was created from: a candidate passage outside ±50% of that sample's length or elevation gain is not the climb - `mountain_pass` — OSM PBF extraction (`mountain_pass=yes` / `natural=mountain_pass` nodes), pass storage and querying, and crossings/climb matching on `climb.Climb` -- `rideanalysis` — orchestrates a ride into analyzed climbs and mountain-pass crossings, and snapshots its official-climb attempts +- `rideanalysis` — orchestrates a ride into analyzed climbs and mountain-pass crossings, snapshots its official-climb attempts, and merges the recorded passages of an official climb into one chart profile - `strava` — OAuth2 client returning activity metadata and GPX data - `config` — typed YAML configuration and atomic persistence - `web` — HTTP server, OAuth callback, sync orchestration, and templ pages @@ -178,6 +178,7 @@ go tool pprof -http=:8081 http://localhost:8080/debug/pprof/heap # allocs ## TODO +- Do not use json tag in output, use json builders? - http://localhost:8080/rides/436: remove train part? - also http://localhost:8080/rides/438 - Garmin GPX: elevation, time, temp, HR, cadence @@ -197,7 +198,6 @@ go tool pprof -http=:8081 http://localhost:8080/debug/pprof/heap # allocs ### Official Climb - Keep trace apart from ride to display slope profile, compute cotacol -- Profile - Adaptative to show ramps - Record ride times on official climbs - Destination via Start |
