DJI Mobile SDK Documentation

      class Aircraft

      class Aircraft extends BaseProduct
      Package:dji.sdk.products
      Inherits From:BaseProduct
      Description:

      Aircraft product class, which includes basic product information and access to all components (such as flight controller, battery etc.). This object is accessed from getProduct in DJISDKManager.

      Class Members:
      Components
      method
      method getFlightController
      FlightController getFlightController()
      Package:dji.sdk.products
      Description:

      Returns an instance of the aircraft's flight controller.

      Return:
      FlightControllerDJIFlightController component.
      method getCameras
      @Nullable
      synchronized List<Camera> getCameras()
      Package:dji.sdk.base
      Description:

      Retrieves instances of the product's cameras. This is used when the aircraft has multiple DJI cameras, e.g. M210 and M210 RTK. Note, when two cameras do exist, camera order within the array will not always the same. For example: On the M210, the port side (left) camera will have an index of 0 and the starboard side (right) camera will have an index of 1. However, the first object of getCameras will not necessarily always be the camera with getIndex of 0.

      Return:
      synchronized List<Camera>A list of the aircraft's cameras.
      method getCameraWithComponentIndex
      @Nullable
      Camera getCameraWithComponentIndex(int index)
      Package:dji.sdk.base
      Description:

      Retrieves an instance of the device's camera with inputted index.

      Input Parameters:
      int indexAn int value.
      Return:
      CameraAn instance of the aircraft's camera.
      method getGimbals
      synchronized List<Gimbal> getGimbals()
      Package:dji.sdk.products
      Description:

      Retrieves instances of the product's gimbals. This is used when the aircraft has multiple DJI gimbals, e.g. M210 and M210 RTK. Note, when two gimbals do exist, gimbal order within the array will not always the same. For example: On the M210, the port side (left) gimbal will have an index of 0 and the starboard side (right) gimbal will have an index of 1. However, the first object of getGimbals will not necessarily always be the gimbal with getIndex of 0.

      Return:
      synchronized List<Gimbal>A list of the aircraft's gimbals.
      method getRemoteController
      RemoteController getRemoteController()
      Package:dji.sdk.products
      Description:

      Returns an instance of the aircraft's remote controller.

      Return:
      RemoteControllerDJIRemoteController component.
      method getMobileRemoteController
      MobileRemoteController getMobileRemoteController()
      Package:dji.sdk.products
      Description:

      A simulated remote controller on the mobile device. It is supported by Mavic Pro and Spark using WiFi.

      Return:
      MobileRemoteControllerDJIMobileRemoteController component.
      method getBaseStation
      BaseStation getBaseStation()
      Package:dji.sdk.products
      Description:

      The connected base station instance. It is supported by Phantom 4 RTK and Matrice 210 RTK V2.

      Return:
      BaseStationAn instance of BaseStation.
      method
      method getRadar
      Radar getRadar()
      Package:dji.sdk.products
      Description:

      Retrieves an instance of the device's radar.

      method
      method getLidars
      synchronized List<Lidar> getLidars()
      Package:dji.sdk.products
      Description:

      Retrieves instances of the product's lidars. This is used when the aircraft has multiple DJI lidars, e.g. M300 RTK and M350 RTK. Note, when two Zenmuse L1 do exist, lidar order within the array will not always the same. For example: On the M300 RTK and M350 RTK, the port side (left) Zenmuse L1 will have an index of 0 and the starboard side (right) Zenmuse will have an index of 1. However, the first object of getLidars will not necessarily always be the lidar with getIndex of 0.

      Return:
      synchronized List<Lidar>A list of the aircraft's lidars.
      Inherited Methods:
      dji.sdk.base.BaseProduct
      method
      method setDiagnosticsInformationCallback
      void setDiagnosticsInformationCallback(DiagnosticsInformationCallback callback)
      Package:dji.sdk.base
      Description:

      Sets up the diagnostics list update callback.

      Input Parameters:
      DiagnosticsInformationCallback callbackThe callback of DiagnosticsInformationCallback.
      method getFirmwarePackageVersion
      String getFirmwarePackageVersion()
      Package:dji.sdk.base
      SDK Key:ProductKey.FIRMWARE_PACKAGE_VERSION
      Description:

      Gets the product's firmware package version. Products other than Phantom 4, Phantom 4 Pro, Mavic Pro, and Inspire 2, require internet connection. The execution time for this method depends on the speed of internet connectivity.

      Return:
      StringThe product's firmware package version string.
      method
      method setName
      void setName(@NonNull String name, @Nullable final CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.base
      Description:

      Retrieves the model of the product.

      Input Parameters:
      @NonNull String nameName to be set to the aircraft.
      @Nullable final CommonCallbacks.CompletionCallback callbackAsynchronous execution result.
      method
      method getName
      void getName(final CommonCallbacks.CompletionCallbackWith<String> callback)
      Package:dji.sdk.base
      Description:

      Retrieves the model of the product.

      Input Parameters:
      final CommonCallbacks.CompletionCallbackWith<String> callbackThe execution callback with the returned value.
      method
      method getModel
      Model getModel()
      Package:dji.sdk.base
      SDK Key:ProductKey.MODEL_NAME
      Description:

      Retrieves the model of the product. See Aircraft and HandHeld for the possible strings that can be returned.

      Return:
      ModelThe model of the product.
      method isConnected
      boolean isConnected()
      Package:dji.sdk.base
      SDK Key:ProductKey.CONNECTION
      Description:

      true if the device is connected.

      Return:
      booleantrue if the device is connected.
      method
      method getCamera
      Camera getCamera()
      Package:dji.sdk.base
      Description:

      Retrieves an instance of the device's camera. Only supported by the product with single gimbal, except Zenmuse XT2 and Mavic 2 Enterprise Camera.

      Return:
      CameraAn instance of the aircraft's camera.
      method getBattery
      Battery getBattery()
      Package:dji.sdk.base
      Description:

      Retrieves an instance of the product's smart battery. When using products with multiple batteries, such as the M600 or Inspire 2, use getBatteries, as this method will only return a single battery.

      Return:
      BatteryAn instance of the aircraft's smart battery.
      method getBatteries
      synchronized List<Battery> getBatteries()
      Package:dji.sdk.base
      Description:

      Returns an array of aircraft's batteries. It is used when the aircraft has multiple batteries, e.g. Matrice 600.

      Return:
      synchronized List<Battery>A List of Battery objects.
      method
      method getGimbal
      Gimbal getGimbal()
      Package:dji.sdk.base
      Description:

      Retrieves an instance of the device's gimbal.

      Return:
      GimbalAn instance of the aircraft's gimbal.
      method getAccessoryAggregation
      @Nullable
      AccessoryAggregation getAccessoryAggregation()
      Package:dji.sdk.base
      Description:

      Retrieves an instance of the accessory aggregation.

      Return:
      AccessoryAggregation'NULL' if the product does not support accessories (e.g. spotlight, speaker or beacon).