Sim Racing Telemetry Analysis Platform — Project Plan

# Sim Racing Telemetry Analysis Platform — Project Plan

*(Sections 1–7 unchanged from previous update)*

---

## 8. Repositories & Deployment

### Repo: `rusty-telemetry` (Main Rust Backend)

| Field | Value |
|---|---|
| **Status** | **v0.7.1 — Car grip analysis use case (envelope extraction)** |
| **API Reference** | [rusty-telemetry — REST API Reference](joplin://0c837f4e6b7e462a997cbc19e47c864a) |

### Repo: `racecraft` (Vue.js Web Client)

| Field | Value |
|---|---|
| **Status** | **v0.1.6 — GripAnalysisView (grip envelope, grip circle, steering response)** |
| **Client Notes** | [racecraft — Vue.js Web Client Notes](joplin://50a09627d5d347009197b94bcee90411) |

---

## 9. Implementation Phases

*(Phases 1.0–1.12 unchanged — see note history for details)*

- **1.13 Car Grip Analysis — IMPLEMENTED 2026-06-24 (both repos)**
  - [x] **New `UseCase::CarGrip` variant** — race-pace grip characterization via envelope extraction
    - Guidance: "Drive 3–5 laps at race pace. Brake hard, carry speed through corners..."
    - No special driving protocols needed — the harder you push, the more complete the profile
  - [x] **`analyze_car_grip()`** in `analysis.rs`:
    - Speed-binned envelope: 10 km/h bins, peak |lateral G|, peak accel G, peak brake G per bin
    - Grip circle scatter: (longitudinal_g, lateral_g) downsampled to ~800 points
    - Steering response scatter: (steer, lateral_g, speed_kmh) downsampled to ~800 points
    - Summary: max lateral/accel/brake/combined G, peak lateral speed
    - Filters: excludes pit frames and speed < 5 km/h
  - [x] **racecraft: GripAnalysisView** (`/analysis/grip/:id`) with 4 charts:
    1. Grip Envelope (peak G vs speed — lateral/accel/brake lines)
    2. Grip Circle (longitudinal G vs lateral G scatter — friction circle)
    3. Cornering Grip vs Speed (peak lateral G vs speed)
    4. Steering Response (steer angle vs lateral G scatter)
  - [x] SessionDetailView: grip analysis quick stats (4 stat cards) + view button
  - [x] `car_grip` added to UseCase type, `CarGripAnalysis` types, `isCarGripAnalysis` type guard
  - [x] Global `.grid-4` CSS utility added
  - [x] Documentation updated: READMEs (both repos), Joplin notes
  - [ ] Add grip analysis unit tests
  - [ ] Extend car characteristics to include grip data (currently shift-points only)
  - [ ] Add slip-angle-based understeer detection (per-wheel slip_angle data available)

---

## 15. Change Log

### Recent Changes (summary)

| Version | Date | Highlights |
|---------|------|------------|
| rusty-telemetry v0.7.1 | 2026-06-24 | Car grip analysis use case: `analyze_car_grip()` with envelope extraction (speed-binned peak G), grip circle scatter, steering response scatter |
| racecraft v0.1.6 | 2026-06-24 | GripAnalysisView with 4 charts (grip envelope, grip circle, cornering grip vs speed, steering response), grip analysis types, SessionDetailView grip stats |
| rusty-telemetry v0.7.0 | 2026-06-24 | Session persistence, car characteristics DB, remove `track_map` use case |
| racecraft v0.1.5 | 2026-06-24 | CharacteristicsView, tracks views committed, track_map removal |
| *(earlier versions — see note history)* | | |

---

## 17.6 Grip Envelope

**Status (2026-06-24): Basic version IMPLEMENTED (car_grip use case).**

From race-pace laps: peak lateral G, peak accel G, peak brake G, binned by speed (envelope extraction). Produces the "grip circle" boundary. Used for coaching: "car can do 1.4g, you used only 1.1g".

Implemented via `car_grip` use case with `analyze_car_grip()`:
- Speed-binned envelope (10 km/h bins, max |G| per bin)
- Grip circle scatter (longitudinal vs lateral G)
- Steering response scatter (steer angle vs lateral G)
- Summary stats (max lateral/accel/brake/combined G)

Next steps: per-wheel slip angle understeer detection, extend characteristics DB with grip data, future structured trials (e.g. slowly rising steering angle to detect slip onset).

---

## 17.10 Implementation Priority

| Use Case | Depends On | Estimated Effort | Priority | Status |
|----------|-----------|-----------------|----------|--------|
| Track mapping | Spline data / position data | 3–5 days | P0 | ✅ DONE |
| **Grip envelope** | Telemetry G-force data | 2–3 days | P1 | ✅ Basic DONE (car_grip use case — envelope extraction) |
| Lap detection | Spline data in TT feed | 1–2 days | P0 | Pending |
| Corner analysis | Track model + lap detection | 3–5 days | P1 | — |
| Theoretical best lap | Lap detection + sectors | 2–3 days | P1 | — |
| Time loss attribution | Corner + grip + theoretical | 3–5 days | P2 | — |
| Coaching output | All of the above | 5–10 days | P2 | — |

---

*(Sections 10–14, 16, 18, 19 unchanged — see note history for full content)*

---

*Last updated: 2026-06-24 — v0.7.1 (rusty-telemetry) + v0.1.6 (racecraft): Car grip analysis use case with envelope extraction — `analyze_car_grip()` produces speed-binned peak G, grip circle scatter, steering response scatter. New GripAnalysisView with 4 charts. Updated §8, §9 (1.13), §15, §17.6, §17.10.*
*Next: test car_grip with live AC session tonight, add lap detection, extend characteristics with grip data, add understeer detection from slip angles.*

id: 6c0dcb2a567348fd9796f50c790082e4
parent_id: 0e8e00b432a840628faa4df5bc2068bc
created_time: 2026-05-31T16:57:08.879Z
updated_time: 2026-06-24T08:26:08.720Z
is_conflict: 0
latitude: 0.00000000
longitude: 0.00000000
altitude: 0.0000
author: 
source_url: 
is_todo: 0
todo_due: 0
todo_completed: 0
source: joplin-desktop
source_application: net.cozic.joplin-desktop
application_data: 
order: 1780246628879
user_created_time: 2026-05-31T16:57:08.879Z
user_updated_time: 2026-06-24T08:26:08.720Z
encryption_cipher_text: 
encryption_applied: 0
markup_language: 1
is_shared: 0
share_id: 
conflict_original_id: 
master_key_id: 
user_data: 
deleted_time: 0
type_: 1