A drone-flying training tool that mimics the controls of DJI and other camera drones, so you can build muscle memory before flying the real thing. It pairs a Unity flight simulator with a native bridge that reads a DJI smart controller over WiFi and feeds live stick/wheel input into the sim.
Controller support: DJI Mini 3 controller (and other DJI RC smart controllers) over WiFi. See
tools/dji-rc-bridgefor the list of confirmed/likely-compatible hardware.
Flying a practice course with live input from a connected DJI RC — the HUD shows the controller link and real-time stick/wheel values.
This project began as a mashup of two existing open-source projects and has since diverged substantially into its own thing — see Credits.
.
├── Assets/ Unity project — scenes, scripts, models, audio, UI
├── Packages/ Unity package manifest
├── ProjectSettings/ Unity project settings
├── UserSettings/ Per-user Unity editor state (git-ignored)
├── plot_log.m MATLAB/Octave script for plotting flight logs
└── tools/
└── dji-rc-bridge/ Native DJI RC controller driver + verification tool
This is a single Unity project at the repository root. Open the root folder in Unity to load it.
- Unity
6000.5.0f1(Unity 6.1) — pinned inProjectSettings/ProjectVersion.txt. - A DJI RC smart controller on the same WiFi network (for real-controller input).
- Open this folder as a project in Unity Hub / Unity Editor.
- Open
Assets/_Scenes/MainScene.unity. - Press Play.
Key in-sim controls (see Assets/Scripts/ for the authoritative bindings):
- C — cycle cameras (FPV / follow / eye-level / gimbal)
- G — toggle gimbal camera horizon-lock vs. FPV mode
- M — switch maps (maps load additively via
MapManager) - Gimbal camera: left wheel tilts, right wheel zooms
The sim models the drone's gimbal mechanics and includes a dedicated gimbal camera so you can practice more than just flying the airframe. The gimbal tilts up and down and the lens zooms in real time — driven by the controller wheels (left wheel = gimbal tilt, right wheel = zoom) — so you can rehearse cinematic passes where you fly a line while simultaneously craning the gimbal up/down and pushing or pulling zoom, building the coordination those moves need before attempting them on the real aircraft.
Two independent paths read the DJI RC:
-
In-engine (default):
Assets/Scripts/DjiRcInput.csopens a direct TCP connection to the controller. Point it at the controller by setting either theKESTREL_DJI_RC_IPenvironment variable or thedjiRcIpPlayerPrefskey to the controller's IP address. -
Native bridge / verification:
tools/dji-rc-bridgeis a standalone C/Obj-C driver. Use it to confirm the controller is reachable and decoding correctly before launching the sim, e.g.:cd tools/dji-rc-bridge mkdir build && cd build && cmake .. && cmake --build . ./dji-rc-joystick -t # test mode: print live stick/button values
On Linux it can also expose the controller as a virtual joystick via uinput; on macOS it builds a virtual-gamepad target. See the tool's own README for full options and the input map.
This repo is a heavily modified combination of two upstream projects. Their git histories were intentionally not carried over — the code here has diverged enough to be effectively a new project — but full credit goes to the originals:
- KestrelFPV — the Unity quadcopter simulator foundation, by Edouard Leurent. https://github.com/eleurent/KestrelFPV
- dji-rc-linux — the DJI RC WiFi driver (now
tools/dji-rc-bridge), by stiad. https://github.com/stiad/dji-rc-linux
Source code is MIT (below). Bundled art assets are licensed separately:
- DJI Mini 3 3D model — by aurumjuda747, used under
CC BY 4.0.
Source on Sketchfab.
Rigged and converted to FBX for this project (the original is not rigged).
Full attribution:
models/dji-mini-3/ATTRIBUTION.txt. - Bebop drone model and flight audio — inherited from KestrelFPV (MIT), see Credits above.
MIT — see LICENSE, which carries the copyright of the three upstream sources (KestrelFPV, dji-rc-linux, and this project). The MIT terms cover the source code; bundled art assets are covered by their own licenses (see Asset attribution above). The bundled controller bridge retains its own MIT license at tools/dji-rc-bridge/LICENSE.
