# Ridgeline — MTB telemetry → 3D game-replay *Turn a ride's telemetry (GPS + IMU/lean + HR) into a rideable 3D game-replay on the real mountain, opened as a URL, with switchable cameras and a live HUD. Full plan: [PLAN.md](PLAN.md). Epic issue: #661.* ## Current focus - [ ] MTB kill-gate: Lucas GPX/FIT trail ride through live upload/replay - [ ] Flight go/no-go on Lucas XFH IGC replay (paragliding mode shipped #810) ## Next up - [ ] Terrain-glb bake (`terrain//package-v1.glb`, martini TIN + KTX2 drape) → fills `pose.y` + `manifest.terrain`; then load it on the web via GLTFLoader/KTX2 instead of the current client-side `buildTerrain` fallback - [ ] Server-side re-bake of retained raw uploads as the fusion engine improves (raw is stored per ride; the recorder path already bakes server-side) - [ ] Kill-gate review: does the "my ride became a video game" wow land? (blocks Phases 1–3) - [ ] Decide go/no-go on Phase 1 (server fuse+bake pipeline) after the kill-gate - [ ] Phase 2: R1 device build + gates on physical iPhone (simulator compile #808 shipped) - [ ] Phase 3: auto 9:16 highlight reel (HUD = watermark) + freemium gating ## Last touched - 2026-07-14 — Full-screen dial details with live charts (#880) - 2026-07-14 — START RIDE above Health (#878) - 2026-07-14 — Instrument-cluster home UI and app icon (#876) - 2026-07-14 — Calibration live HUD and failure copy (#874) - 2026-07-14 — Relaxed calibration brake gate (#872) - 2026-07-14 — XcodeGen keeps HealthKit entitlements (#868) - 2026-07-14 — HealthKit entitlements restored (#866) - 2026-07-14 — START crash GNSS clock fix (#864) - 2026-07-14 — Stop xcodegen clearing development team (#862) - 2026-07-14 — Zero Xcode warnings Swift 6 (#860) ## Blockers - (none) ## Open questions - Terrain: stay on self-hosted Terrarium/3DEP bake, or add Google Photorealistic 3D Tiles as a paid premium toggle later? - Phase-1 replay: keep the r3f web engine as the single renderer (shareable URL = growth loop), confirmed over native/Unity? ## Ideas - Auto-detect + label jumps/airtime once IMU-bearing sources (FIT with accel, GoPro GPMF, native recorder) are in — GPS-only can't do airtime - Two-run "ghost" comparison (distance-indexed) as the flagship premium feature - Sport modes: moto (lean/g-g), ski/snowboard (turns, airtime), e-bike ## Notes - Now wired into the site: the built Vite SPA serves at `/ridgeline` (`server.js` + Dockerfile), with the tool API at `/ridgeline/api` — gated upload + `rides` library (SQLite→GCS), public `replay/:slug` stream, and clean `/ridgeline/r/:slug` share links. Reuses the admin session + Cloud Run SA + GCS bucket (no new secrets/infra). The replay *engine* is still prototype-grade (client-side terrain, no glb bake yet). - Local dev: `npm --prefix projects/ridgeline install` then `npm --prefix projects/ridgeline run dev` → http://localhost:5173/ridgeline/ (SPA only; the tool API needs the main Express server). Click "Try the sample descent" or drop a `.gpx`/`.fit`/`.igc`. - Flight (IGC/PG): behind-only ribbon, paraglider avatar, POV hands on brakes. MTB: full ribbon, bike avatars. - Terrain data (free, no key): Terrarium DEM tiles (AWS Open Data) + Esri World Imagery. GPS-only lean is an *estimate* (curvature × speed) — honest lateral-G + airtime need a mounted IMU (per plan's honesty guardrail).