The DJI Onboard SDK is an open source software library that enables computers to communicate directly with a selection of DJI aircraft and flight controllers over a serial interface. The SDK gives access to aircraft telemetry, flight control and other aircraft functions, meaning a developer can use the SDK to attach their own computing device onboard an aircraft and use it to control flight.
The SDK includes:
DJI offers a Mobile SDK and an Onboard SDK.
Both SDKs allow applications to control DJI aircraft, but are optimized for different compute platforms and applications. The Mobile SDK is designed for Mobile Devices (such as Android and iOS) that connect to the aircraft wirelessly through the remote controller. The Onboard SDK is designed for Linux computers (and the STM32), and connects directly to the flight controller over a serial interface.
The table below compares the two SDKs.
|Comparison of Onboard and Mobile SDKs|
|Category||Onboard SDK||Mobile SDK|
|Platform||Linux, STM32||Android, iOS|
|Language Support||C++||Java, Objective C, Swift|
|DJI Product Support||M100, M600, M210, M210-RTK, A3, N3
Note: M200 is not supported
|Phantom Series, Inspire Series, Osmo Series, Mavic Pro, Matrice Series, A3, N3|
|Connection to Aircraft||Wired
Mobile Device <-> USB <-> Remote Controller <-> Wireless <-> Aircraft->->->->
|Flight Control - Low Level||200 Hz||10 Hz|
|Flight Control - Missions||Waypoint, Hotpoint||Waypoint, Hotpoint, Follow Me, ActiveTrack, TapFly, Timeline|
|Telemetry Updates||200 Hz||10 Hz|
|Remote Controller Needed||No||Yes|
Shoot Photo, Start/Stop Video
Shoot Photo, Start/Stop Video, Exposure Control, Camera Settings, Playback, Media
Obstacle Avoidance, GEO
As the Mobile SDK is for ground based applications, and the Onboard SDK for aircraft based applications, both SDKs can be used simultaneously in a solution. Both SDKs have APIs that allow communication through the aircraft's wireless link and therefore data can be sent between the mobile and onboard computer.
The reasons you should consider using the Onboard SDK are if you want to:
Some examples of where the OSDK might be used is:
Many of DJI's product features and capabilities are accessible to developers through the Onboard SDK. Developers can automate flight, control the camera and gimbal, and monitor state of other components.
The DJI Onboard SDK allows several ways to control aircraft flight:
The Onboard SDK allows control of both camera and gimbal. Note that the Mobile SDK based applications should be used for full control of camera exposure, settings and media.
Developers can, for the first time, access and program a hardware synchronization digital signal from DJI Aircraft/flight controllers with the Onboard SDK. This functionality provides:
The Onboard SDK allows configuring user defined pins for Multi-Function IO functionality. Multi-Function IO supports
Rich sensor and aircraft state data is available through the SDK at up to 200 Hz:
Inertial Sensor Data
Aircraft Status Data
For M210, developers can access data from forward and downward stereo camera pairs.
The following diagram illustrates how the DJI Onboard SDK fits into an application, and how it is connected to a DJI aircraft.