flypi: Confirmed-Command Control of MAVLink Drones from Python Companion Computers, and Three Pitfalls Found by Fault Injection

Companion computers such as the Raspberry Pi increasingly run the high-level logic of research drones, but Python access to MAVLink autopilots is split between message-level tooling and heavier frameworks. We present flypi, a 947-line, single-dependency Python library whose every command is confirmed: it waits for an accepted COMMAND_ACK and then for the vehicle's own telemetry to show the requested state. We evaluate flypi 0.1.0 against a MAVLink vehicle emulator with seeded fault injection. Three findings generalise beyond flypi. First, confirmation latency is set by the vehicle's heartbeat period, not by the link: the median confirmed mode change took 81 ms at a 25 Hz heartbeat and 1012 ms at 1 Hz, while the acknowledgement arrived in about 41 ms in every case. Second, retrying on a missing acknowledgement, as the MAVLink command protocol prescribes, executes commands more than once when acknowledgements are lost. All 8 timeouts we observed under downlink loss were false failures: the vehicle had already changed mode. Third, a heartbeat sent from a background thread keeps a hung control script invisible to the autopilot's ground-station failsafe; the vehicle saw no heartbeat gap longer than 1.05 s while the main thread was blocked or spinning. We describe design changes that address each pitfall. All results come from emulation; validation on ArduPilot SITL and flight hardware is future work. The attached archive contains the LaTeX source, figures, the fault-injection harness and the raw JSON results. flypi is released under Apache-2.0.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-27
DOI
https://doi.org/10.5281/zenodo.24578429
Primary Topic
Aerospace Engineering and Control Systems
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

flypi: Confirmed-Command Control of MAVLink Drones from Python Companion Computers, and Three Pitfalls Found by Fault Injection

Vishwa GW
Zenodo (CERN European Organization for Nuclear Research)
Aerospace Engineering and Control Systems
preprint

flypi: Confirmed-Command Control of MAVLink Drones from Python Companion Computers, and Three Pitfalls Found by Fault Injection

Vishwa GW
preprint en

Abstract

Companion computers such as the Raspberry Pi increasingly run the high-level logic of research drones, but Python access to MAVLink autopilots is split between message-level tooling and heavier frameworks. We present flypi, a 947-line, single-dependency Python library whose every command is confirmed: it waits for an accepted COMMAND_ACK and then for the vehicle's own telemetry to show the requested state. We evaluate flypi 0.1.0 against a MAVLink vehicle emulator with seeded fault injection. Three findings generalise beyond flypi. First, confirmation latency is set by the vehicle's heartbeat period, not by the link: the median confirmed mode change took 81 ms at a 25 Hz heartbeat and 1012 ms at 1 Hz, while the acknowledgement arrived in about 41 ms in every case. Second, retrying on a missing acknowledgement, as the MAVLink command protocol prescribes, executes commands more than once when acknowledgements are lost. All 8 timeouts we observed under downlink loss were false failures: the vehicle had already changed mode. Third, a heartbeat sent from a background thread keeps a hung control script invisible to the autopilot's ground-station failsafe; the vehicle saw no heartbeat gap longer than 1.05 s while the main thread was blocked or spinning. We describe design changes that address each pitfall. All results come from emulation; validation on ArduPilot SITL and flight hardware is future work. The attached archive contains the LaTeX source, figures, the fault-injection harness and the raw JSON results. flypi is released under Apache-2.0.

Zenodo (CERN European Organization for Nuclear Research)
Aerospace Engineering and Control Systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
flypi: Confirmed-Command Control of MAVLink Drones from Python Companion Computers, and Three Pitfalls Found by Fault Injection — Vishwa GW · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS