DroneStats

A web dashboard for ArduPilot drones, with flight attitude, onboard computer health and battery data in one place. Follow flights in 3D, edit waypoint missions and preview routes before sending movement commands.

Type
Personal Tool
Year
2026
Role
Solo developer
Stack
Python, pymavlink, JavaScript, WebGL2, MAVLink

Overview

When I used Mission Planner, its interface felt very dated. It shows the most information, but it isn’t intuitive. I also kept thinking that since our aircraft carried an Orange Pi as its onboard computer, using it only to run one simple Python script was a bit of a waste.

So I wrote DroneStats for our EECS 195 Drone aircraft outside the course work. It runs on the aircraft’s Orange Pi Zero 3W and reads flight controller data through mavlink-router. Any computer or phone on the same Tailscale network can open it in a browser. The interface comes in Chinese and English.

First time on the real aircraft

I first connected it to the real aircraft before the course’s LLM lab. It was read-only then and its features were incomplete, so nothing went wrong. It still wasn’t as intuitive as I wanted.

It did help us confirm one problem, though. When we flew in the 20-foot cage, the ground station kept reporting High HDOP and refused to arm. DroneStats showed that the actual HDOP reading was 1.8, and in that environment there was no way to improve it. We later raised the HDOP limit slightly, from 1.4 to 1.8, which more or less solved it.

What it shows

Open the page and altitude, speed, battery and connection status update with the telemetry. The chase view puts the aircraft, the planned route and the path flown so far into one 3D scene. Switch to first-person view and the horizon tilts with the aircraft. The four motor outputs sit around the crosshair, turning amber at 75% and red at 90%. GPS status, the radio link and the flight controller’s checks are on the page too, and each can be opened for details.

I’ve always wanted the 3D view to look good, so I added a sky and a sun that change with the time of day. The scene is drawn directly in WebGL2. A fragment shader generates the sky, ground, sun and stars, and the sun’s position and the sky’s colors are worked out from the aircraft’s location and the current time. The screenshot shows the evening sky at the simulator’s location. Looking at it now, I think it still falls short.

The Pi itself is quite weak, though, so I leave all of the computation to the client.

The battery page has total voltage, average voltage per cell, a voltage graph for the flight and an estimate of remaining flight time. The onboard computer has a page of its own, with CPU usage, temperature, memory and network connections.

In other words, you can quickly confirm whether the currently connected network is the expected network, and how its signal strength is.

Map and missions

The satellite map overlays the planned waypoints with the track the aircraft flew, so you can compare the two after a flight. Geofences and rally points stored on the flight controller are drawn there too.

You edit missions on the same map. You can add and drag waypoints, insert one between two existing points, and set up loiters, circles and landings. You can import existing .waypoints and .plan files and export the edited plan. Changes stay in a browser draft, and uploading is only allowed while the aircraft is disarmed. After an upload, the service reads back what the flight controller really stored and checks it.

Confirming a command

What took the most time was confirming a command before it runs. This part really does send commands to the flight controller, so safety is essential.

My first idea was to require a long press for every action, because I worried about a stray tap sending a real command to the flight controller. A three-second hold on every button turned out to be a bit too much trouble, so I switched to using the predicted route as a second confirmation. Now only the button that turns on execution has to be held. Everything else takes a single press. A command that would move the aircraft isn’t sent right away. The page first draws the predicted route and lists the distance, estimated time and endpoint, and the command goes out only when you press Run. Takeoff, flying to a point, landing at a chosen spot and return-to-launch all work this way.

The prediction is computed in the browser. It uses the parameters the flight controller reports and follows how ArduCopter 4.7.1 flies. Speed, climb and descent rates, and braking distance all go into it, and it assumes still air. When I compared it against SITL, the aircraft stopped within a few meters of the predicted spot.

Once, when I ran a loiter in the simulator, the current altitude wasn’t passed along correctly and the aircraft dove straight into the ground. So I put a lot of work into safety. The page is read-only by default, and only one page at a time can send control commands. The onboard service checks the parameters, the flight mode and the current state. If a page has gone more than three seconds without live data, the service refuses new execution requests. After each action, the interface shows the flight controller’s reply and how the telemetry changed.

Right now I feel the lines for the predicted route, the path being flown and the endpoint may not be clear enough, and in a complicated situation they may not be intuitive either.

On the aircraft and in the browser

The onboard side is a Python service that uses pymavlink to receive telemetry, keep track of the aircraft’s state and talk to the flight controller. The 3D scene and the route estimates are left to the computer or phone that has the page open. When nobody has the page open, the service doesn’t connect to the flight controller. While someone is watching, it keeps the last half hour of telemetry.

On this quadcopter’s real flights, I have only used DroneStats to monitor telemetry. It hasn’t sent a command to the real aircraft yet. I verified movement commands and route previews in ArduCopter 4.7.1 SITL, and the automated tests use a fake flight controller to cover flight, low battery and a lost radio link.

How to use it

  1. On the aircraft

    The installer sets up the Python environment and a service that starts at boot. DroneStats connects to the flight controller through mavlink-router.

  2. Desktop and phone

    Reach the onboard computer over Tailscale and use the dashboard in a browser. The same interface supports English and Chinese.

  3. Try it in the simulator

    Connect to ArduCopter SITL to view telemetry, edit missions and test commands through the same interface. The page labels the aircraft as simulated.

Search

Quick actions