diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -9,6 +9,7 @@ A Go toolkit for analyzing cycling rides from GPX exports: parse rides, detect c - **Difficulty score (Cotacol)** — scores any ride or climb by splitting it into 100 m segments and summing `0.1 km × slope²` per segment - **Similar-climb matching** — finds the same climb across rides by matching start/end coordinates, so times can be compared - **Mountain pass download** — imports French mountain passes from centcols.org into a SQLite database +- **Pass crossing detection** — enriches passes with OSM coordinates, flags which passes a ride crosses, and names each climb after the pass it tops (e.g. "Col de Castellaras") - **Plots** — renders elevation and score-profile charts as PNG ## Getting started @@ -29,6 +30,18 @@ go build -o biking_home . # Run the climb-similarity and difficulty-score demo on the example rides ./biking_home -demo +# Import cached department CSVs (debug_department_06.csv, 13.csv) into the DB +./biking_home -import-cached + +# Extract mountain passes from a France OSM PBF into the DB +./biking_home -extract-osm /path/to/france-latest.osm.pbf + +# Backfill OSM coordinates onto passes (needs -extract-osm run first) +./biking_home -enrich + +# Render an elevation chart with climb highlights and pass markers +./biking_home -chart examples/2023-06-17.AlpesVerdonTour.gpx + # Profile the demo with Go's CPU profiler ./biking_home -demo -cpuprofile /tmp/cpu.prof ``` @@ -39,6 +52,10 @@ go build -o biking_home . | --- | --- | --- | | `-download` | Download mountain passes into the database | `false` | | `-resume` | Skip departments already cached on disk | `false` | +| `-import-cached` | Import cached department CSVs into the database | `false` | +| `-extract-osm` | Extract mountain passes from a France OSM PBF | `""` | +| `-enrich` | Backfill OSM coordinates onto passes | `false` | +| `-chart` | Render an elevation chart (climbs + passes) for a GPX file | `""` | | `-demo` | Run the climb-similarity demo | `false` | | `-cpuprofile` | Write a CPU profile to file | `""` | @@ -47,6 +64,7 @@ go build -o biking_home . - Go 1.23; SQLite via `mattn/go-sqlite3`; charts via `gonum.org/v1/plot` - `ride` — GPX parsing, climb detection, difficulty scores (KOM + Cotacol), similarity index - `mountain_pass` — centcols.org department CSV download into SQLite, with disk caching and retries +- `osmpass` — OSM PBF extraction (`mountain_pass=yes` nodes) and pass coordinate enrichment - **Notable choices** — the difficulty score follows the Cotacol method: the ride is split into fixed 100 m segments and each scores `distance_km × slope²`, so steep sections weigh exponentially more than long flat ones ## Development @@ -60,7 +78,6 @@ go test ./... - Compute estimated power - Export data from Strava / Garmin (GPX, TCX, FIT) -- Auto-detect when a mountain pass is crossed - Plot speed and slope per segment, colored by heart rate - Persist the chosen climb variant across activities - Handle historical data |