← Back to Projects
Distributed Fleet Telemetry Pipeline
Tech: Python, MAVLink, Apache Kafka, Redis, FastAPI, WebSockets, React
Overview
When testing autonomous drones, serial logs on an SD card only tell you what went wrong after a crash. I built a ground-station telemetry pipeline that bridges binary MAVLink radio packets into Apache Kafka, runs rolling fault detection across a simulated 15-vehicle fleet, and pushes state updates and alerts to a React dashboard in real time.
Architecture & Engineering Details
- MAVLink Ground-Radio Bridge: Wrote a Python MAVLink bridge that reads binary attitude, IMU, barometer, and battery frames over a long-range telemetry radio, normalizes them into typed schemas, and publishes keyed by
drone_id so per-drone message ordering is preserved across 6 Kafka partitions.
- 15-Drone Async Load Generator: Built an asynchronous load simulator capable of saturating the broker at 15,000+ events/sec with configurable battery sags, GPS dropouts, and rapid-descent faults to benchmark consumer lag.
- 5-Second Rolling Window Anomaly Detection: Maintained per-vehicle sliding windows in Redis to compute vertical descent rates and voltage-drop slopes over trailing 5-second intervals, flagging faults in under 50 ms without slowing down the consumer group.
- Schema Validation & Dead-Letter Routing: Validated incoming payloads before state updates and routed corrupt radio frames or out-of-range fields to a dedicated dead-letter topic so a single bad packet never stalls a partition consumer.
- FastAPI WebSocket & Redis State Layer: Cached latest vehicle state in Redis for instant initial page loads and broadcast incremental updates and fault alerts over FastAPI WebSockets to a React/TypeScript map and telemetry view.