The Problem
OpenHD solves the problem of long-range, low-latency digital video and telemetry transmission for First-Person View (FPV) drones. Traditional analog systems have poor video quality, while consumer digital systems (like DJI) are proprietary and locked down. OpenHD provides an open-source alternative using commodity WiFi hardware and single-board computers like the Raspberry Pi.
What This Does
OpenHD is a C++ application that runs on both the airborne vehicle ("air") and the ground station ("ground"). It captures video from a camera, encodes it, and transmits it over a WiFi link using a custom protocol (wb_link) designed for low latency. Simultaneously, it handles bidirectional MAVLink telemetry, allowing the ground station to send control commands and receive flight data.
The codebase is structured into three core modules: ohd_common (shared utilities, settings, and network primitives), ohd_interface (WiFi, Ethernet, and USB tether link management), and ohd_telemetry (MAVLink parsing, serial/UDP/TCP endpoints, and GPIO control). The main entry point is OpenHD/main.cpp, which orchestrates these modules.
How It Is Wired
Execution begins in OpenHD/main.cpp. It initializes the core OHDTelemetry object (in ohd_telemetry/src/OHDTelemetry.cpp) and the interface layer. The telemetry module creates endpoints (serial, UDP, TCP) defined in ohd_telemetry/src/endpoints/ to send and receive MAVLink messages. The interface layer, driven by ohd_interface/src/ohd_interface.cpp, manages the WiFi link through the wb_link classes, which handle channel selection, rate control, and packet transmission. The video path is not detailed in the provided file list, but the ohd_video directory exists.
The ohd_common module is the central dependency hub; nearly every other module imports its utilities for configuration, logging, and socket handling. The static analysis found no circular dependencies, which is a positive sign for maintainability. The most connected module is OpenHD/ohd_video/tools/gen_camera_registry, but it has no inbound or outbound edges, indicating it's a standalone tool.
How To Use It
This repository is a source code project, not a ready-to-run application. It requires building for a specific target platform.
Setup & Build:
git clone https://github.com/moses-y/OpenHD
cd OpenHD/OpenHD
# Use the provided build scripts, e.g. for a Raspberry Pi:
./build_cmake.sh
The project uses CMake (OpenHD/CMakeLists.txt) and includes cross-compilation toolchains for platforms like Rockchip RK3588 (OpenHD/cmake/rk3588-toolchain.cmake). The Buildroot/ directory contains integration files for building a complete firmware image. There is no README in the OpenHD/ subdirectory, and the root-level README is a minimal AsciiDoc file, so detailed setup instructions are missing.
Real-World Use
A typical deployment involves flashing a custom firmware (built with the provided Buildroot files) onto a Raspberry Pi on the drone and another on the ground controller. The air unit connects to a camera and a WiFi card. The ground unit connects to a screen and a controller. Once both boot, they automatically establish a link, and the ground station displays live video and telemetry data, allowing the pilot to fly with a first-person view.
Code Health & Issues
Static analysis of the codebase (284 files) found 146 findings: 105 high, 39 medium, 2 low, all of the same kind:
- High - Deep nesting (x60) -
OpenHD/ohd_common/inc/openhd_global_constants.hpp,openhd_link_statistics.hpp,openhd_reboot_util.h. Control flow reaches a max indentation depth of 10, making it hard to follow. The fix is to flatten with early returns and extract inner blocks.
The repository has tests (41 test files) and CI (GitHub Actions), but the health audit found:
- High - Third-party GitHub Actions are pinned to mutable tags (
easimon/maximize-build-space@master,cloudsmith-io/action@master) in.github/workflows. This is a security risk. Pin to commit SHAs. - Medium - Workflows in
.github/workflows/build_package_rpi.ymldo not declare least-privilegeGITHUB_TOKENpermissions. Addpermissions: contents: read. - Medium - The README is 236 bytes and does not explain how to run the project. This is a significant documentation gap.
- Low - Workflow jobs lack
timeout-minutes, risking long-running, overlapping CI runs. - Low - Missing
.editorconfig,.gitattributes, and formatter configs.
The Bottom Line
OpenHD is a complex, real-world embedded systems project with a solid modular structure and active CI. The core logic is well-organized, but the lack of a proper README and the deep nesting in common headers are real barriers to entry for new contributors. This is for experienced embedded developers who need a customizable, open digital FPV system; it is not a beginner project.