feat: persistent sessions, remove track_map use case, car characteristics DB
- Remove obsolete TrackMap use case variant (superseded by TrackMapping)
- Add session/run/analysis persistence: metadata to data/sessions/<id>.json,
frames to <id>.frames.json (split for lazy loading)
- Atomic writes (temp + rename), compact JSON, off-thread frame serialization
- load_all loads metadata only at startup; ensure_frames_loaded lazy-loads
frames before analysis
- Normalize Recording runs to Stopped on reload (stale ring-buffer markers)
- Cache car_name on UseCaseSession during run finalization
- Add characteristics.rs: aggregate shift-point data per car across sessions
- New API: GET /api/characteristics/cars, GET /api/characteristics/cars/{car}
- Add Deserialize to TelemetryFrame and FeedSource for session round-trip
This commit is contained in:
parent
937090681f
commit
ed7dbcf1c9
7 changed files with 477 additions and 17 deletions
|
|
@ -3,10 +3,10 @@
|
|||
//! Both the KSUDP (port 9996) and Telemetry Tool (port 10101) parsers produce
|
||||
//! `TelemetryFrame` instances from their raw binary data.
|
||||
|
||||
use serde::Serialize;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Identifies which feed source produced this frame.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub enum FeedSource {
|
||||
Ksudp,
|
||||
TelemetryTool,
|
||||
|
|
@ -20,7 +20,7 @@ pub const NUM_WHEELS: usize = 4;
|
|||
///
|
||||
/// Fields present in both feeds are stored directly; fields unique to one feed
|
||||
/// are wrapped in `Option`.
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct TelemetryFrame {
|
||||
// ── Speed ──────────────────────────────────────────────────────
|
||||
pub speed_kmh: f32,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue