← All projects

Project 03 · 2026

Ground Control Station: LoRa Controller and Receiver Design

Desktop ground control software for UAVs: decodes telemetry from a serial link, draws flight instruments and uploads missions from a map.

Role
Sole developer
Platform
Electron (macOS / Windows)
Stack
React 19, Vite, Leaflet
Source
GitHub ↗

03.1Summary

During a flight the operator needs to see the vehicle's state on one screen and be able to change the route on the fly. Off-the-shelf ground stations (Mission Planner, QGroundControl) are tied to MAVLink, whereas my boards use a smaller binary protocol I defined myself.

So I wrote a ground control station that runs on Electron. It decodes packets from the serial port, draws a primary flight display (PFD) with an artificial horizon and speed/altitude tapes, and sends a mission built on the map to the vehicle with a checksum.

03.2Block diagram

Ground control station block diagram UAV flight controller Radio / serial 57600 baud Electron main serialport · IPC Packet parser DataView · 0xAA 0xBB PFD + telemetry horizon · tapes Mission planner Leaflet · waypoint telemetry mission

03.3Telemetry packet

Every packet from the vehicle is 34 bytes. The parser syncs on the 0xAA 0xBB header; fields are little-endian scaled integers.

OffsetTypeFieldScale
0–1u8 ×2header0xAA 0xBB
2int16roll/100 → °
4int16pitch/100 → °
6int16yaw/100 → °
8int16altitude/10 → m
10int16speed/100 → m/s
12uint8battery/10 → V
13uint8satellites—
14uint8GPS fix—
15uint8flight mode—
16int32latitude/10⁷ → °
20int32longitude/10⁷ → °

When a mission is uploaded, each waypoint is packed into 11 bytes: latitude and longitude as float32, altitude as int16, command as uint8 (16 waypoint, 20 RTL, 21 land, 22 takeoff). The packet ends with a two-byte Fletcher-16 checksum.

03.4Features

PFDArtificial horizon, speed and altitude tapes, circular gauges
MapLive position with Leaflet, route drawing, drag-and-drop waypoint editing
SafetyGround elevation is fetched for each waypoint; those below the minimum safe altitude raise a warning
PerformanceUI refresh rate is throttled; incoming data is buffered
PersistenceTheme, units, baud rate and audio alert settings persist; missions save/load as JSON
SetupFrame type selection, motor test and direction, servo min/max/trim limits (UI)

03.5Status

  • Serial port management and binary protocol parser
  • PFD, map and telemetry panels
  • Waypoint upload and in-flight re-routing
  • Reading the mission back from the vehicle (waypoint download)
  • RC override with a USB gamepad
  • Writing Setup screen settings to the vehicle