You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+115Lines changed: 115 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -514,6 +514,121 @@ Dashboard validates threshold ranges before sending to ESP32:
514
514
**Changed from WebSocket (ap_enabled branch):**
515
515
Originally used WebSocket push at 30Hz but this caused thread starvation. Refactored to HTTP polling for reliability.
516
516
517
+
### Autotune System
518
+
519
+
**Overview:**
520
+
Autotune learns vehicle-specific mode detection thresholds from a calibration drive. Instead of generic presets, thresholds are derived from actual sensor data captured during normal driving.
521
+
522
+
**Why Autotune?**
523
+
- Every vehicle has different suspension, tire grip, weight distribution
524
+
- Generic thresholds may trigger too early (sensitive car) or too late (stiff car)
525
+
- Calibration captures your specific vehicle's g-force characteristics
526
+
527
+
**Data Flow:**
528
+
```
529
+
Telemetry → Event Detection → Categorization → Median Calculation → Scaling → All Profiles
Copy file name to clipboardExpand all lines: README.md
+63Lines changed: 63 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -643,6 +643,69 @@ You can trigger recalibration from the dashboard:
643
643
644
644
---
645
645
646
+
## Autotune (Threshold Calibration)
647
+
648
+
The **Autotune** feature learns your vehicle's characteristics from a single city drive and automatically generates optimized thresholds for all 4 driving profiles.
649
+
650
+
### Why Autotune?
651
+
652
+
Default presets use generic thresholds, but every vehicle is different:
653
+
- A sports car can pull 1.0g lateral; a minivan might max at 0.5g
654
+
- Your driving style affects typical G-forces
655
+
- One calibration drive personalizes ALL presets to YOUR vehicle
656
+
657
+
### How to Use Autotune
658
+
659
+
1.**Open the dashboard** at `http://192.168.71.1`
660
+
2.**Tap "Autotune"** in the menu
661
+
3.**Wait for GPS lock** (required before starting)
662
+
4.**Select a scenario** (Guided, Parking Lot, or Free Drive)
663
+
5.**Tap "Start Calibration"** and drive normally for 10-20 minutes
664
+
6.**Collect events**: accelerations, brakes, and turns
665
+
7.**Review results** - the system generates all 4 profiles
666
+
8.**Tap "Apply"** to save and activate
667
+
668
+
### What Gets Generated
669
+
670
+
From your city driving baseline, Autotune generates 4 vehicle-specific profiles:
671
+
672
+
| Profile | Scaling | Use Case |
673
+
|---------|---------|----------|
674
+
|**Track**| 2.0-3.0× baseline | Racing, track days |
The more events you collect, the more accurate the thresholds:
682
+
683
+
| Events | Confidence | Recommendation |
684
+
|--------|------------|----------------|
685
+
| 3-7 each | Low | Keep driving |
686
+
| 8-14 each | Medium | Good for most uses |
687
+
| 15+ each | High | Excellent accuracy |
688
+
689
+
### Export Data
690
+
691
+
Autotune exports comprehensive JSON for analysis:
692
+
- All 4 generated profiles
693
+
- Raw event data (peaks, durations, speed changes)
694
+
- Physics validation metrics
695
+
- Scaling factors used
696
+
697
+
This data helps evaluate calibration quality and can be used for post-analysis.
698
+
699
+
### Tips for Best Results
700
+
701
+
-**Drive normally** - don't exaggerate maneuvers
702
+
-**Include variety** - different turn directions, brake intensities
703
+
-**Flat ground preferred** - inclines can affect readings
704
+
-**More driving = better** - the progress bar is just the minimum
705
+
-**GPS lock required** - ensures accurate speed validation
706
+
707
+
---
708
+
646
709
## Mobile Dashboard
647
710
648
711
The firmware includes a built-in web dashboard that runs directly on the ESP32. No external server needed - just connect your phone and view live telemetry.
0 commit comments