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. For waypoint editing functions, please refer to: IWPMZManager.

      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 addWaypointActionListener
      void addWaypointActionListener(WaypointActionListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Add a listener of waypoint action execution. Including waypoint action start execution information and finish execution information.

      Supported since MSDK 5.6.0

      Input Parameters:
      WaypointActionListener listenera listener of waypoint action execution.
      method removeWaypointActionListener
      void removeWaypointActionListener(WaypointActionListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Remove a listener of waypoint action execution.

      Supported since MSDK 5.6.0

      Input Parameters:
      WaypointActionListener listenera listener of waypoint action execution.
      method clearAllWaypointActionListener
      void clearAllWaypointActionListener()
      Package:dji.v5.manager.interfaces
      Description:

      Remove all listeners of waypoint action execution.

      Supported since MSDK 5.6.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.
      Note: M300 RTK and M350 RTK only support 1 wayline ID.

      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.
      Note: M300 RTK and M350 RTK only support 1 wayline ID.

      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 callbackReturn the execution result.
      method queryBreakPointInfoFromAircraft
      void queryBreakPointInfoFromAircraft(String missionFileName ,CommonCallbacks.CompletionCallbackWithParam<BreakPointInfo> callback)
      Package:dji.v5.manager.interfaces
      Description:

      Query the breakpoint information when the waypoint mission is paused. The breakpoint information includes the position of the aircraft where the waypoint mission is paused. After the breakpoint information is obtained, it can be passed as a parameter to startMission or resumeMission to execute the waypoint mission. The aircraft will fly to the incoming breakpoint position, and then execute the waypoint mission in sequence according to the waypoint order.
      Note:

      1. The M300 RTK and M350 RTK do not support the breakpoint function.
      2. The breakpoint information can only be queried after calling the pause waypoint mission interface pauseMission.

        Supported since MSDK 5.6.0
      Input Parameters:
      String missionFileNameThe file name of the Mission to be executed.
      CommonCallbacks.CompletionCallbackWithParam<BreakPointInfo> callbackReturn the execution result.
      method startMission
      void startMission(String missionFileName , BreakPointInfo breakPointInfo , CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Start executing the waypoint mission at the specified breakpoint. You can use queryBreakPointInfoFromAircraft to query the breakpoint information when the last waypoint mission was suspended. After the breakpoint information is obtained, it can be passed as a parameter to this interface, and the aircraft will fly to the incoming breakpoint position, and then execute waypoint mission in sequence according to the waypoint order. If you don't want to start the waypoint mission from the position of the aircraft when it was paused last time, you can also construct the breakpoint information by yourself and set any waypoint position to start the waypoint mission.
      Note:

      1. The M300 RTK and M350 RTK do not support the breakpoint function.
      2. After suspending the waypoint mission, this interface can be called to re-execute the waypoint mission only after exiting the waypoint mission. Common application scenarios include: return and land after the flight mission is completed or the aircraft is powered on again.
      3. If you want to start flying from the specified breakpoint without exiting the waypoint mission. You can call resumeMission to resume execution of the waypoint mission.

        Supported since MSDK 5.6.0
      Input Parameters:
      String missionFileNameThe file name of the Mission to be executed.
      BreakPointInfo breakPointInfoBreakpoint information of the Mission to be executed.
      CommonCallbacks.CompletionCallback callbackReturn 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 resumeMission
      void resumeMission(BreakPointInfo breakPointInfo, CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Resume execution of the waypoint mission from the specified breakpoint. You can query the breakpoint information when the waypoint mission is paused through queryBreakPointInfoFromAircraft. After the breakpoint information is obtained, it can be passed as a parameter to this interface, and the aircraft will fly to the incoming breakpoint position, and then execute waypoint mission in sequence according to the waypoint order. If you don't want to start the waypoint mission from the position of the aircraft when it was paused last time, you can also construct the breakpoint information by yourself and set any waypoint position to start the waypoint mission.
      Note:
      The M300 RTK and M350 RTK do not support the breakpoint function.


      Supported since MSDK 5.6.0

      Input Parameters:
      BreakPointInfo breakPointInfoThe breakpoint information needed to resume execution.
      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:
      IDLEInitialize state.
      NOT_SUPPORTEDThis 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.
      PREPARINGPreparing 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 specified wayline.
      EXECUTINGWaypoint mission is executing.
      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: