OVERWATCH
Autonomous Swarm Ground Control System
Role
Solo Engineer
Duration
2025
Team
Solo
Status
Shipped
Overview
I designed and built OVERWATCH solo: a full-stack ground control system for autonomous drone swarms — 2 to 50 vehicles, any flight controller, any protocol. The system is a monorepo with four modules: a tactical HUD (src/hud) with Leaflet.js and Canvas for real-time map rendering across four operational modes, an Electron desktop simulator (drone-sim) with React 18, Three.js, and Zustand for 3D flight visualization and physics simulation, a Python FastAPI ground control server (backend) handling 10Hz telemetry aggregation, swarm coordination, collision avoidance, geofence enforcement, and a shared protocol layer (src/shared) enforcing type-safe contracts across MAVLink 2.0 and MSP serial protocols. WebSocket broadcasts push telemetry to all connected clients. WebRTC streams sub-100ms video from onboard cameras. 76+ tests across 7 suites.

Problem
Ground control stations are built by engineers who have never watched an operator lose a drone because the battery warning was buried three tabs deep. The standard interface dumps raw telemetry into tables, scatters controls across modal dialogs, and treats a map pin as sufficient spatial awareness. Operators running a six-drone swarm are forced to context-switch between views to answer basic questions: which asset is degraded, what is its heading, can I redirect it. Beyond the interface, most GCS software only supports a single flight controller protocol and has no real swarm intelligence — no formation geometry, no collision avoidance, no automatic leader election, no geofence enforcement. The gap is not hardware. It is the entire software stack between the radio and the operator's decision.
Approach
- 01Architected a three-tier system: operator workstation (Tactical HUD + Drone Simulator), ground control server (FastAPI + Uvicorn async), and hardware abstraction layer (MAVSDK for MAVLink 2.0, custom async MSP parser for Betaflight/INAV) — connected to UAV fleets over 5.8GHz WiFi mesh with RFD900x radio fallback
- 02Built the Tactical HUD (src/hud) with four operational modes — Monitor, Command, Replay, Solo FPV — each reconfiguring panel layout while keeping the drone list and map as fixed spatial anchors. Leaflet.js with CARTO dark basemap for tactical rendering, Canvas API for attitude indicators, sparkline charts, and FPV OSD overlay
- 03Engineered 10Hz telemetry pipeline: hardware telemetry feeds mutable DroneState objects, aggregated into TelemetryPacket arrays (Pydantic v2 serialization), broadcast over WebSocket to all clients, with parallel alert engine checks (7 rules with per-drone cooldown suppression), O(n2) pairwise collision avoidance via haversine distance, and ray-casting geofence enforcement
- 04Implemented six formation patterns — V-Formation, Line Abreast, Column, Diamond, Orbit, Scatter — with heading-aware coordinate transforms that rotate body-frame offset vectors to WGS84 using the leader's heading, and 3-second Hermite smoothstep interpolation for formation transitions
- 05Built modified Raft consensus for automatic leader election using multi-factor weighted scoring: 30% battery, 25% GPS quality, 25% link quality, 20% formation position — battery weighted highest because leader failure from power loss is catastrophic. 1000ms heartbeat, 5000ms election timeout
- 06Designed collision avoidance with haversine great-circle distance for horizontal separation and 3D Euclidean distance check against a 5m safety bubble at 10Hz. Stress-tested at 50 drones (1,225 pair comparisons per tick) completing in under 2 seconds. Lower-altitude drone always yields
- 07Built the Electron drone simulator with React 18, Three.js, and Zustand — procedural drone geometry with animated propellers, 30Hz local physics engine with PID controllers per axis, motor mixing matrix for X-configuration, ground effect modeling, wind force simulation, and six sensor noise models (IMU, GPS, barometer, magnetometer, LiDAR, camera) with four preset levels
- 08Implemented full hardware abstraction: MAVSDK 2.0 with async UDP for PX4/ArduPilot, custom binary MSP parser with 7-state decoder and XOR checksum for Betaflight, USB auto-detection scanning VID/PID tables at 5-second intervals with automatic protocol detection across three baud rates
- 09Shipped 18 REST endpoints with JWT auth (HS256, 8hr TTL, operator/viewer roles), WebRTC video streaming via aiortc with sub-100ms latency, goggles integration bridges for DJI, HDZero, and Walksnail systems, and DVR recording with synchronized telemetry JSON export
Design Decisions
Technology Stack
Tactical HUD
Simulator
Backend
Protocols
Algorithms
Impact
Fleet
2–50
Stress-tested at 50 drones — 1,225 pairwise collision checks per tick, all safety systems nominal
Telemetry
10Hz
Full telemetry pipeline: position, attitude, velocity, battery, GPS, link quality, formation state per drone
Latency
<100ms
Sub-100ms WebRTC video streaming, 100ms telemetry broadcast interval, sub-200ms HUD render
Tests
76+
7 test suites: formation geometry, collision avoidance, geofence, wire protocol, MSP, stress, API integration
Endpoints
18
Full REST API surface with JWT auth, WebSocket telemetry, WebRTC video, and mission control
Next Case Study
DroneNexus↗