docs: add BUG-21 — OBD speed dropout mid-drive, GPS-only replay
This commit is contained in:
@@ -24,6 +24,23 @@ When CLOSED, move the entire entry to Resolved — don't duplicate.
|
||||
fills the cards immediately on load (and every 15 s) via REST. Needs in-car
|
||||
verification.
|
||||
|
||||
### BUG-21 — OBD speed drops out mid-drive, replay shows 0 km/h (GPS-only)
|
||||
- **Status**: `OPEN` 2026-08-14
|
||||
- **Phase**: 29
|
||||
- **Symptom**: in the portal trip replay, a ~20-minute stretch of the 2026-08-13 evening
|
||||
drive shows "GPS: 0.0 km/h" even though the car was moving (GPS positions advance).
|
||||
- **Cause**: the Pi's OBD adapter (ELM327) stopped returning speed mid-drive — the last OBD
|
||||
speed reading in trip #9 was 22:23:50 UTC and it didn't return until 22:43:41 UTC (trip #10),
|
||||
a ~20-minute gap. During that gap `_log_loop()` logged rows with GPS coords but NULL speed
|
||||
(`insert_tracking(gps_x, gps_y, speed=None, …)`) — there is no GPS-derived speed fallback, so
|
||||
the SPEED column stays NULL and the replay shows 0.0 km/h (`speed_source="gps"`).
|
||||
- **Data**: trip #9 has 723 points — 570 with OBD speed, 25 with speed=0, 128 with NULL speed.
|
||||
- **Fix (proposed)**:
|
||||
1. GPS-speed fallback in `_log_loop()` — when OBD speed is None/0 but GPS coords exist,
|
||||
compute speed from the previous position (haversine / elapsed time) and log that as SPEED,
|
||||
so the replay shows the real speed (sourced "gps").
|
||||
2. Investigate why the OBD adapter didn't recover for ~20 min (reconnect on stalled reads).
|
||||
|
||||
---
|
||||
|
||||
## Resolved
|
||||
|
||||
Reference in New Issue
Block a user