feat: initial rusty-telemetry UDP listener
- Async UDP listener on configurable bind address (default 127.0.0.1:5005) - RUSTY_TELEMETRY_BIND env var for cross-machine deployment - Deserializes JSON telemetry frames with serde - deny_unknown_fields for schema drift detection - ReceiveStats tracker with packet rate and data rate - Locked stdout writes for efficient output - .gitignore for /target/ and .idea/
This commit is contained in:
commit
30543fd0ba
7 changed files with 797 additions and 0 deletions
45
README.md
Normal file
45
README.md
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# rusty-telemetry
|
||||
|
||||
Sim racing telemetry receiver and analyzer. Phase 1 provides a simple UDP listener that receives JSON telemetry frames and prints them to stdout.
|
||||
|
||||
## Build and Run
|
||||
|
||||
```bash
|
||||
cargo run
|
||||
```
|
||||
|
||||
The listener binds to `0.0.0.0:5005` and expects UDP packets containing JSON with the following structure:
|
||||
|
||||
```json
|
||||
{
|
||||
"timestamp": 1716123456.789,
|
||||
"speed_kmh": 245.3,
|
||||
"rpm": 8750,
|
||||
"gear": 6,
|
||||
"throttle": 0.85,
|
||||
"brake": 0.0,
|
||||
"steering": 0.12,
|
||||
"g_forces": { "x": 0.5, "y": -0.2, "z": 1.0 },
|
||||
"wheel_slip": [0.1, 0.1, 0.0, 0.0],
|
||||
"suspension_travel": [0.15, 0.14, 0.16, 0.15],
|
||||
"lap_time": 85.234,
|
||||
"lap_count": 5
|
||||
}
|
||||
```
|
||||
|
||||
Press Ctrl+C to stop.
|
||||
|
||||
## Testing
|
||||
|
||||
Send a test packet from another terminal:
|
||||
|
||||
```bash
|
||||
echo '{"timestamp":1.0,"speed_kmh":100.0,"rpm":5000,"gear":3,"throttle":0.5,"brake":0.0,"steering":0.0,"g_forces":{"x":0.0,"y":0.0,"z":1.0},"wheel_slip":[0.0,0.0,0.0,0.0],"suspension_travel":[0.1,0.1,0.1,0.1],"lap_time":60.0,"lap_count":1}' | nc -u -w0 127.0.0.1 5005
|
||||
```
|
||||
|
||||
## Future Plans
|
||||
|
||||
- Telemetry parsers for multiple sim formats
|
||||
- Persistent storage (SQLite or similar)
|
||||
- Real-time dashboard / web API
|
||||
- Lap analysis and comparison tools
|
||||
Loading…
Add table
Add a link
Reference in a new issue