In a typical Onboard SDK application, there are several potential sources of aircraft control. The aircraft's flight controller arbitrates which source is in control at any one time. The different sources of control, and their control priority from highest to lowest is:
This guide describes how to transfer control between different control sources, and what functionality is available to the Onboard Computer in these scenarios.
The remote controller has the highest priority for control authority, and can regain control from the mobile device or onboard computer at any time.
This is always done by switching the Flight Mode Switch on the remote controller.
The Flight Mode Switch can represent 6 possible modes:
On all products, SDK control is possible in either P or F mode. Other modes can be used to regain control for the remote controller.
A3 and N3 stand alone flight controllers can be setup in DJI assistant to either have various combinations of flight modes map to the remote controller flight mode switch position, or have all positions map to P mode. This selection is done with the Multiple Flight Modes option:
When a remote controller is used with M600 or M600 Pro, all flight mode switch positions are P mode always. Similar to Multiple Flight Modes disabled for A3/N3, the switch position only needs to be changed to regain control with the remote controller. Control is only temporarily regained, and logic in the onboard computer should monitor the remote controller flight mode switch and stop sending commands to the aircraft if the user needs to use the switch to permanently regain control.
M100 has P, A and F modes on the remote controller flight mode switch. Only F mode enables SDK control, while P and A disable it.
The Mobile SDK will have control authority whenever:
Whenever the Mobile SDK is not executing a flight maneuver, the remote controller will have control authority.
Note 1: If the flight mode switch is in the wrong position for control authority, the Mobile SDK will still be able to receive state information, and perform some actions like take-off, land and controlling the camera and gimbal.
Note 2: If the Onboard SDK is executing a movement command, and the Mobile SDK sends virtual stick or mission commands, then the Mobile SDK will get control priority and the flight controller will ignore further Onboard SDK commands.
Several prerequisites are required to enable control authority for the Onboard SDK:
Control authority simply means the onboard computer can command the aircraft to move either through movement commands or missions. If all prerequisites are not met, the onboard computer can still receive state information, read from and write to the MFIO pins (if available) and perform some actions such as taking off and landing.
The state diagram below shows what is available to the onboard computer and when during the various stages of running an Onboard SDK application. In addition, the authority of the remote controller and Mobile SDK is also shown for each onboard SDK application state.
Note: While the Mobile SDK is sending virtual stick commands, or a mission is executing, then movement commands from the Onboard SDK will be ignored. Once the Mobile SDK commands complete, then the Onboard SDK will be in the same state as it was before the Mobile SDK commands started.
The remote controller sticks can manually control aircraft flight for all states except for when the movement control commands are being sent from the onboard computer, or a mission has started. If missions are executing, the sticks will change the mission behavior:
By default, when the remote controller loses connection to the vehicle, the vehicle executes a return-to-home-and-land (RTL) maneuver. However, there is now an option to override this behavior by allowing the OSDK to continue executing its mission. To do so, users will have to check the
Enable SDK Failsafe Action box and set the
SDK Failsafe Action to
Hover as shown in the picture.
With this functionality, users can also execute complete missions without having to use LightBridge 2 or a similar RC. In this situation, first-use activation (which requires internet connection and is otherwise done through DJI Go) is done through DJI Assistant 2.