DJI Mobile SDK Documentation

      class WaypointV2Mission

      class WaypointV2Mission
      Package:dji.common.mission.waypointv2
      Description:

      In the waypoint mission, the aircraft will travel between waypoints, execute actions at waypoints, and adjust heading and altitude between waypoints. Waypoints are physical locations to which the aircraft will fly. Creating a series of waypoints, in effect, will program a flight route for the aircraft to follow. Actions can also be added to waypoints, which will be carried out when the aircraft reaches the waypoint. The aircraft travels between waypoints automatically at a base speed. However, the user can change the speed by using the pitch joystick. If the stick is pushed up, the speed will increase. If the stick is pushed down, the speed will slow down. The stick can be pushed down to stop the aircraft and further pushed to start making the aircraft travel back along the path it came. When the aircraft is travelling through waypoints in the reverse order, it will not execute waypoint actions at each waypoint. If the stick is released, the aircraft will again travel through the waypoints in the original order, and continue to execute waypoint actions (even if executed previously). If the aircraft is pulled back along the waypoint mission all the way to the first waypoint, then it will hover in place until the stick is released enough for it to again progress through the mission from start to finish. It is only supported by MATRICE_300_RTK.

      Class Members:
      Mission Download
      method
      method isComplete
      boolean isComplete()
      Package:dji.common.mission.waypointv2
      Description:

      When downloading a waypoint mission, the number of waypoints in getWaypointList will be less than getWaypointCount until the download is complete. This property is true when all the information in the waypoint mission is downloaded, and complete in this object.

      Return:
      booleanA boolean value.
      Mission ID
      method
      method getMissionID
      long getMissionID()
      Package:dji.common.mission.waypointv2
      Description:

      The Mission ID.

      Return:
      longA long value of Mission ID.
      Waypoint Count
      method
      method getWaypointCount
      int getWaypointCount()
      Package:dji.common.mission.waypointv2
      Description:

      Number of waypoints in the waypoint mission. Note there are some cases when the waypoint count will be different to the waypoint array length from getWaypointList. This is usually the case when the waypoint mission is still being downloaded from the aircraft and the mission object hasn't existed previously (e.g. when the mobile device is connected to an aircraft with a previously uploaded mission). In these cases, isComplete will return true.

      Return:
      intAn int value of waypoint count.
      Max Flight Speed
      method
      method getMaxFlightSpeed
      float getMaxFlightSpeed()
      Package:dji.common.mission.waypointv2
      Description:

      While the aircraft is travelling between waypoints, you can offset its speed by using the throttle joystick on the remote controller. getMaxFlightSpeed is this offset when the joystick is pushed to maximum deflection. For example, If maxFlightSpeed is 10 m/s, then pushing the throttle joystick all the way up will add 10 m/s to the aircraft speed, while pushing down will subtract 10 m/s from the aircraft speed. If the remote controller stick is not at maximum deflection, then the offset speed will be interpolated between [0, getMaxFlightSpeed] with a resolution of 1000 steps. If the offset speed is negative, then the aircraft will fly backwards to previous waypoints. When it reaches the first waypoint, it will then hover in place until a positive speed is applied. getMaxFlightSpeed has a range of [2,15] m/s.

      Return:
      floatA float value of max flight speed.
      Auto Flight Speed
      method
      method getAutoFlightSpeed
      float getAutoFlightSpeed()
      Package:dji.common.mission.waypointv2
      Description:

      The base automatic speed of the aircraft as it moves between waypoints with range [-15, 15] m/s. The aircraft's actual speed is a combination of the base automatic speed, and the speed control given by the throttle joystick on the remote controller. If getAutoFlightSpeed >0: Actual speed is getAutoFlightSpeed + Joystick Speed (with combined max of getMaxFlightSpeed) If getAutoFlightSpeed =0: Actual speed is controlled only by the remote controller joystick. If getAutoFlightSpeed <0 and the aircraft is at the first waypoint, the aircraft will hover in place until the speed is made positive by the remote controller joystick.

      Return:
      floatA float value of auto flight speed.
      End Mission Behavior
      method
      method getFinishedAction
      MissionFinishedAction getFinishedAction()
      Package:dji.common.mission.waypointv2
      Description:

      Action the aircraft will take when the waypoint mission is complete.

      Return:
      MissionFinishedActionA MissionFinishedAction enum value.
      Start Mission behavior
      method
      method getGotoFirstWaypointMode
      MissionGotoWaypointMode getGotoFirstWaypointMode()
      Package:dji.common.mission.waypointv2
      Description:

      Defines how the aircraft will go to the first waypoint from its current position. Default is SAFELY.

      Return:
      MissionGotoWaypointModeA MissionGotoWaypointMode enum value.
      Exit Mission On RC Signal Lost
      method
      method isExitMissionOnRCSignalLostEnabled
      boolean isExitMissionOnRCSignalLostEnabled()
      Package:dji.common.mission.waypointv2
      Description:

      Determines whether the mission should stop when connection between the aircraft and remote controller is lost. Default is false.

      Return:
      booleanA boolean value.
      Repeat Times
      method
      method getRepeatTimes
      int getRepeatTimes()
      Package:dji.common.mission.waypointv2
      Description:

      Mission execution can be repeated more than once. A value of 0 means the mission only executes once, and does not repeat. A value of 1 means the mission will execute a total of two times.

      Return:
      intAn int value of mission repeart times.
      Get Waypoint At Index
      method
      method getWaypointAtIndex
      @Nullable WaypointV2 getWaypointAtIndex(int index)
      Package:dji.common.mission.waypointv2
      Description:

      Gets the waypoint at the specified index in the mission waypoint array.

      Input Parameters:
      int indexIndex of the waypoint to be retrieved.
      Return:
      @Nullable WaypointV2The WaypointV2 at the specified index.
      Get All Waypoints
      method
      method getWaypointList
      List<WaypointV2> getWaypointList()
      Package:dji.common.mission.waypointv2
      Description:

      Returns an array of all waypoints in the mission.

      Return:
      List<WaypointV2>An array of WaypointV2 instances contained in the mission.
      Make Mission
      class
      enum MissionGotoWaypointMode
      enum MissionGotoWaypointMode
      Package:dji.common.mission.waypointv2
      Description:

      Possible flight mode to executes the mission.

      Enum Members:
      SAFELYGo to the waypoint safely. The aircraft will rise to the same altitude of the waypoint if the current altitude is lower then the waypoint altitude. It then goes to the waypoint coordinate from the current altitude, and proceeds to the altitude of the waypoint.
      POINT_TO_POINTGo to the waypoint from the current aircraft point to the waypoint directly.
      Class Members:
      enum WaypointV2MissionExecuteState
      enum WaypointV2MissionExecuteState
      Package:dji.common.mission.waypointv2
      Description:

      Current waypoint mission executing state.

      Enum Members:
      INITIALIZINGWaypoint mission is initializing, which means the mission has started.
      GO_TO_FIRST_WAYPOINTAircraft is currently is going to the first waypoint.
      MOVINGAircraft is currently moving.
      INTERRUPTEDAircraft is currently interrupted by user.
      FINISHEDThe aircraft finished the waypoint mission and is leaving from the last waypoint.
      GO_HOMEAircraft has returned to the home point. This happens when the setFinishedAction is set to GO_HOME.
      LANDINGAircraft has been landing. This happens when the setFinishedAction is set to AUTO_LAND.
      RETURN_TO_FIRST_WAYPOINTAircraft has returned to the first waypoint. This happens when the setFinishedAction is set to GO_FIRST_WAYPOINT.
      UNKNOWNUnknown execution state.
      Class Members: