public abstract class

DJIFlightController

extends DJIBaseComponent
java.lang.Object
   ↳ dji.sdk.base.DJIBaseComponent
     ↳ dji.sdk.flightcontroller.DJIFlightController

Class Overview

This class contains components of the flight controller and provides methods to send different commands to the flight controller.

Summary

Public Constructors
DJIFlightController()
Constructs a DJIFlightController object.
Public Methods
abstract void autoLanding(DJICommonCallbacks.DJICompletionCallback callback)
Starts auto-landing of the aircraft.
abstract void cancelAutoLanding(DJICommonCallbacks.DJICompletionCallback callback)
Stops auto-landing of the aircraft.
abstract void cancelGoHome(DJICommonCallbacks.DJICompletionCallback callback)
The aircraft will stop going home and will hover in place.
abstract void cancelTakeOff(DJICommonCallbacks.DJICompletionCallback callback)
Stops aircraft takeoff.
abstract void confirmLanding(DJICommonCallbacks.DJICompletionCallback callback)
Confirms to continue the landing action.
abstract void disableVirtualStickControlMode(DJICommonCallbacks.DJICompletionCallback callback)
Disable virtual stick control mode.
abstract void enableVirtualStickControlMode(DJICommonCallbacks.DJICompletionCallback callback)
Enables virtual stick control mode.
DJICompass getCompass()
Compass object.
abstract void getControlMode(DJICompletionCallbackWith<DJIFlightControllerControlMode> callback)
Gets the control mode of the flight controller.
DJIFlightControllerCurrentState getCurrentState()
Returns the current state of flight controller.
String getFlightControllerVersion()
Gets the flight controller's firmware version.
abstract void getFlightFailsafeOperation(DJICompletionCallbackWith<DJIFlightFailsafeOperation> callback)
Gets the FailSafe action for when the connection between remote controller and aircraft is lost.
DJIFlightLimitation getFlightLimitation()
FlightLimitation object.
abstract void getGoHomeAltitude(DJICompletionCallbackWith<Float> callback)
Gets the minimum altitude (relative to the take off location in meters) the aircraft must be at before going home.
abstract void getGoHomeBatteryThreshold(DJICompletionCallbackWith<Integer> callback)
Gets the go home battery percentage threshold with range [25, 50].
abstract void getHomeLocation(DJICompletionCallbackWith<DJILocationCoordinate2D> callback)
Gets the home point of the aircraft.
DJIVirtualStickFlightCoordinateSystem getHorizontalCoordinateSystem()
Gets the horizontal control coordinate system.
DJIIntelligentFlightAssistant getIntelligentFlightAssistant()
IntelligentFlightAssistant object.
abstract void getLEDsEnabled(DJICompletionCallbackWith<Boolean> callback)
Gets if the LEDs in the front is enabled or not.
abstract void getLandImmediatelyBatteryThreshold(DJICompletionCallbackWith<Integer> callback)
Gets the land immediately battery percentage threshold with range [10, 25].
DJILandingGear getLandingGear()
Landing gear object.
abstract void getMultiSideIMUCalibrationStatus(DJICompletionCallbackWith<DJIIMUState> callback)
abstract int getNumberOfIMUs()
The number of IMU module in the flight controller.
abstract void getQuickSpinEnabled(DJICompletionCallbackWith<Boolean> callback)
abstract void getRemoteControllerFlightModeMappingWithCompletion(DJICompletionCallbackWith<DJIFlightControllerRemoteControllerFlightMode[]> callback)
Gets the mapping between the flight modes and the flight mode switch positions on the remote controller.
DJIVirtualStickRollPitchControlMode getRollPitchControlMode()
Returns the roll and pitch control mode.
DJIVirtualStickFlightCoordinateSystem getRollPitchCoordinateSystem()
This method is deprecated. please use the getHorizontalCoordinateSystem.
DJIRtk getRtk()
Rtk object.
DJISimulator getSimulator()
Simulator object.
abstract void getTerrainFollowModeEnable(DJICompletionCallbackWith<Boolean> callback)
Gets if terrain follow mode is enabled or not.
abstract void getTripodModeEnabled(DJICompletionCallbackWith<Boolean> callback)
Gets if tripod mode is enabled or not.
DJIVirtualStickVerticalControlMode getVerticalControlMode()
Returns the vertical control mode.
boolean getVirtualStickAdvancedModeEnabled()
Gets abilities of virtual stick advanced mode.
DJIVirtualStickYawControlMode getYawControlMode()
Gets the yaw control mode.
abstract void goHome(DJICommonCallbacks.DJICompletionCallback callback)
The aircraft will start to go home.
abstract boolean isIntelligentFlightAssistantSupported()
true if the product supports IntelligentFlightAssistant.
abstract void isLandingConfirmationNeeded(DJICompletionCallbackWith<Boolean> callback)
true if the clearance between the aircraft and the ground is less than 0.3m and confirmation from the user is needed to continue the landing.
abstract boolean isLandingGearMovable()
true if moving the landing gear is supported for the connected drone.
abstract boolean isOnboardSDKDeviceAvailable()
Checks if the onboard SDK device is available
abstract boolean isRtkSupported()
true if the product supports RTK.
abstract boolean isVirtualStickControlModeAvailable()
Indicates whether the virtual stick control interface can be used.
abstract void lockCourseUsingCurrentDirection(DJICommonCallbacks.DJICompletionCallback callback)
Locks the current heading of the aircraft as the Course Lock.
abstract void sendDataToOnboardSDKDevice(byte[] data, DJICommonCallbacks.DJICompletionCallback callback)
If there is a device connected to the aircraft using the Onboard SDK, then this method will send data to that device.
abstract void sendVirtualStickFlightControlData(DJIVirtualStickFlightControlData controlData, DJICommonCallbacks.DJICompletionCallback callback)
Sends flight control data using virtual stick commands.
abstract void setAutoQuickSpinEnabled(Boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)
Enable/disable Auto Quick Spin.
abstract void setControlMode(DJIFlightControllerControlMode controlMode, DJICommonCallbacks.DJICompletionCallback callback)
Sets the control mode of the flight controller.
abstract void setFlightFailsafeOperation(DJIFlightFailsafeOperation operation, DJICommonCallbacks.DJICompletionCallback callback)
Sets the FailSafe action for when the connection between remote controller and aircraft is lost.
abstract void setFlightOrientationMode(DJIFlightOrientationMode type, DJICommonCallbacks.DJICompletionCallback callback)
Sets the aircraft flight orientation relative to the Aircraft Heading, Course Lock or Home Lock.
abstract void setGoHomeAltitude(float altitude, DJICommonCallbacks.DJICompletionCallback callback)
Sets the minimum altitude relative to where the aircraft took off that the aircraft must be at before going home.
abstract void setGoHomeBatteryThreshold(int param, DJICommonCallbacks.DJICompletionCallback callback)
Sets the go home battery percentage threshold with range [25, 50].
abstract void setHomeLocation(DJILocationCoordinate2D homePoint, DJICommonCallbacks.DJICompletionCallback callback)
Sets the home location of the aircraft.
abstract void setHomeLocationUsingAircraftCurrentLocation(DJICommonCallbacks.DJICompletionCallback callback)
Sets the home point of the aircraft with the current location of the aircraft.
void setHorizontalCoordinateSystem(DJIVirtualStickFlightCoordinateSystem rollPitchCoordinateSystem)
Sets the horizontal coordinate system.
abstract void setLEDsEnabled(boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)
Turns on/off the LEDs in the front.
abstract void setLandImmediatelyBatteryThreshold(int param, DJICommonCallbacks.DJICompletionCallback callback)
Sets the land immediately battery percentage threshold with range [10, 25].
abstract void setOnIMUStateChangedCallback(DJIFlightControllerDelegate.FlightControllerIMUStateChangedCallback callback)
Set up the IMU State callback which will receive the changed state of the IMU.
void setReceiveExternalDeviceDataCallback(DJIFlightControllerDelegate.FlightControllerReceivedDataFromExternalDeviceCallback callback)
Sets the callback function that updates the data received from an external device (e.g.
void setReceivedNoFlyZoneCallback(DJIFlightControllerDelegate.ReceivedNoFlyZoneFromFlightControllerCallback callback)
Sets the no fly zone state receiving callback from the flight controller.
void setRollPitchControlMode(DJIVirtualStickRollPitchControlMode rollPitchControlMode)
Sets the Roll and Pitch control mode.
abstract void setTerrainFollowModeEnabled(Boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)
Enable/disable terrain follow mode.
abstract void setTripodModeEnabled(Boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)
Enable/disable tripod mode.
void setUpdateSystemStateCallback(DJIFlightControllerDelegate.FlightControllerUpdateSystemStateCallback callback)
Sets the callback function that updates the flight controller's current state data.
void setVerticalControlMode(DJIVirtualStickVerticalControlMode verticalControlMode)
Sets the vertical control mode.
void setVirtualStickAdvancedModeEnabled(boolean virtualStickAdvancedModeEnabled)
Sets if Virtual Stick advanced mode is enabled.
void setYawControlMode(DJIVirtualStickYawControlMode yawControlMode)
Sets the yaw control coordinate system.
abstract void startIMUCalibration(DJICommonCallbacks.DJICompletionCallback callback)
Start the calibration for IMU with a specific imu ID.
abstract void startIMUCalibration(int index, DJICommonCallbacks.DJICompletionCallback callback)
Starts the calibration for IMU with a specific index.
abstract void takeOff(DJICommonCallbacks.DJICompletionCallback callback)
Starts aircraft takeoff.
abstract void turnOffMotors(DJICommonCallbacks.DJICompletionCallback callback)
Turns off the aircraft's motors.
abstract void turnOnMotors(DJICommonCallbacks.DJICompletionCallback callback)
Turns on the aircraft's motors.
[Expand]
Inherited Methods
From class dji.sdk.base.DJIBaseComponent
From class java.lang.Object

Public Constructors

public DJIFlightController ()

Constructs a DJIFlightController object.

Public Methods

public abstract void autoLanding (DJICommonCallbacks.DJICompletionCallback callback)

Starts auto-landing of the aircraft. Landing is considered complete once the aircraft lands on the ground, and powers down propellers to medium throttle.

Parameters
callback The execution callback with the returned execution result.

public abstract void cancelAutoLanding (DJICommonCallbacks.DJICompletionCallback callback)

Stops auto-landing of the aircraft. If called before autoLanding is complete, then the auto landing will be cancelled (autoLanding will return an error) and the aircraft will hover at its current location.

Parameters
callback The execution callback with the returned execution result.

public abstract void cancelGoHome (DJICommonCallbacks.DJICompletionCallback callback)

The aircraft will stop going home and will hover in place. The goHome() completion callback will immediately return an error.

Parameters
callback The execution callback with the returned execution result.

public abstract void cancelTakeOff (DJICommonCallbacks.DJICompletionCallback callback)

Stops aircraft takeoff. If called before takeoff() is complete, the aircraft will cancel takeoff (takeoff will return an error) and hover at the current height.

Parameters
callback The execution callback with the returned execution result.

public abstract void confirmLanding (DJICommonCallbacks.DJICompletionCallback callback)

Confirms to continue the landing action. When the clearance between the aircraft and the ground is less than 0.3m, the aircraft will pause landing and wait for user's confirmation. Can use `isLandingConfirmationNeeded` in `DJIFlightControllerCurrentState` to check if confirmation is needed. It is supported by flight controller firmware 3.2.0.0 or above.

public abstract void disableVirtualStickControlMode (DJICommonCallbacks.DJICompletionCallback callback)

Disable virtual stick control mode. It is not supported by Mavic Pro when using the WiFi connection.

Parameters
callback The execution callback with the returned execution result.

public abstract void enableVirtualStickControlMode (DJICommonCallbacks.DJICompletionCallback callback)

Enables virtual stick control mode. By enabling virtual stick control mode, the aircraft can be controlled using sendVirtualStickFlightControlData(). It is not supported by Mavic Pro when using the WiFi connection.

Parameters
callback The execution callback with the returned execution result.

public DJICompass getCompass ()

Compass object.

public abstract void getControlMode (DJICompletionCallbackWith<DJIFlightControllerControlMode> callback)

Gets the control mode of the flight controller. It is only supported by A3.

Parameters
callback Completion callback that receives the getter execution result.

public DJIFlightControllerCurrentState getCurrentState ()

Returns the current state of flight controller.

public String getFlightControllerVersion ()

Gets the flight controller's firmware version.

Returns
  • Returns the flight controller's firmware version as a string.

public abstract void getFlightFailsafeOperation (DJICompletionCallbackWith<DJIFlightFailsafeOperation> callback)

Gets the FailSafe action for when the connection between remote controller and aircraft is lost.

public DJIFlightLimitation getFlightLimitation ()

FlightLimitation object. This object sets, gets and tracks state of the maximum flight height and radius allowed.

public abstract void getGoHomeAltitude (DJICompletionCallbackWith<Float> callback)

Gets the minimum altitude (relative to the take off location in meters) the aircraft must be at before going home.

Parameters
callback The execution callback with the value(s) returned.

public abstract void getGoHomeBatteryThreshold (DJICompletionCallbackWith<Integer> callback)

Gets the go home battery percentage threshold with range [25, 50].

Parameters
callback The execution callback with the value(s) returned.

public abstract void getHomeLocation (DJICompletionCallbackWith<DJILocationCoordinate2D> callback)

Gets the home point of the aircraft.

Parameters
callback The execution callback with the value(s) returned.

public DJIVirtualStickFlightCoordinateSystem getHorizontalCoordinateSystem ()

Gets the horizontal control coordinate system.

public DJIIntelligentFlightAssistant getIntelligentFlightAssistant ()

IntelligentFlightAssistant object.

public abstract void getLEDsEnabled (DJICompletionCallbackWith<Boolean> callback)

Gets if the LEDs in the front is enabled or not. It is only supported by Phantom 3 series, Phantom 4, Phantom 4 Pro, Mavic Pro and Inspire 2.

Parameters
callback Completion callback that receives the getter execution result.

public abstract void getLandImmediatelyBatteryThreshold (DJICompletionCallbackWith<Integer> callback)

Gets the land immediately battery percentage threshold with range [10, 25].

Parameters
callback The execution callback with the value(s) returned.

public DJILandingGear getLandingGear ()

Landing gear object. For products with movable landing gear only (Inspire 1 and Inspire 1 Pro).

public abstract void getMultiSideIMUCalibrationStatus (DJICompletionCallbackWith<DJIIMUState> callback)

public abstract int getNumberOfIMUs ()

The number of IMU module in the flight controller. Most products have 1 IMU Exceptions: - Phantom 4, Phantom 4 Pro, Mavic Pro and Inspire 2 have 2 IMUs - A3, Matrice 600 and Matrice 600 Pro have 1 inner IMU and can have at most 2 external IMUs. - N3 has 2 inner IMUs and can have 1 external IMU.

public abstract void getQuickSpinEnabled (DJICompletionCallbackWith<Boolean> callback)

public abstract void getRemoteControllerFlightModeMappingWithCompletion (DJICompletionCallbackWith<DJIFlightControllerRemoteControllerFlightMode[]> callback)

Gets the mapping between the flight modes and the flight mode switch positions on the remote controller. Elements 0, 1 and 2 of the returning array to `DJIRemoteControllerFlightModeSwitchPosition.One`, `DJIRemoteControllerFlightModeSwitchPosition.Two` and `DJIRemoteControllerFlightModeSwitchPosition.Three` of the `flightModeSwitch` in `DJIRCHardwareState`. The value of each Enum item is representing the corresponding index of the DJIFlightControllerRemoteControllerFlightMode array representing the flight mode. The mapping is fixed for Phantom series, Inspire series, Mavic Pro and the M100. For N3, A3, Matrice 600, and Matrice 600 Pro the mapping is firmware dependent. With firmware version 3.2.11.0 or above, the mapping can be customized in DJI Assistant 2.

Parameters
callback Completion callback that receives the getter result. Each element of array is an instance with a value of DJIFlightControllerRemoteControllerFlightMode.

public DJIVirtualStickRollPitchControlMode getRollPitchControlMode ()

Returns the roll and pitch control mode.

public DJIVirtualStickFlightCoordinateSystem getRollPitchCoordinateSystem ()

This method is deprecated.
please use the getHorizontalCoordinateSystem.

Gets the Roll and Pitch control coordinate system.

public DJIRtk getRtk ()

Rtk object.

public DJISimulator getSimulator ()

Simulator object.

public abstract void getTerrainFollowModeEnable (DJICompletionCallbackWith<Boolean> callback)

Gets if terrain follow mode is enabled or not. It is only supported by Mavic Proa nd Phantom 4 Pro.

Parameters
callback The execution callback with the returned value(s).

public abstract void getTripodModeEnabled (DJICompletionCallbackWith<Boolean> callback)

Gets if tripod mode is enabled or not. It is only supported by Mavic Pro.

Parameters
callback The execution callback with the returned value(s).

public DJIVirtualStickVerticalControlMode getVerticalControlMode ()

Returns the vertical control mode.

public boolean getVirtualStickAdvancedModeEnabled ()

Gets abilities of virtual stick advanced mode. true if the advanced mode of Virtual Stick is enabled. By default, it is false. When the advanced mode is enabled, aircraft will have wind compensation ability when it is hover and the GPS signal is good. For Phantom 4, virtual stick mode will have collision avoidance ability when the advanced mode is enabled and the collision avoidance is enabled in DJIIntelligentFlightAssistant. It is only supported by flight controller firmware version 3.1.x.x or above.

public DJIVirtualStickYawControlMode getYawControlMode ()

Gets the yaw control mode.

public abstract void goHome (DJICommonCallbacks.DJICompletionCallback callback)

The aircraft will start to go home. This method is considered complete once the aircraft has landed at its home position.

Parameters
callback The execution callback with the returned execution result.

public abstract boolean isIntelligentFlightAssistantSupported ()

true if the product supports IntelligentFlightAssistant.

public abstract void isLandingConfirmationNeeded (DJICompletionCallbackWith<Boolean> callback)

true if the clearance between the aircraft and the ground is less than 0.3m and confirmation from the user is needed to continue the landing. When the confirmation is needed, user can use `confirmLandingWithCompletion` in DJIFlightController to continue the landing. It is supported by flight controller firmware 3.2.0.0 or above.

Parameters
callback The execution callback with the returned value(s).

public abstract boolean isLandingGearMovable ()

true if moving the landing gear is supported for the connected drone.

public abstract boolean isOnboardSDKDeviceAvailable ()

Checks if the onboard SDK device is available

public abstract boolean isRtkSupported ()

true if the product supports RTK.

public abstract boolean isVirtualStickControlModeAvailable ()

Indicates whether the virtual stick control interface can be used. If there is a mission running in the mission manager, this property will be NO.

public abstract void lockCourseUsingCurrentDirection (DJICommonCallbacks.DJICompletionCallback callback)

Locks the current heading of the aircraft as the Course Lock. Used when Flight Orientation Mode is DJIFlightOrientationModeCourseLock.

Parameters
callback The execution callback with the returned execution result. Please refer to DJIBaseComponent for more information about the block and what is recommended be done with it.

public abstract void sendDataToOnboardSDKDevice (byte[] data, DJICommonCallbacks.DJICompletionCallback callback)

If there is a device connected to the aircraft using the Onboard SDK, then this method will send data to that device. The size of the data cannot be greater than 100 bytes, and will be sent in 40 byte increments every 14ms. This method is only supported on products that support the Onboard SDK (Matrice 100).

Parameters
data Data to be sent to the external device. The size of the data should not be larger than 100 bytes.
callback The execution callback with the returned execution result.

public abstract void sendVirtualStickFlightControlData (DJIVirtualStickFlightControlData controlData, DJICommonCallbacks.DJICompletionCallback callback)

Sends flight control data using virtual stick commands. The isVirtualStickControlModeAvailable property must be true to use virtual stick commands. Virtual stick commands should be sent to the aircraft between 5 Hz and 25 Hz. If virtual stick commands are not sent frequently enough the aircraft may regard the connection as broken which will cause the aircraft to hover in place until the next command comes through.

Parameters
controlData Flight control data
callback The execution callback with the returned execution result.

public abstract void setAutoQuickSpinEnabled (Boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)

Enable/disable Auto Quick Spin. When the gimbal reaches a yaw movement limit, the aircraft will automatically rotate the aircraft 360 degrees to uniwind the gimbal, allowing it to continue moving in the yaw direction. It is only available when the aircraft is flying at least 3m above the ground. Only supported by Inspire 2.

Parameters
enabled true to enable Auto Quick Spin.

public abstract void setControlMode (DJIFlightControllerControlMode controlMode, DJICommonCallbacks.DJICompletionCallback callback)

Sets the control mode of the flight controller. By default the value is DJIFlightControllerControlMode.Smart. It is highly recommended to keep the default value. See DJIFlightControllerControlMode for details. It is only supported by stand-alone A3.

Parameters
controlMode Control mode to set.
callback Completion callback that receives the setter execution result.

public abstract void setFlightFailsafeOperation (DJIFlightFailsafeOperation operation, DJICommonCallbacks.DJICompletionCallback callback)

Sets the FailSafe action for when the connection between remote controller and aircraft is lost.

Parameters
operation the operation of Failsafe action.
callback Completion callback.

public abstract void setFlightOrientationMode (DJIFlightOrientationMode type, DJICommonCallbacks.DJICompletionCallback callback)

Sets the aircraft flight orientation relative to the Aircraft Heading, Course Lock or Home Lock. See the Flight Controller User Guide for more information about flight orientation.

Parameters
type The orientaion mode.
callback The execution callback with the returned execution result.

public abstract void setGoHomeAltitude (float altitude, DJICommonCallbacks.DJICompletionCallback callback)

Sets the minimum altitude relative to where the aircraft took off that the aircraft must be at before going home. This can be useful when the user foresees obstacles in the aircraft’s way. If the aircraft’s current altitude is higher than the minimum go home altitude, it will go home at its current altitude. The valid range for the altitude is from 20m to 500m.

Parameters
altitude Aircraft's default go home altitude
callback The execution callback with the returned execution result.

public abstract void setGoHomeBatteryThreshold (int param, DJICommonCallbacks.DJICompletionCallback callback)

Sets the go home battery percentage threshold with range [25, 50].

Parameters
param Low battery warning percentage.
callback The execution callback with the returned execution result.

public abstract void setHomeLocation (DJILocationCoordinate2D homePoint, DJICommonCallbacks.DJICompletionCallback callback)

Sets the home location of the aircraft. The home location is used as the location the aircraft goes to when commanded by goHome(), when the signal to the aircraft is lost or when the battery is below the lowBatteryWarning threshold. The user should be careful where they set a new home point location as in some scenarios the product will not be in control of the user when going to this location.

A home location is valid if it is within 30m of:

  • initial take-off location
  • aircraft's current location
  • remote controller's current location as shown by RC GPS or
  • mobile device's current location

  • Note: If setting home point around the mobile device location, please add uses-permission ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION for allowing SDK to get current location of the mobile device.

    Parameters
    homePoint Home location latitude and longitude in degrees
    callback The execution callback with the returned execution result.

    public abstract void setHomeLocationUsingAircraftCurrentLocation (DJICommonCallbacks.DJICompletionCallback callback)

    Sets the home point of the aircraft with the current location of the aircraft. See setHomeLocation() for details on when the home point is used

    Parameters
    callback The execution callback with the returned execution result.

    public void setHorizontalCoordinateSystem (DJIVirtualStickFlightCoordinateSystem rollPitchCoordinateSystem)

    Sets the horizontal coordinate system.

    Parameters
    rollPitchCoordinateSystem A specific rollPitchCoordinateSystem object.

    public abstract void setLEDsEnabled (boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)

    Turns on/off the LEDs in the front. The LEDs are used to indicate the status of the aircraft. By default, it is on. It is only supported by Phantom 3 series, Phantom 4, Phantom 4 Pro, Mavic Pro and Inspire 2.

    Parameters
    enabled true to turn on the front LEDs, false to trun off.
    callback Completion callback that receives the getter execution result.

    public abstract void setLandImmediatelyBatteryThreshold (int param, DJICommonCallbacks.DJICompletionCallback callback)

    Sets the land immediately battery percentage threshold with range [10, 25].

    Parameters
    param Serious low bettery warning percentage.
    callback The execution callback with the returned execution result.

    public abstract void setOnIMUStateChangedCallback (DJIFlightControllerDelegate.FlightControllerIMUStateChangedCallback callback)

    Set up the IMU State callback which will receive the changed state of the IMU.

    Parameters
    callback The callback for receiving the changed state of IMU.

    public void setReceiveExternalDeviceDataCallback (DJIFlightControllerDelegate.FlightControllerReceivedDataFromExternalDeviceCallback callback)

    Sets the callback function that updates the data received from an external device (e.g. the onboard device). It is only supported for the Matrice 100.

    Parameters
    callback The execution callback with the execution result returned.

    public void setReceivedNoFlyZoneCallback (DJIFlightControllerDelegate.ReceivedNoFlyZoneFromFlightControllerCallback callback)

    Sets the no fly zone state receiving callback from the flight controller.

    Parameters
    callback The execution callback with no fly zone state in the flight controller returned.

    public void setRollPitchControlMode (DJIVirtualStickRollPitchControlMode rollPitchControlMode)

    Sets the Roll and Pitch control mode.

    Parameters
    rollPitchControlMode A specific DJIVirtualStickRollPitchControlMode object.

    public abstract void setTerrainFollowModeEnabled (Boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)

    Enable/disable terrain follow mode. The aircraft uses height information gathered by the onboard ultrasonic system, and its downward facing cameras to keep flying at the same height above the ground. It is only supported by Mavic Pro and Phantom 4 Pro.

    Parameters
    enabled true to enable terrain follow mode.
    callback The execution callback with the returned execution result.

    public abstract void setTripodModeEnabled (Boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)

    Enable/disable tripod mode. Tripod Mode drops the aircraft’s maximum speed to 2.2mph (3.6kph), and significantly reduces the control stick sensitivity of the remote controller to give the user the precision needed for accurate framing. When tripod mode is enabled, missions, terrain follow mode, course lock and home lock are not allowed. Tripod mode is not allowed if the aircraft is running a mission. If GPS or vision positioning isn't available, tripod mode cannot be enabled. If the GPS and/or the vision system is providing the flight controller with velocity information then the aircraft will be able to automatically compensate for wind. If however, position information is not available, then manual intervention will be required, but the user should beware any manual compensation will be limited due to the reduced maximum velocity and sensitivity. If GPS and vision position become unavailable during tripod mode, it is recommended to alert the user and disable tripod mode. It is only supported by Mavic Pro.

    Parameters
    enabled true to enable tripod mode.
    callback The execution callback with the returned execution result.

    public void setUpdateSystemStateCallback (DJIFlightControllerDelegate.FlightControllerUpdateSystemStateCallback callback)

    Sets the callback function that updates the flight controller's current state data. This method is called 10 times per second.

    Parameters
    callback The execution callback with the execution result returned.

    public void setVerticalControlMode (DJIVirtualStickVerticalControlMode verticalControlMode)

    Sets the vertical control mode.

    Parameters
    verticalControlMode A specific DJIVirtualStickVerticalControlMode object.

    public void setVirtualStickAdvancedModeEnabled (boolean virtualStickAdvancedModeEnabled)

    Sets if Virtual Stick advanced mode is enabled. By default, it is false. When advanced mode is enabled, the aircraft will compensate for wind when hovering and the GPS signal is good. For the Phantom 4, collision avoidance can be enabled for virtual stick control if advanced mode is on, and collision avoidance is enabled in DJIIntelligentFlightAssistant. It is only supported by flight controller firmware versions 3.1.x.x or above.

    Parameters
    virtualStickAdvancedModeEnabled true for enabling advanced mode.

    public void setYawControlMode (DJIVirtualStickYawControlMode yawControlMode)

    Sets the yaw control coordinate system.

    Parameters
    yawControlMode A specific DJIVirtualStickYawControlMode object.

    public abstract void startIMUCalibration (DJICommonCallbacks.DJICompletionCallback callback)

    Start the calibration for IMU with a specific imu ID. For Phantom 4, this method will start the calibration for both IMUs. Please keep the aircraft stationary and horizontal during calibration. The calibration will take 5 - 10 minutes.

    Parameters
    callback Completion callback.

    public abstract void startIMUCalibration (int index, DJICommonCallbacks.DJICompletionCallback callback)

    Starts the calibration for IMU with a specific index. Please keep stationary and horizontal during calibration. The calibration will take 5 ~ 10 minutes. The completion callback will be called once the calibration is started. Please set up the DJIFlightControllerDelegate.FlightControllerIMUStateChangedCallback to check the execution status of the IMU calibration. Only supported by Matrice 600.

    Parameters
    index The index of specific IMU to calibrate.
    callback Completion callback to check if the calibration starts successfully.

    public abstract void takeOff (DJICommonCallbacks.DJICompletionCallback callback)

    Starts aircraft takeoff. Takeoff is considered complete when the aircraft is hovering 1.2 meters (4 feet) above the ground. DJICompletionCallback is called when the aircraft crosses 0.5 meters (1.6 feet).
    If the motors are already on, this command cannot be executed.

    Parameters
    callback The execution callback with the returned execution result.

    public abstract void turnOffMotors (DJICommonCallbacks.DJICompletionCallback callback)

    Turns off the aircraft's motors. The method can only be called when the aircraft is on the ground.

    Parameters
    callback The execution callback with the returned execution result.

    public abstract void turnOnMotors (DJICommonCallbacks.DJICompletionCallback callback)

    Turns on the aircraft's motors. Currently this is only supported by the M100.

    Parameters
    callback The execution callback with the returned execution result.