DJI Mobile SDK Documentation

      class IWaypointMissionManager

      interface IWaypointMissionManager
      Package:dji.v5.manager.interfaces
      Description:

      The class to manage the waypoint mission, it is used to upload, execute, pause and resume the mission and it also provides a listener to monitor the execution status of a waypoint mission.

      Supported since MSDK 5.0.0

      Class Members:
      method addWaypointMissionExecuteStateListener
      void addWaypointMissionExecuteStateListener(WaypointMissionExecuteStateListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Add a listener of waypoint mission execution state. It can be used to listen the execution status of waypoint mission, such as uploading waypoint mission KMZ file, enter wayline flying, and wwaypoint mission finished, etc.

      Supported since MSDK 5.0.0

      Input Parameters:
      WaypointMissionExecuteStateListener listenera listener of waypoint mission execution state.
      method removeWaypointMissionExecuteStateListener
      void removeWaypointMissionExecuteStateListener(WaypointMissionExecuteStateListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Remove a listener of waypoint mission execution state.

      Supported since MSDK 5.0.0

      Input Parameters:
      WaypointMissionExecuteStateListener listenera listener of waypoint mission execution state.
      method clearAllWaypointMissionExecuteStateListener
      void clearAllWaypointMissionExecuteStateListener()
      Package:dji.v5.manager.interfaces
      Description:

      Remove all listeners of the waypoint mission execution state.

      Supported since MSDK 5.0.0

      method addWaylineExecutingInfoListener
      void addWaylineExecutingInfoListener(WaylineExecutingInfoListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Add a listener of waylines execution information. The wayline information includes the currently executed wayline ID and the currently executed waypoint index.

      Supported since MSDK 5.0.0

      Input Parameters:
      WaylineExecutingInfoListener listenera listener of waylines execution information.
      method removeWaylineExecutingInfoListener
      void removeWaylineExecutingInfoListener(WaylineExecutingInfoListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Remove a listener of waylines execution information.

      Supported since MSDK 5.0.0

      Input Parameters:
      WaylineExecutingInfoListener listenera listener of waylines execution information.
      method clearAllWaylineExecutingInfoListener
      void clearAllWaylineExecutingInfoListener()
      Package:dji.v5.manager.interfaces
      Description:

      Remove all listeners of waylines execution information.

      Supported since MSDK 5.0.0

      method pushKMZFileToAircraft
      void pushKMZFileToAircraft(String missionFilePath, CommonCallbacks.CompletionCallbackWithProgress<Double> callback)
      Package:dji.v5.manager.interfaces
      Description:

      Upload a waypoint mission.

    • The waypoint mission is defined in a KMZ file, KMZ file is defined according to the DJI standard WPML. The WPML is defined according to XML and KML. For more details, please see: DJI WPML.
    • Users can generate a KMZ file according to the template provided by DJI Pilot 2. You can also define custom waylines.wpml according to DJI WPML standard and upload it after compressing it into a KMZ file.
    • The newly uploaded KMZ file will override the previously uploaded KMZ file if they have the same mission KMZ file name.
    • You can call this interface multiple times to upload multiple waypoint mission KMZ files. You can set mission KMZ file name to select the mission to startstartMission or stopstopMission.
    • One KMZ file includes one waypoint mission. One waypoint mission can contain multiple waylines.


    • Supported since MSDK 5.0.0

      Input Parameters:
      String missionFilePathThe file path of the waypoint mission KMZ file.
      CommonCallbacks.CompletionCallbackWithProgress<Double> callbackreturn the execution result. Return the upload status of the KMZ file including uploading progress and errors.
      method startMission
      void startMission(String missionFileName, CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Start the waypoint mission.

      Supported since MSDK 5.0.0

      Input Parameters:
      String missionFileNameThe file name of the Mission to be executed.
      CommonCallbacks.CompletionCallback callbackreturn the execution result.
      method getAvailableWaylineIDs
      List<Integer> getAvailableWaylineIDs(String missionFileName)
      Package:dji.v5.manager.interfaces
      Description:

      Returns a list of wayline IDs available in the specified mission file. After obtaining this wayline ID list, you can select the wayline ID to be executed and pass it as a parameter to startMission to execute the waypoint mission.

      Supported since MSDK 5.1.0

      Input Parameters:
      String missionFileNameThe specified mission filename.
      Return:
      List<Integer>Get a list of wayline IDs available in the specified mission file.
      method startMission
      void startMission(String missionFileName, List<Integer> waylineIDs, CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Start executing the waypoint mission of the specified Wayline IDs list. A list of available wayline IDs can be obtained through getAvailableWaylineIDs, after obtaining this wayline IDs list, you can select the wayline ID to be executed as a parameter and pass it to this interface, the aircraft will execute the waypoint mission in sequence in the order of the wayline IDs list. If the wayline IDs list parameter is empty or the length of the wayline IDs list is 0, the aircraft will execute all waylines in the waypoint mission.

      Supported since MSDK 5.1.0

      Input Parameters:
      String missionFileNameThe file name of the Mission to be executed.
      List<Integer> waylineIDsThe wayline IDs list to be executed.
      CommonCallbacks.CompletionCallback callbacketurn the execution result.
      method pauseMission
      void pauseMission(CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Pause the waypoint mission.

      Supported since MSDK 5.0.0

      Input Parameters:
      CommonCallbacks.CompletionCallback callbackreturn the execution result.
      method resumeMission
      void resumeMission(CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Resume the waypoint mission from the pause point.

      Supported since MSDK 5.0.0

      Input Parameters:
      CommonCallbacks.CompletionCallback callbackreturn the execution result.
      method stopMission
      void stopMission(String missionFileName, CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Stop the waypoint mission.

      Supported since MSDK 5.0.0

      Input Parameters:
      String missionFileNameThe file name of the Mission to be stopped.
      CommonCallbacks.CompletionCallback callbackreturn the execution result.
      enum WaypointMissionExecuteState
      enum WaypointMissionExecuteState
      Package:dji.v5.manager.aircraft.waypoint3.model
      Description:

      Waypoint mission execution state.

      Supported since MSDK 5.0.0

      Enum Members:
      DISCONNECTEDAircraft disconnected.
      NOT_SUPPOREDThis aircraft does not support waypoint mission 3.0.
      READYThe ready state of a waypoint mission. You can upload a new KMZ file or execute an uploaded waypoint mission.
      UPLOADINGThe KMZ file is uploading.
      EXECUTING_PRE_PRARINGPreparing to execute the waypoint mission. After callingstartMission, the aircraft will start preparing for the waypoint mission.
      ENTER_WAYLINEEnter wayline flying, aircraft goes to the first waypoint of the first wayline.
      INTERRUPTEDThe waypoint mission is interrupted, which means the user has calledpauseMissionto pause the waypoint mission or the flight controller is abnormal.
      RECOVERINGResume the waypoint mission.
      FINISHEDThe waypoint mission is finished. It means the waypoint mission execution is completed or the user has calledstopMissionto stop the waypoint mission.
      Class Members: