DJI Mobile SDK Documentation

      class WaypointMission

      @EXClassNullAway
      final class WaypointMission
      Package:dji.common.mission.waypoint
      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 not supported by Mavic Pro when using WiFi connection. It is not supported by Spark.

      Class Members:
      Make Mission
      class
      method checkParameters
      @Nullable
      DJIError checkParameters()
      Package:dji.common.mission.waypoint
      Description:

      Checks if the configuration for the mission is valid before loading it into WaypointMissionOperator.

      Return:
      DJIErrorError found when checking parameters of the waypoint. null if all the parameters are valid.
      Waypoint Information
      method
      method getWaypointCount
      int getWaypointCount()
      Package:dji.common.mission.waypoint
      Description:

      Number of waypoints in the waypoint mission.

      Return:
      intWaypoint count.
      method getMissionID
      int getMissionID()
      Package:dji.common.mission.waypoint
      Description:

      Get the mission id.

      Return:
      intMission ID.
      method getWaypointList
      @Size(max = MAX_WAYPOINT_COUNT, min = MIN_WAYPOINT_COUNT)
      List<Waypoint> getWaypointList()
      Package:dji.common.mission.waypoint
      Description:

      Returns an list of all waypoints in the mission.

      Return:
      List<Waypoint>A List of Waypoint instances contained in the mission.
      Flight Speed
      method
      method getMaxFlightSpeed
      float getMaxFlightSpeed()
      Package:dji.common.mission.waypoint
      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:
      floatFlight speed in m/s
      method getAutoFlightSpeed
      float getAutoFlightSpeed()
      Package:dji.common.mission.waypoint
      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:
      floatFlight speed in m/s
      Start Mission behavior
      method
      method getGotoFirstWaypointMode
      WaypointMissionGotoWaypointMode getGotoFirstWaypointMode()
      Package:dji.common.mission.waypoint
      Description:

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

      Return:
      WaypointMissionGotoWaypointModeThe behavior of the aircraft at the begining of the mission
      End Mission Behavior
      method
      method getFinishedAction
      WaypointMissionFinishedAction getFinishedAction()
      Package:dji.common.mission.waypoint
      Description:

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

      Return:
      WaypointMissionFinishedActionThe action to execute when the waypoint mission finishes
      Aircraft Heading
      method
      method getHeadingMode
      WaypointMissionHeadingMode getHeadingMode()
      Package:dji.common.mission.waypoint
      Description:

      Heading of the aircraft as it moves between waypoints. Default is AUTO.

      Return:
      WaypointMissionHeadingModeHeading mode.
      method getPointOfInterest
      LocationCoordinate2D getPointOfInterest()
      Package:dji.common.mission.waypoint
      Description:

      Aircraft heading will be fixed to the point of interest location during the waypoint mission. Used when getHeadingMode is TOWARD_POINT_OF_INTEREST.

      Return:
      LocationCoordinate2DPoint of interest location.
      Flight Path
      method
      method getFlightPathMode
      WaypointMissionFlightPathMode getFlightPathMode()
      Package:dji.common.mission.waypoint
      Description:

      The path the aircraft follows between waypoints. The aircraft can either fly directly between waypoints in a straight line, or turn near a waypoint in the curve where the waypoint location defines a part of the curve.

      Return:
      WaypointMissionFlightPathModeThe flight path mode.
      method isExitMissionOnRCSignalLostEnabled
      boolean isExitMissionOnRCSignalLostEnabled()
      Package:dji.common.mission.waypoint
      Description:

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

      Return:
      booleantrue if mission should stop when connection is lost.
      method isGimbalPitchRotationEnabled
      boolean isGimbalPitchRotationEnabled()
      Package:dji.common.mission.waypoint
      Description:

      true if the gimbal pitch rotation can be controlled during the waypoint mission. When true, gimbalPitch in Waypoint is used to control gimbal pitch.

      Return:
      booleantrue if gimbal pitch can be controlled.
      Repeat Mission
      method
      method getRepeatTimes
      int getRepeatTimes()
      Package:dji.common.mission.waypoint
      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:
      intNumber of times to repeat mission
      enum WaypointMissionFinishedAction
      @EXClassNullAway
      enum WaypointMissionFinishedAction
      Package:dji.common.mission.waypoint
      Description:

      Actions taken when the waypoint mission has finished.

      Enum Members:
      NO_ACTIONNo further action will be taken on completion of mission. At this point, the aircraft can be controlled by the remote controller.
      GO_HOMEThe aircraft will go home when the mission is complete. If the aircraft is more than 20m away from the home point it will go home and land. Otherwise, it will land directly at the current location.
      AUTO_LANDThe aircraft will land automatically at the last waypoint.
      GO_FIRST_WAYPOINTThe aircraft will go back to its first waypoint and hover in position.
      CONTINUE_UNTIL_ENDWhen the aircraft reaches its final waypoint, it will hover without ending the mission. The joystick can still be used to pull the aircraft back along its previous waypoints. The only way this mission can end is if stopMission is called.
      Class Members:
      enum WaypointMissionHeadingMode
      @EXClassNullAway
      enum WaypointMissionHeadingMode
      Package:dji.common.mission.waypoint
      Description:

      Current waypoint mission heading mode.

      Enum Members:
      AUTOAircraft's heading will always be in the direction of flight.
      USING_INITIAL_DIRECTIONAircraft's heading will be set to the heading when reaching the first waypoint. Before reaching the first waypoint, the aircraft's heading can be controlled by the remote controller. When the aircraft reaches the first waypoint, its heading will be fixed.
      CONTROL_BY_REMOTE_CONTROLLERAircraft's heading will be controlled by the remote controller.
      USING_WAYPOINT_HEADINGAircraft's heading will be gradually set to the next waypoint heading while travelling between two adjacent waypoints.
      TOWARD_POINT_OF_INTERESTAircraft's heading will always toward point of interest.
      Class Members:
      enum WaypointMissionFlightPathMode
      @EXClassNullAway
      enum WaypointMissionFlightPathMode
      Package:dji.common.mission.waypoint
      Description:

      Waypoint mission flight path mode.

      Enum Members:
      NORMALThe flight path will be normal and the aircraft will move from one waypoint to the next in straight lines.
      CURVEDThe flight path will be curved and the aircraft will move from one waypoint to the next in a curved motion, adhering to the cornerRadiusInMeters, which is set in Waypoint.
      Class Members:
      enum WaypointMissionGotoWaypointMode
      @EXClassNullAway
      enum WaypointMissionGotoWaypointMode
      Package:dji.common.mission.waypoint
      Description:

      This enum will determine the goto point mode while the drone executes the flight.

      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:
      Coordinate
      method
      method getCoordinate
      LocationCoordinate2D getCoordinate()
      Package:dji.common.mission.waypoint
      Description:

      The aircraft's coordinate when the mission is interrupted.

      Return:
      LocationCoordinate2DAn object of LocationCoordinate2D.
      altitude
      method
      method getAltitude
      float getAltitude()
      Package:dji.common.mission.waypoint
      Description:

      The aircraft's altitude when the mission is interrupted. This value represents the absolute height.

      Return:
      floatA float value of the waypoint altitude.
      index
      method
      method getIndex
      int getIndex()
      Package:dji.common.mission.waypoint
      Description:

      The waypoint index that aircraft latest reached when the mission is interrupted.

      Return:
      intAn int value of the waypoint index.
      method getMissionID
      int getMissionID()
      Package:dji.common.mission.waypoint
      Description:

      MissionID of interrupted mission.

      Return:
      intAn int value of the MissionID.
      property dji.common.model.LocationCoordinate2D
      import dji.common.model.LocationCoordinate2D
      Package:dji.common.mission.waypoint
      Description:

      The class provides information of the latest interrupted waypoint mission.

      enum WaypointMissionExecuteState
      @EXClassNullAway
      enum WaypointMissionExecuteState
      Package:dji.common.mission.waypoint
      Description:

      Current waypoint mission state.

      Enum Members:
      INITIALIZINGWaypoint mission is initializing, which means the mission has started and the aircraft is going to the first waypoint.
      MOVINGAircraft is currently moving toward the mission's next waypoint. This happens when the WaypointMissionFlightPathMode is set to NORMAL.
      CURVE_MODE_MOVINGAircraft is currently moving. This happens when the WaypointMissionFlightPathMode is set to CURVED.
      CURVE_MODE_TURNINGAircraft is currently turning. This happens when the WaypointMissionFlightPathMode is set to CURVED.
      BEGIN_ACTIONAircraft has reached a waypoint, has rotated to the new heading and is now processing actions. This state will be called before the waypoint actions starts executing and will occur for each waypoint action.
      DOING_ACTIONAircraft is at a waypoint and is executing an action.
      FINISHED_ACTIONAircraft is at a waypoint and has finished executing the current waypoint action. This state occurs once for each waypoint action.
      RETURN_TO_FIRST_WAYPOINTAircraft has returned to the first waypoint. This happens when the getFinishedAction is set to RETURN_TO_FIRST_WAYPOINT.
      PAUSEDThe mission is currently paused by the user.
      Class Members: