DJI Mobile SDK Documentation

      class FlightController

      class FlightController extends BaseComponent
      Package:dji.sdk.flightcontroller
      Inherits From:BaseComponent
      Description:

      This class contains components of the flight controller and provides methods to send different commands to the flight controller. This object is available from the Aircraft object which is a subclass of BaseProduct.

      Class Members:

      State Updates

      Callbacks
      method
      method setStateCallback
      void setStateCallback(@Nullable FlightControllerState.Callback callback)
      Package:dji.sdk.flightcontroller
      Description:

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

      Input Parameters:
      @Nullable FlightControllerState.Callback callbackThe execution callback with the execution result returned.
      method setIMUStateCallback
      void setIMUStateCallback(@Nullable IMUState.Callback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Sets the IMU State callback, which will receive the changed state of the IMU.

      Input Parameters:
      @Nullable IMUState.Callback callbackThe callback for receiving the changed state of IMU.
      method setASBInformationCallback
      void setASBInformationCallback(@Nullable AirSenseSystemInformation.Callback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Sets the AirSenseSystemInformation callback, which will receive the AirSenseSystemInformation.

      Input Parameters:
      @Nullable AirSenseSystemInformation.Callback callbackThe callback for receiving the AirSenseSystemInformation.
      method setOnboardSDKDeviceDataCallback
      void setOnboardSDKDeviceDataCallback(
      @Nullable OnboardSDKDeviceDataCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Sets the callback function that updates the data received from an external device (e.g. the onboard device).

      Input Parameters:
      @Nullable OnboardSDKDeviceDataCallback callbackThe execution callback with the execution result returned.


      To Determine

      Current State
      method
      method getState
      @NonNull
      FlightControllerState getState()
      Package:dji.sdk.flightcontroller
      Description:

      Returns the current state of flight controller.

      Return:
      FlightControllerStateAn instance of FlightControllerState.


      Sensors

      Compass
      method
      method getCompass
      Compass getCompass()
      Package:dji.sdk.flightcontroller
      Description:

      Compass object.

      Return:
      CompassAn instance of Compass.
      Compass Count
      method
      method getCompassCount
      int getCompassCount()
      Package:dji.sdk.flightcontroller
      Description:

      Number of Compass modules in the flight controller.

      Return:
      intAn int value.
      RTK Positioning
      method
      method getRTK
      @Nullable
      RTK getRTK()
      Package:dji.sdk.flightcontroller
      Description:

      RTK positioning object.

      Return:
      RTKAn instance of RTK.
      IMU
      method
      method getIMUCount
      int getIMUCount()
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.IMU_COUNT
      Description:

      Number of IMU modules in the flight controller. Most products have one IMU.

      Exceptions:

      • Phantom 4, Phantom 4 Pro, Mavic Pro, and Inspire 2 each have two IMUs
      • A3, Matrice 600, and Matrice 600 Pro each have one inner IMU and can have at most two external IMUs.
      • N3 has two inner IMUs and can have one external IMU.

      Return:
      intAn int value.
      method startIMUCalibration
      void startIMUCalibration(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.START_IMU_CALIBRATION
      Description:

      Starts IMU calibration. For aircraft with multiple IMUs, this method will start the calibration of all IMUs. Keep the aircraft stationary and horizontal during calibration, which will take 5 to 10 minutes. The completion block will be called once the calibration is started. Use the onUpdate method to check the execution status of the IMU calibration.

      Input Parameters:
      @Nullable CompletionCallback callbackCompletion callback.
      method startIMUCalibration
      void startIMUCalibration(@IntRange(from = 0, to = 2) int index,
      @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.START_IMU_CALIBRATION_WITH_ID
      Description:

      Starts the calibration for IMU with a specific ID. Keep the aircraft stationary and horizontal during calibration, which will take 5 to 10 minutes. The completion block will be called once the calibration is started. Use the onUpdate method to check the execution status of the IMU calibration.

      Input Parameters:
      @IntRange(from = 0, to = 2) int indexThe IMU with the specific ID to calibrate.
      @Nullable CompletionCallback callbackCompletion callback to check if the calibration starts successfully.
      Gravity Center Calibration
      method
      method startGravityCenterCalibration
      void startGravityCenterCalibration(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Starts gravity center calibration. Keep the aircraft hover without wind during calibration. The completion block will be called once the calibration is started.

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned value(s).
      method stopGravityCenterCalibration
      void stopGravityCenterCalibration(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Stop gravity center calibration.

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned value(s).


      Sub Components

      Landing Gear
      method
      method getLandingGear
      LandingGear getLandingGear()
      Package:dji.sdk.flightcontroller
      Description:

      Landing Gear object. For products with movable landing gear only.

      Return:
      LandingGearAn instance of LandingGear.
      method isLandingGearMovable
      boolean isLandingGearMovable()
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.IS_LANDING_GEAR_MOVABLE
      Description:

      true if landing gear is supported for the connected aircraft.

      Return:
      booleanA boolean value.
      Simulator
      method
      method getSimulator
      Simulator getSimulator()
      Package:dji.sdk.flightcontroller
      Description:

      Simulator object.

      Return:
      SimulatorAn instance of Simulator.
      Onboard SDK Device
      method
      method isOnboardSDKDeviceAvailable
      boolean isOnboardSDKDeviceAvailable()
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.IS_ON_BOARD_SDK_AVAILABLE
      Description:

      Returns if the Onboard SDK feature is available on the connected product.

      Return:
      booleanA boolean value.
      method sendDataToOnboardSDKDevice
      void sendDataToOnboardSDKDevice(@Size(min = 1, max = 100) byte[] data,
      @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.SEND_DATA_TO_ON_BOARD_SDK_DEVICE
      Description:

      If there is a device connected to the aircraft using the Onboard SDK, 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, Matrice 600, Matrice 600 Pro, A3, A3 Pro, and N3).

      Input Parameters:
      @Size(min = 1, max = 100) byte[] dataData to be sent to the external device. The size of the data should not be larger than 100 bytes.
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.


      Flight Assistance

      Access Locker
      method
      method getAccessLocker
      AccessLocker getAccessLocker()
      Package:dji.sdk.flightcontroller
      Description:

      Gets the instance of the access locker. It is used to encapsulate the access protection features on the aircraft.

      Return:
      AccessLockerInstance of the access locker. null if it is not supported by the aircraft.
      Collision Avoidance and Vision Positioning
      method
      method isFlightAssistantSupported
      boolean isFlightAssistantSupported()
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.IS_FLIGHT_ASSISTANT_SUPPORTED
      Description:

      true if the product supports IntelligentFlightAssistant.

      Return:
      booleanA boolean value.
      method getFlightAssistant
      @Nullable
      FlightAssistant getFlightAssistant()
      Package:dji.sdk.flightcontroller
      Description:

      Intelligent flight assistant.

      Return:
      FlightAssistantAn instance of FlightAssistant.
      Check Access Locker Supported
      method
      method isAccessLockerSupported
      boolean isAccessLockerSupported()
      Package:dji.sdk.flightcontroller
      Description:

      true if the product supports AccessLocker.

      Return:
      booleanA boolean value.
      Flight Orientation Mode
      method
      method setFlightOrientationMode
      void setFlightOrientationMode(@NonNull FlightOrientationMode type,
      @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.ORIENTATION_MODE
      Description:

      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.

      Input Parameters:
      @NonNull FlightOrientationMode typeThe orientation mode.
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method lockCourseUsingCurrentHeading
      void lockCourseUsingCurrentHeading(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.LOCK_COURSE_USING_CURRENT_HEADING
      Description:

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

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result. Please refer to DJIBaseComponent for more information about the block
      Tripod Mode
      method
      method setTripodModeEnabled
      void setTripodModeEnabled(boolean enabled,
      @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Enables/disables 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 aren't available, tripod mode cannot be enabled. If the GPS and/or the vision system is providing the flight controller with velocity information, the aircraft will be able to automatically compensate for wind. If however, position information is not available, manual intervention will be required. User should beware that any manual compensation will be limited due to the reduced maximum velocity and sensitivity. If GPS and vision position become unavailable while in tripod mode, it is advisable to alert the user and disable Tripod Mode.

      Input Parameters:
      boolean enabledtrue to enable tripod mode.
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method getTripodModeEnabled
      void getTripodModeEnabled(@NonNull CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      Description:

      Gets tripod mode status (enabled/disabled).

      Input Parameters:
      @NonNull CompletionCallbackWith<Boolean> callbackThe execution callback with the returned value(s).
      Cinematic Mode
      method
      method setCinematicModeEnabled
      void setCinematicModeEnabled(boolean enabled,
      @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Enables/disables cinematic mode. In Cinematic Mode, you can shoot more stable and smooth photos and videos. Aircraft yaw speed will be lower and braking distance will be longer. It's only supported by Mavic Pro, Spark, Mavic 2 Zoom and Mavic 2 Pro.

      Input Parameters:
      boolean enabledtrue to enable cinematic mode.
      @Nullable CompletionCallback callbackThe execution callback with the returned value(s).
      method getCinematicModeEnabled
      void getCinematicModeEnabled(@NonNull CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      Description:

      Gets cinematic mode status (enabled/disabled). It's only supported by Mavic Pro, Spark, Mavic 2 Zoom and Mavic 2 Pro.

      Input Parameters:
      @NonNull CompletionCallbackWith<Boolean> callbackThe execution callback with the returned boolean value.
      Cinematic Brake
      method
      method setCinematicBrakeSensitivity
      void setCinematicBrakeSensitivity(int brakeSensitivity, @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Adjusts the braking sensitivity when cinematic mode is enabled. Higher sensitivity can shorten the braking distance in cinematic mode. It's supported by Mavic Pro, Spark, Mavic 2 Zoom and Mavic 2 Pro.

      Input Parameters:
      int brakeSensitivityBrake sensitivity in cinematic mode.
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method getCinematicBrakeSensitivity
      void getCinematicBrakeSensitivity(@NonNull CompletionCallbackWith<Integer> callback)
      Package:dji.sdk.flightcontroller
      Description:

      Gets the braking sensitivity when cinematic mode is enabled. Higher sensitivity can shorten the braking distance in cinematic mode. It's supported by Mavic Pro, Spark, Mavic 2 Zoom and Mavic 2 Pro.

      Input Parameters:
      @NonNull CompletionCallbackWith<Integer> callbackThe execution callback with the returned value(s).
      Cinematic Yaw
      method
      method setCinematicYawSpeed
      void setCinematicYawSpeed(float yawSpeed, @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Adjusts the aircraft's yaw speed when cinematic mode is enabled. It's supported by Mavic Pro, Spark, Mavic 2 Zoom and Mavic 2 Pro.

      Input Parameters:
      float yawSpeedThe aircraft's yaw speed in cinematic mode.
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method getCinematicYawSpeed
      void getCinematicYawSpeed(@NonNull CompletionCallbackWith<Float> callback)
      Package:dji.sdk.flightcontroller
      Description:

      Gets the aircraft's yaw speed when cinematic mode is enabled. It's supported by Mavic Pro, Spark, Mavic 2 Zoom and Mavic 2 Pro.

      Input Parameters:
      @NonNull CompletionCallbackWith<Float> callbackThe execution callback with the returned value(s).
      Terrain Follow Mode
      method
      method setTerrainFollowModeEnabled
      void setTerrainFollowModeEnabled(Boolean enabled,
      @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.TERRAIN_FOLLOW_MODE_ENABLED
      Description:

      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.

      Input Parameters:
      Boolean enabledtrue to enable terrain follow mode.
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method getTerrainFollowModeEnabled
      void getTerrainFollowModeEnabled(
      @NonNull final CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.TERRAIN_FOLLOW_MODE_ENABLED
      Description:

      Gets terrain mode status (enabled/disabled).

      Input Parameters:
      @NonNull final CompletionCallbackWith<Boolean> callbackThe execution callback with the returned value(s).
      Advanced Control Mode
      method
      method setControlMode
      void setControlMode(@NonNull ControlMode mode, @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.CONTROL_MODE
      Description:

      Sets the control mode of the flight controller. It is highly recommended you keep the default value of SMART. See ControlMode for details. Only supported by stand-alone A3.

      Input Parameters:
      @NonNull ControlMode modeControl mode to set.
      @Nullable CompletionCallback callbackCompletion callback that receives the setter execution result.
      method getControlMode
      void getControlMode(@NonNull CompletionCallbackWith<ControlMode> callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.CONTROL_MODE
      Description:

      Gets the control mode of the flight controller.

      Input Parameters:
      @NonNull CompletionCallbackWith<ControlMode> callbackThe execution callback with the returned value(s).
      Auto Quick Spin
      method
      method setAutoQuickSpinEnabled
      void setAutoQuickSpinEnabled(boolean enabled, @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

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

      Input Parameters:
      boolean enabledtrue to enable Auto Quick Spin.
      @Nullable CompletionCallback callbackThe execution callback with the returned value(s).
      method getQuickSpinEnabled
      void getQuickSpinEnabled(@NonNull CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.QUICK_SPIN_ENABLED
      Description:

      Gets current Auto Quick Spin mode (enabled/disabled).

      Input Parameters:
      @NonNull CompletionCallbackWith<Boolean> callbackThe execution callback with the returned execution result.
      Flight Limitation
      method
      method setMaxFlightHeight
      void setMaxFlightHeight(@IntRange(from = 20, to = 500) int maxHeight,
      @Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.MAX_FLIGHT_HEIGHT
      Description:

      Sets the maximum flight height limitation of the aircraft. The maxHeight value must be in the range [20, 500] m.

      Input Parameters:
      @IntRange(from = 20, to = 500) int maxHeightMaximum height of the aircraft.
      @Nullable final CompletionCallback callbackThe execution callback with the execution result returned.
      method getMaxFlightHeight
      void getMaxFlightHeight(@NonNull final CompletionCallbackWith<Integer> callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.MAX_FLIGHT_HEIGHT
      Description:

      Gets the maximum flight height limitation of the aircraft.

      Input Parameters:
      @NonNull final CompletionCallbackWith<Integer> callbackThe execution callback with the returned value(s).
      method setMaxFlightRadius
      void setMaxFlightRadius(@IntRange(from = 15, to = 8000) int maxRadius,
      @Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.MAX_FLIGHT_RADIUS
      Description:

      Sets the maximum flight radius limitation of the aircraft. The radius is calculated from the home point. The maxRadius value must be in the range [15, 8000] m.

      Input Parameters:
      @IntRange(from = 15, to = 8000) int maxRadiusMaximum flight radius of the aircraft.
      @Nullable final CompletionCallback callbackThe execution callback with the execution result returned.
      method getMaxFlightRadius
      void getMaxFlightRadius(@NonNull final CompletionCallbackWith<Integer> callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.MAX_FLIGHT_RADIUS
      Description:

      Gets the maximum flight radius limitation of the aircraft.

      Input Parameters:
      @NonNull final CompletionCallbackWith<Integer> callbackThe execution callback with the returned value(s).
      method setMaxFlightRadiusLimitationEnabled
      void setMaxFlightRadiusLimitationEnabled(boolean enabled, @Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.MAX_FLIGHT_RADIUS_ENABLED
      Description:

      Sets whether the maximum flight radius limitation is enabled. If enabled is false, there is no maximum flight radius limitation.

      Input Parameters:
      boolean enabledMaximum flight radius limitation is enabled.
      @Nullable final CompletionCallback callbackThe execution callback with the execution result returned.
      method getMaxFlightRadiusLimitationEnabled
      void getMaxFlightRadiusLimitationEnabled(@NonNull final CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.MAX_FLIGHT_RADIUS_ENABLED
      Description:

      Gets the maximum flight radius limitation status (enabled/disabled).

      Input Parameters:
      @NonNull final CompletionCallbackWith<Boolean> callbackThe execution callback with the returned value(s).


      Flight Actions

      Motors
      method
      method turnOnMotors
      void turnOnMotors(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.TURN_ON_MOTORS
      Description:

      Turns on the aircraft's motors. Supported by flight controller firmware 3.1.0.0 or above.

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method turnOffMotors
      void turnOffMotors(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.TURN_OFF_MOTORS
      Description:

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

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      Urgent Stop Mode
      method
      method setUrgentStopModeEnabled
      void setUrgentStopModeEnabled(boolean enabled, @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Enables urgent stop mode. When urgent stop mode is enabled, the motor can be stopped by pushing sticks inner/outer simultaneously at any time. Use with caution. Supported only by Phantom 4 RTK.

      Input Parameters:
      boolean enabledtrue to enable urgent stop mode.
      @Nullable CompletionCallback callbackCompletion block that receives the setter execution result.
      method getUrgentStopModeEnabled
      void getUrgentStopModeEnabled(
      @NonNull final CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      Description:

      Gets if urgent stop mode is enabled or not. Supported only by Phantom 4 RTK.

      Input Parameters:
      @NonNull final CompletionCallbackWith<Boolean> callbackCompletion callback that receives the execution result.
      ESC Beep
      method
      method setESCBeepEnabled
      void setESCBeepEnabled(boolean enabled, @Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Enables ESC beeping.

      Input Parameters:
      boolean enabledtrue to enable ESC beeping.
      @Nullable final CompletionCallback callbackThe execution callback with the execution result returned.
      method getESCBeepEnabled
      void getESCBeepEnabled(@NonNull final CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      Description:

      Determines if ESC beeping is enabled.

      Input Parameters:
      @NonNull final CompletionCallbackWith<Boolean> callbackThe execution callback with the returned value(s).
      method setGravityCenterStateCallback
      void setGravityCenterStateCallback(@Nullable GravityCenterState.Callback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Sets the callback function that updates the gravity calibration's current state data.

      Input Parameters:
      @Nullable GravityCenterState.Callback callbackThe execution callback with the execution result returned.
      Take Off
      method
      method startTakeoff
      void startTakeoff(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.TAKE_OFF
      Description:

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

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method startPrecisionTakeoff
      void startPrecisionTakeoff(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Starts aircraft precision takeoff. Precision Takeoff is considered complete when the aircraft is hovering 6 meters (20 feet) above the ground. Completion block is called when aircraft crosses 0.5 meters (1.6 feet). If the motors are already on, this command cannot be executed.
      This feature need vision assisted positioning enabled on.

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method cancelTakeoff
      void cancelTakeoff(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.CANCEL_TAKE_OFF
      Description:

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

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      Land
      method
      method startLanding
      void startLanding(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.START_LANDING
      Description:

      Starts auto-landing of the aircraft. Returns completion block once aircraft begins to descend for auto-land.

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method cancelLanding
      void cancelLanding(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.CANCEL_LANDING
      Description:

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

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method confirmLanding
      void confirmLanding(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.CONFIRM_LANDING
      Description:

      Confirms continuation of 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 FlightControllerState to check if confirmation is needed. It is supported by flight controller firmware 3.2.0.0 and above.

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned value(s).


      LED Settings

      Enable LED
      method
      method setLEDsEnabledSettings
      void setLEDsEnabledSettings(LEDsSettings ledsSettings, @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.LEDS_ENABLED_SETTINGS
      Description:

      Turns on/off different sets of LEDs on the aircraft. All the LEDs are on by default.

      Input Parameters:
      LEDsSettings ledsSettingsSettings to control LEDs.
      @Nullable CompletionCallback callbackCompletion callback that receives the setter execution result.
      method getLEDsEnabledSettings
      void getLEDsEnabledSettings(@NonNull CompletionCallbackWith<LEDsSettings> callback)
      Package:dji.sdk.flightcontroller
      Description:

      Determines the status of LEDs on the aircraft.

      Input Parameters:
      @NonNull CompletionCallbackWith<LEDsSettings> callbackThe execution callback with the returned value(s).


      Virtual Sticks

      method isVirtualStickControlModeAvailable
      boolean isVirtualStickControlModeAvailable()
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.IS_VIRTUAL_STICK_CONTROL_MODE_AVAILABLE
      Description:

      Indicates whether the virtual stick control interface can be used. Virtual stick mode is only available when all of the follow requirements are met:

      • Virtual stick mode is enabled.
      • No waypoint, hotpoint, or follow-me mission is running.
      • FlightOrientationMode is set to AIRCRAFT_HEADING
      • Terrain-follow is disabled if the aircraft supports this feature.
      • Tripod mode is disabled if the aircraft supports this feature.

      Return:
      booleantrue if virtual stick mode is available.
      method setVirtualStickModeEnabled
      void setVirtualStickModeEnabled(boolean enabled, @Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.VIRTUAL_STICK_CONTROL_MODE_ENABLED
      Description:

      Enables/disables virtual stick control mode. By enabling virtual stick control mode, the aircraft can be controlled using sendVirtualStickFlightControlData. Not supported by Mavic Pro when using the WiFi connection.

      Input Parameters:
      boolean enabledtrue to enable virtual stick mode.
      @Nullable final CompletionCallback callbackThe execution callback with the returned execution result.
      method getVirtualStickModeEnabled
      void getVirtualStickModeEnabled(@NonNull final CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.VIRTUAL_STICK_CONTROL_MODE_ENABLED
      Description:

      Gets virtual stick mode status (enabled/disabled). Not supported by Mavic Pro when using the WiFi connection.

      Input Parameters:
      @NonNull final CompletionCallbackWith<Boolean> callbackThe execution callback with the returned execution result.
      method isVirtualStickAdvancedModeEnabled
      boolean isVirtualStickAdvancedModeEnabled()
      Package:dji.sdk.flightcontroller
      Description:

      true if Virtual Stick advanced mode is enabled. By default, it is false. Assuming GPS signal is good, advanced mode will allow aircraft to compensate for wind when hovering. For the Phantom 4, collision avoidance can be enabled for virtual stick control if advanced mode is on, and collision avoidance is enabled in FlightAssistant. Only supported by flight controller firmware versions 3.1.x.x or above. CAUTION: It will be reset to false when the flight controller is reconnected.

      Return:
      booleanA boolean value.
      method setVirtualStickAdvancedModeEnabled
      void setVirtualStickAdvancedModeEnabled(boolean virtualStickAdvancedModeEnabled)
      Package:dji.sdk.flightcontroller
      Description:

      Set true to enable Virtual Stick advanced mode. By default, it is false. Assuming GPS signal is good, advanced mode will allow aircraft to compensate for wind when hovering. For the Phantom 4, collision avoidance can be enabled for virtual stick control if advanced mode is on, and collision avoidance is enabled in FlightAssistant. Only supported by flight controller firmware versions 3.1.0.0 or above.

      Input Parameters:
      boolean virtualStickAdvancedModeEnabled<code>True</code> for enabling advanced mode.
      Control Modes
      method
      method getVerticalControlMode
      VerticalControlMode getVerticalControlMode()
      Package:dji.sdk.flightcontroller
      Description:

      The vertical control mode for virtual stick. CAUTION: It will be reset to VELOCITY when the flight controller is reconnected.

      Return:
      VerticalControlModeAn enum value of VerticalControlMode.
      method setVerticalControlMode
      void setVerticalControlMode(@NonNull VerticalControlMode verticalControlMode)
      Package:dji.sdk.flightcontroller
      Description:

      Sets whether virtual stick vertical controller changes aircraft's altitude or vertical velocity.

      Input Parameters:
      @NonNull VerticalControlMode verticalControlModeA specific DJIVirtualStickVerticalControlMode object.
      method getRollPitchControlMode
      RollPitchControlMode getRollPitchControlMode()
      Package:dji.sdk.flightcontroller
      Description:

      The roll and pitch control mode for virtual stick. CAUTION: It will be reset to ANGLE when the flight controller is reconnected.

      Return:
      RollPitchControlModeAn enum value of RollPitchControlMode.
      method setRollPitchControlMode
      void setRollPitchControlMode(@NonNull RollPitchControlMode rollPitchControlMode)
      Package:dji.sdk.flightcontroller
      Description:

      Sets whether roll/pitch virtual controllers change aircraft's angle relative to level orientation, or aircraft's velocity on horizontal axes.

      Input Parameters:
      @NonNull RollPitchControlMode rollPitchControlModeA specific DJIVirtualStickRollPitchControlMode object.
      method getYawControlMode
      YawControlMode getYawControlMode()
      Package:dji.sdk.flightcontroller
      Description:

      The yaw control mode for virtual stick. CAUTION: It will be reset to ANGLE when the flight controller is reconnected.

      Return:
      YawControlModeAn enum value of YawControlMode.
      method setYawControlMode
      void setYawControlMode(@NonNull YawControlMode yawControlMode)
      Package:dji.sdk.flightcontroller
      Description:

      Sets whether virtual stick yaw controller changes aircraft's heading by angle or by angular velocity.

      Input Parameters:
      @NonNull YawControlMode yawControlModeA specific DJIVirtualStickYawControlMode object.
      Coordinate System
      method
      method getRollPitchCoordinateSystem
      FlightCoordinateSystem getRollPitchCoordinateSystem()
      Package:dji.sdk.flightcontroller
      Description:

      The coordinate system for virtual stick. CAUTION: It will be reset to GROUND when the flight controller is reconnected.

      Return:
      FlightCoordinateSystemCoordinate system object.
      method setRollPitchCoordinateSystem
      void setRollPitchCoordinateSystem(@NonNull FlightCoordinateSystem rollPitchCoordinateSystem)
      Package:dji.sdk.flightcontroller
      Description:

      Sets whether horizontal axes are fixed relative to the ground or to the aircraft.

      Input Parameters:
      @NonNull FlightCoordinateSystem rollPitchCoordinateSystemA specific rollPitchCoordinateSystem object.
      method sendVirtualStickFlightControlData
      void sendVirtualStickFlightControlData(@NonNull FlightControlData controlData,
      @Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.SEND_VIRTUAL_STICK_FLIGHT_CONTROL_DATA
      Description:

      Sends flight control data using virtual stick commands. The isVirtualStickControlModeAvailable method must return 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.

      Input Parameters:
      @NonNull FlightControlData controlDataFlight control data
      @Nullable final CompletionCallback callbackThe execution callback with the returned execution result.


      Home

      Go Home
      method
      method startGoHome
      void startGoHome(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.START_GO_HOME
      Description:

      The aircraft will start to go home. The completion callback will return execution result once this method is invoked.

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method cancelGoHome
      void cancelGoHome(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.CANCEL_GO_HOME
      Description:

      The aircraft will stop going home and will hover in place.

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      Location
      method
      method setHomeLocation
      void setHomeLocation(@NonNull LocationCoordinate2D homeLocation,
      @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.HOME_LOCATION
      Description:

      Sets the home location of the aircraft. The home location is where the aircraft returns when commanded by startGoHome, when its signal is lost or when the battery is below the lowBatteryWarning threshold. The user should be careful setting a new home point location, as sometimes the product will not be under user control when returning home. A home location is valid if it is within 30m of one of the following:

      • initial take-off location
      • aircraft's current location
      • current mobile location with at least kCLLocationAccuracyNearestTenMeters accuracy level
      • current remote controller's location as shown by RC GPS.

      Input Parameters:
      @NonNull LocationCoordinate2D homeLocationHome location latitude and longitude in degrees.
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method setHomeLocationUsingAircraftCurrentLocation
      void setHomeLocationUsingAircraftCurrentLocation(@Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.HOME_LOCATION_USING_CURRENT_AIRCRAFT_LOCATION
      Description:

      Sets the home location of the aircraft to the current location of the aircraft. See setHomeLocation for details on home point use.

      Input Parameters:
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method getHomeLocation
      void getHomeLocation(@NonNull CompletionCallbackWith<LocationCoordinate2D> callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.HOME_LOCATION
      Description:

      Gets the home point of the aircraft.

      Input Parameters:
      @NonNull CompletionCallbackWith<LocationCoordinate2D> callbackThe execution callback with the returned value(s).
      method setGoHomeHeightInMeters
      void setGoHomeHeightInMeters(@IntRange(from = 20, to = 500) int height,
      @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.GO_HOME_HEIGHT_IN_METERS
      Description:

      Sets the minimum altitude, relative to where the aircraft took off, at which the aircraft must be before going home. This can be useful when the user foresees obstacles in the aircraft's flight path. 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.

      Input Parameters:
      @IntRange(from = 20, to = 500) int heightThe aircraft's default go home altitude.
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method getGoHomeHeightInMeters
      void getGoHomeHeightInMeters(@NonNull CompletionCallbackWith<Integer> callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.GO_HOME_HEIGHT_IN_METERS
      Description:

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

      Input Parameters:
      @NonNull CompletionCallbackWith<Integer> callbackThe execution callback with the returned value(s).


      Fail Safes

      method setConnectionFailSafeBehavior
      void setConnectionFailSafeBehavior(@NonNull ConnectionFailSafeBehavior behavior,
      @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.CONNECTION_FAIL_SAFE_BEHAVIOR
      Description:

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

      Input Parameters:
      @NonNull ConnectionFailSafeBehavior behaviorThe ConnectionFailSafeBehavior object.
      @Nullable CompletionCallback callbackThe execution callback with the returned value(s).
      method getConnectionFailSafeBehavior
      void getConnectionFailSafeBehavior(
      @NonNull CompletionCallbackWith<ConnectionFailSafeBehavior> callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.CONNECTION_FAIL_SAFE_BEHAVIOR
      Description:

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

      Input Parameters:
      @NonNull CompletionCallbackWith<ConnectionFailSafeBehavior> callbackThe execution callback with the returned value(s).
      method setLowBatteryWarningThreshold
      void setLowBatteryWarningThreshold(@IntRange(from = 15, to = 50) int percent,
      @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.LOW_BATTERY_WARNING_THRESHOLD
      Description:

      Sets the low battery warning threshold as a percentage. The percentage must be in the range of [15, 50].

      Input Parameters:
      @IntRange(from = 15, to = 50) int percentLow battery warning percentage.
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method getLowBatteryWarningThreshold
      void getLowBatteryWarningThreshold(@NonNull CompletionCallbackWith<Integer> callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.LOW_BATTERY_WARNING_THRESHOLD
      Description:

      Gets the low battery warning threshold as a percentage.

      Input Parameters:
      @NonNull CompletionCallbackWith<Integer> callbackThe execution callback with the returned value(s).
      method setSeriousLowBatteryWarningThreshold
      void setSeriousLowBatteryWarningThreshold(@IntRange(from = 10, to = 45) int percent,
      @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.SERIOUS_LOW_BATTERY_WARNING_THRESHOLD
      Description:

      Sets the serious low battery warning threshold as a percentage. The minimum value is 10. The maximum value is value from getLowBatteryWarningThreshold minus 5.

      Input Parameters:
      @IntRange(from = 10, to = 45) int percentSerious low battery warning percentage.
      @Nullable CompletionCallback callbackThe execution callback with the returned execution result.
      method getSeriousLowBatteryWarningThreshold
      void getSeriousLowBatteryWarningThreshold(@NonNull CompletionCallbackWith<Integer> callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.SERIOUS_LOW_BATTERY_WARNING_THRESHOLD
      Description:

      Gets the serious low battery warning threshold in percentage.

      Input Parameters:
      @NonNull CompletionCallbackWith<Integer> callbackThe execution callback with the value(s) returned.
      method setSmartReturnToHomeEnabled
      void setSmartReturnToHomeEnabled(boolean enabled, @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Enables/disables Smart Return-To-Home (RTH) feature. When it is enabled, aircraft will request to go home when remaining battery is only enough for completing the go-home action.

      Input Parameters:
      boolean enabledtrue to enable smart RTH.
      @Nullable CompletionCallback callbackCompletion block that receives the setter execution result.
      method getSmartReturnToHomeEnabled
      void getSmartReturnToHomeEnabled(
      @NonNull final CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      Description:

      Determines whether Smart Return-To-Home (RTH) feature is enabled or not. When it is enabled, aircraft will request to go home when remaining battery is only enough for completing the go-home action.

      Input Parameters:
      @NonNull final CompletionCallbackWith<Boolean> callbackCompletion callback that receives the execution result.
      method confirmSmartReturnToHomeRequest
      void confirmSmartReturnToHomeRequest(boolean confirmed, @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Confirms or cancels the Smart Return-To-Home (RTH) request. When Smart RTH is enabled, the aircraft will request to go home when the battery is only enough for going home. Before executing the go-home action, the aircraft will wait for the confirmation from users with 10 seconds count-down. If the "confirmed" parameter is false, the request is canceled and the aircraft will not execute go-home action. Otherwise, go-home action will start. Smart RTH will be triggered only once during the same flight. Flight controller with firmware version lower than 3.0.0.0 does not support confirming the Smart RTH request. User can either cancel the request or wait for the countdown to start go-home action.

      Input Parameters:
      boolean confirmedtrue to confirm the request and the aircraft will start go-home immediately.
      @Nullable CompletionCallback callbackCompletion block to receive the result.


      Flight Mode

      method getRCSwitchFlightModeMapping
      void getRCSwitchFlightModeMapping(
      @NonNull CompletionCallbackWith<RemoteControllerFlightMode[]> callback)
      Package:dji.sdk.flightcontroller
      Description:

      Gets the mapping between the flight modes and the flight mode switch positions on the remote controller. Elements 0, 1, and 2 of the returned array map to POSITION_ONE, POSITION_TWO, and POSITION_THREE of the getFlightModeSwitch. The value of each Enum item represents the corresponding value of the RemoteControllerFlightMode Enum representing the flight mode.
      The mapping is fixed for the Phantom series, Inspire series, Mavic Pro, and 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.

      Input Parameters:
      @NonNull CompletionCallbackWith<RemoteControllerFlightMode[]> callbackCompletion callback that receives the getter result. Each element of array is an instance with a value of RemoteControllerFlightMode.
      Multiple Flight Mode
      method
      method setMultipleFlightModeEnabled
      void setMultipleFlightModeEnabled (boolean enabled, @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Enables/disables multiple-flight mode. When multiple-flight mode is enabled, user can change the aircraft's mode to P/F/A/S mode by toggling the switch on the remote controller. If it is disabled, the aircraft will be in P mode.

      Input Parameters:
      boolean enabledtrue to enable multiple-flight mode.
      @Nullable CompletionCallback callbackCompletion callback that receives the execution result.
      method getMultipleFlightModeEnabled
      void getMultipleFlightModeEnabled (@NonNull CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      Description:

      Determines whether multiple-flight mode is enabled. When multiple-flight mode is enabled, user can change the aircraft's mode to P/F/A/S mode by toggling the switch on the remote controller. If it is disabled, the aircraft will be in P mode.

      Input Parameters:
      @NonNull CompletionCallbackWith<Boolean> callbackCompletion callback that receives the execution result.
      Novice Mode Enabled
      method
      method setNoviceModeEnabled
      void setNoviceModeEnabled(boolean enabled, @Nullable CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Enables novice mode. When novice mode is enabled, the flight speed will become slower and less responsive handling. For Phantom 4 Pro, enabling novice mode will enable the infrared time-of-flight (TOF) sensors on the left and right.

      Input Parameters:
      boolean enabledtrue to enable novice mode.
      @Nullable CompletionCallback callbackCompletion block that receives the execution result.
      method getNoviceModeEnabled
      void getNoviceModeEnabled(@NonNull CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      Description:

      Determines whether novice mode is enabled or not. If novice mode is enabled, the flight speed is slower and less responsive handling. For Phantom 4 Pro, enabling novice mode will enable the infrared time-of-flight (TOF) sensors on the left and right.

      Input Parameters:
      @NonNull CompletionCallbackWith<Boolean> callbackCompletion callback that receives the execution result.
      Max Flight Height
      method
      method hasReachedMaxFlightHeight
      boolean hasReachedMaxFlightHeight()
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.HAS_REACHED_MAX_FLIGHT_HEIGHT
      Description:

      true if the aircraft has reached the maximum flight height.

      Return:
      booleanA boolean value.
      Max Flight Radius
      method
      method hasReachedMaxFlightRadius
      boolean hasReachedMaxFlightRadius()
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.HAS_REACHED_MAX_FLIGHT_RADIUS
      Description:

      true if the aircraft has reached the maximum flight radius.

      Return:
      booleantrue if the aircraft has reached the maximum flight radius.


      interface OnboardSDKDeviceDataCallback
      interface OnboardSDKDeviceDataCallback
      Package:dji.sdk.flightcontroller
      Description:

      Callback function that updates the data received from an external device (e.g.the onboard device).

      Interface Methods:

      Callback Method

      State
      method
      method onReceive
      void onReceive(byte[] data)
      Package:dji.sdk.flightcontroller
      Description:

      Called when the data received from an external device (e.g. the onboard device) has been updated.

      Input Parameters:
      byte[] dataData received from an external device. The size of the data will not be larger than 100 bytes.
      enum VisionDrawHeadingMode
      @EXClassNullAway
      enum VisionDrawHeadingMode
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.DRAW_HEADING_MODE
      Description:

      The heading mode of the camera used in the vision drawing the 3D orbit data.

      Enum Members:
      FREEFree mode - Camera direction can be freely adjusted in flight.
      FORWARDRegular mode - camera direction consistent with course direction.
      UNKNOWNUnknown.
      Class Members:
      enum VisionDrawStatus
      @EXClassNullAway
      enum VisionDrawStatus
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.DRAW_STATUS
      Description:

      State of the vision drawing the 3D orbit data.

      Enum Members:
      INITInitializing.
      PREPAREVision got the orbit data, and preparing to calculate the 3D orbit.
      READY_TO_GOVision has generated the 3D orbit data, and start to download.
      START_AUTOStarting State (Auto mode).
      START_MANUALStaring State (Manual mode).
      PAUSEPause state.
      OTHEROther unknown state.
      Class Members:
      enum UrgentStopMotorMode
      @EXClassNullAway
      enum UrgentStopMotorMode
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.URGENT_STOP_MOTOR_MODE
      Description:

      The Mode enum to urgent stop motor.

      Enum Members:
      CSCCommand only for Inspire 2, Phantom 4, Phantom 4 Professional, Phantom 4 Advanced and M200 series.
      NEVERCommand only for Inspire 2, Phantom 4, Phantom 4 Professional, Phantom 4 Advanced and M200 series.
      IN_OUT_ALWAYSCommand only for DJI Mavic Pro and Mavic Air.
      IN_OUT_WHEN_BREAKDOWNCommand only for DJI Mavic Pro and Mavic Air.
      UNKNOWNUnknown.
      Class Members:
      State Updates
      class
      Sensors
      class
      class
      Access Locker
      class
      Virtual Sticks
      class
      enum VerticalControlMode
      @EXClassNullAway
      enum VerticalControlMode
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Defines how vertical control values are interpreted by the aircraft.

      Enum Members:
      VELOCITYSets the virtual stick vertical control values to be a vertical velocity. Positive and negative vertical velocity is for the aircraft ascending and descending respectively. Maximum vertical velocity is defined as 4 m/s. Minimum vertical velocity is defined as -4 m/s.
      POSITIONSets the virtual stick vertical control values to be an altitude. Maximum position is defined as 500 m. Minimum position is defined as 0 m.
      Class Members:
      enum RollPitchControlMode
      @EXClassNullAway
      enum RollPitchControlMode
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Defines how manual roll and pitch values are interpreted by the aircraft.

      Enum Members:
      ANGLESets the roll and pitch values to be an angle relative to a level aircraft. In the body coordinate system, positive and negative pitch angle is for the aircraft rotating about the y-axis in the positive direction or negative direction, respectively. Positive and negative roll angle is the positive direction or negative direction rotation angle about the x-axis, respectively. However in the ground coordinate system, positive and negative pitch angle is the angle value for the aircraft moving south and north, respectively. Positive and negative roll angle is the angle when the aircraft is moving east and west, respectively. Maximum angle is defined as 30 degrees. Minimum angle is defined as -30 degrees.
      VELOCITYSets the roll and pitch values to be a velocity. In the body coordinate system, positive and negative pitch velocity is for the aircraft moving towards the positive direction or negative direction along the pitch axis and y-axis, respectively. Positive and negative roll velocity is when the aircraft is moving towards the positive direction or negative direction along the roll axis and x-axis, respectively. However, in the ground coordinate system, positive and negative pitch velocity is for the aircraft moving east and west, respectively. Positive and negative roll velocity is when the aircraft is moving north and south, respectively. Maximum velocity is defined as 15 meters/s. Minimum velocity is defined as -15 meters/s.
      Class Members:
      enum YawControlMode
      @EXClassNullAway
      enum YawControlMode
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Defines how manual yaw values are interpreted by the aircraft.

      Enum Members:
      ANGLESets the yaw values to be an angle relative to the north. Positive and negative yaw angle is for the aircraft rotating clockwise and counterclockwise, respectively. Maximum yaw angle is defined as 180 degrees. Minimum yaw angle is defined as -180 degrees.
      ANGULAR_VELOCITYSets the yaw values to be an angular velocity. Positive and negative angular velocity is for the aircraft rotating clockwise and counterclockwise, respectively. Maximum yaw angular velocity is defined as 100 degrees/s. Minimum yaw angular velocity is defined as -100 degrees/s.
      Class Members:
      enum FlightCoordinateSystem
      @EXClassNullAway
      enum FlightCoordinateSystem
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Flight control coordinate system.

      Enum Members:
      GROUNDGround coordinate system.
      BODYBody coordinate system.
      Class Members:
      Flight Assistance
      enum
      enum ControlMode
      @EXClassNullAway
      enum ControlMode
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.CONTROL_MODE
      Description:

      Control mode of the flight controller. It determines how the pilot can control the aircraft. By default, it is in smart control mode.

      Enum Members:
      SMARTSmart control mode. The aircraft can stabilize its altitude and attitude in smart mode.
      MANUALManual control mode. The aircraft will not stabilize its altitude and attitude in manual mode. This mode is for advanced pilots only, and should only be used when the pilot understands the risk of operating in this mode. Any damage to the product when operating in this mode will not be covered under warranty.
      UNKNOWNUnknown control mode.
      Class Members:
      enum FlightOrientationMode
      @EXClassNullAway
      enum FlightOrientationMode
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.ORIENTATION_MODE
      Description:

      Tells the aircraft how to interpret flight commands for forward, backward, left and right. See the Flight Controller User Guide for more information.

      Enum Members:
      COURSE_LOCKThe aircraft should move relative to a locked course heading.
      HOME_LOCKThe aircraft should move relative radially to the Home Point.
      AIRCRAFT_HEADINGThe aircraft should move relative to the front of the aircraft.
      Class Members:
      Flight Wind Warning
      enum
      enum FlightWindWarning
      @EXClassNullAway
      enum FlightWindWarning
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.FLIGHT_WIND_WARNING
      Description:

      Warning caused by the strong wind.

      Enum Members:
      LEVEL_0No wind warning.
      LEVEL_1The wind speed is high. Fly with caution and ensure the aircraft remains within the line of sight.
      LEVEL_2Strong Wind. Fly with caution and ensure the aircraft remains within line of sight. It is more serious than LEVEL_1.
      UNKNOWNUnknown.
      Class Members:
      enum ConnectionFailSafeBehavior
      @EXClassNullAway
      enum ConnectionFailSafeBehavior
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.CONNECTION_FAIL_SAFE_BEHAVIOR
      Description:

      Defines aircraft failsafe action when signal between the remote controller and the aircraft is lost.

      Enum Members:
      HOVERHover.
      LANDINGLanding.
      GO_HOMEReturn-to-Home.
      UNKNOWNUnknown.
      Class Members:
      enum RemoteControllerFlightMode
      @EXClassNullAway
      enum RemoteControllerFlightMode
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.CURRENT_MODE
      Description:

      Flight modes that map to the flight mode switch on the remote controller.

      Enum Members:
      PPositioning mode. GNSS and Vision Positioning Systems are used for positioning if they are available. For products without F mode, intelligent functions such as missions and intelligent orientation control can be performed in P-mode.
      SSport mode. The maximum flight speed and responsiveness of the aircraft is increased in this mode.
      AAttitude mode. The GNSS and Vision Positioning Systems are not used for positioning. The aircraft only uses the barometer to maintain altitude. If receiving a GNSS signal, the aircraft can automatically return home if the Remote Controller signal is lost and if the Home Point has been recorded successfully.
      GGentle mode. The sensitivity and speed of aircraft will be substantially decreased in gentle mode.
      MManual mode. The aircraft will not stabilize its altitude nor attitude in manual mode. This mode is for advanced pilots only, and should only be used when the pilot understands the risk of operating in this mode. Any damage to the product when operating in this mode will not be covered under warranty. It is supported by stand-alone A3 and N3 and can be enabled in Assistant 2.
      FFunction mode. Performs the same as Positioning mode with intelligent functions such as missions and intelligent orientation control enabled.
      TTripod Mode. This mode drops the aircraft's maximum speed and significantly reduces the control stick sensitivity of the remote controller to give the user the precision needed for accurate framing. It is only supported by Mavic 2.
      UNKNOWNUnknown mode.
      Class Members:
      enum SmartRTHState
      @EXClassNullAway
      enum SmartRTHState
      Package:dji.common.flightcontroller
      Description:

      State of Smart Return-To-Home (RTH). It is only used when Smart RTH is enabled.

      Enum Members:
      IDLESmart RTH is not triggered yet in the current flight. The Smart RTH state will be reset to this value when the aircraft lands.
      COUNTING_DOWNSmart RTH is triggered and the aircraft is counting down. If no response is received within 10 seconds or the user confirms the request, the aircraft will start to go home and the state will change to EXECUTED. If user cancels the request, the state will change to CANCELLED.
      EXECUTEDSmart RTH is already executed in the current flight. The state will not be reset until the aircraft lands.
      CANCELLEDSmart RTH request is cancelled by the user. The state will not be reset until the aircraft lands.
      UNKNOWNUnknown.
      Class Members:
      Air Sense System Info
      class
      LED Settings
      class
      Limits
      class
      Fixed Wing Control
      enum
      enum FixedWingControl
      enum FixedWingControl
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.FIXED_WING_CONTROL
      Description:

      The aircraft will fly forward automatically at a certain speed after entering Fixed-Wing Mode. Push the left stick up to ascend and down to descend. Push either stick left or right to rotate the aircraft. Push the right stick up to accelerate and pushing down will exit Fixed-Wing Mode. See the Flight Controller User Guide for more information.

      Enum Members:
      READYPrepare fixed-wing mode.
      ENTEREnter fixed-wing mode.
      EXITExit fixed-wing mode.
      OTHEROther reservations.
      Class Members:
      Inherited Methods:
      dji.sdk.base.BaseComponent
      method
      method setComponentListener
      void setComponentListener(ComponentListener listener)
      Package:dji.sdk.base
      Description:

      Sets the listener for the DJI component.

      Input Parameters:
      ComponentListener listenerThe callback of ComponentListener.
      method
      method getIndex
      int getIndex()
      Package:dji.sdk.base
      Description:

      Returns the component index. Index is zero based. A component will have an index greater than zero when there are multiple components of the same type on the DJI product, and one of the components already has the index 0. For instance, M210 can have two gimbal mounted cameras, and will therefore have two gimbal components with indices 0 and 1, and two camera components with indices 0 and 1. For Matrice 600, there are printed numbers on the battery boxes. The Battery component instance with index 0 corresponds to battery compartment number 1. For Inspire 2 and M200 series, Battery with index 0 corresponds to the battery on the port (left hand) side of the aircraft. For M210 and M210 RTK, Camera and Gimbal with index 0 corresponds to the camera and gimbal on the port (left hand) side of the aircraft.

      Return:
      intAn int value of index.
      method isConnected
      boolean isConnected()
      Package:dji.sdk.base
      Description:

      true if the component is connected.

      Return:
      booleantrue if the component is connected.
      method getSerialNumber
      void getSerialNumber(@NonNull CompletionCallbackWith<String> callback)
      Package:dji.sdk.base
      Description:

      Gets the serial number of the component. Depending on the component, this serial number might not match the serial number found on the physical component.

      Input Parameters:
      @NonNull CompletionCallbackWith<String> callbackThe execution callback with the value returned.
      method getFirmwareVersion
      void getFirmwareVersion(@NonNull CompletionCallbackWith<String> callback)
      Package:dji.sdk.base
      Description:

      Returns the firmware version of the component. Each component will have a different firmware version, the combination of which will form the package firmware version getFirmwarePackageVersion found in BaseProduct.

      Input Parameters:
      @NonNull CompletionCallbackWith<String> callbackThe execution callback with the value(s) returned.