DJI Mobile SDK Documentation

      class WaypointV2

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

      The class represents a target point in the waypoint mission. For a waypoint mission, a flight route consists of multiple WaypointV2 objects.

      Class Members:
      Coordinate
      method
      method getCoordinate
      LocationCoordinate2D getCoordinate()
      Package:dji.common.mission.waypointv2
      Description:

      Waypoint coordinate latitude and longitude in degrees.

      Return:
      LocationCoordinate2DAn object of LocationCoordinate2D.
      Altitude
      method
      method getAltitude
      double getAltitude()
      Package:dji.common.mission.waypointv2
      Description:

      Altitude of the aircraft in meters when it reaches waypoint. The altitude of the aircraft is relative to the ground at the take-off location, has a range of [-200,500], and should not be larger than the aircraft's maximum altitude. If two adjacent waypoints have different altitudes, the altitude will gradually change as the aircraft flies between waypoints.

      Return:
      doubleA double type value of the aircraft altitude.
      Point of Interest
      method
      method getPointOfInterest
      LocationCoordinate2D getPointOfInterest()
      Package:dji.common.mission.waypointv2
      Description:

      Property is used when getHeadingMode is TOWARD_POINT_OF_INTEREST. Aircraft will always be heading to point while executing mission. Default is "kCLLocationCoordinate2DInvalid".

      Return:
      LocationCoordinate2DAn object of LocationCoordinate2D.
      Point of Interest Altitude
      method
      method getPointOfInterestAltitude
      double getPointOfInterestAltitude()
      Package:dji.common.mission.waypointv2
      Description:

      Property is used when getHeadingMode is TOWARD_POINT_OF_INTEREST. The altitude of the aircraft is relative to the ground at the take-off location, has a range of [-200,500], and should not be larger than the aircraft's maximum altitude.

      Return:
      doubleThe value of the point of interest altitude.
      Flight Path Mode
      method
      method getFlightPathMode
      WaypointV2FlightPathMode getFlightPathMode()
      Package:dji.common.mission.waypointv2
      Description:

      Flight path mode waypoint of the aircraft as it moves between waypoints. Default is GOTO_POINT_CURVE_AND_STOP.

      Return:
      WaypointV2FlightPathModeAn enum value of WaypointV2FlightPathMode.
      Heading Mode
      method
      method getHeadingMode
      WaypointV2HeadingMode getHeadingMode()
      Package:dji.common.mission.waypointv2
      Description:

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

      Return:
      WaypointV2HeadingModeAn enum value of WaypointV2HeadingMode.
      Heading
      method
      method getHeading
      float getHeading()
      Package:dji.common.mission.waypointv2
      Description:

      The heading to which the aircraft will rotate by the time it reaches the waypoint. The aircraft heading will gradually change between two waypoints with different headings if the waypoint mission's WaypointV2HeadingMode is set to WAYPOINT_CUSTOM. A heading has a range of [-180, 180] degrees, where 0 represents True North.

      Return:
      floatThe float type value of aircraft heading.
      Turn Mode
      method
      method getTurnMode
      WaypointV2TurnMode getTurnMode()
      Package:dji.common.mission.waypointv2
      Description:

      Determines whether the aircraft will turn clockwise or anticlockwise when changing its heading.

      Return:
      WaypointV2TurnModeAn enum value of WaypointV2TurnMode.
      Use Waypoint Max Flight Speed
      method
      method isUsingWaypointMaxFlightSpeed
      boolean isUsingWaypointMaxFlightSpeed()
      Package:dji.common.mission.waypointv2
      Description:

      Determines whether the aircraft using waypoint max flight speed executing waypoint mission. If true, the aircraft will use waypoint max flight speed between two waypoints. Otherwise, will use getMaxFlightSpeed as max flight speed.

      Return:
      booleanA boolean value to check if the aircraft use waypoint max flight speed.
      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:
      floatThe float value of max flight speed.
      Use Waypoint Auto Flight Speed
      method
      method isUsingWaypointAutoFlightSpeed
      boolean isUsingWaypointAutoFlightSpeed()
      Package:dji.common.mission.waypointv2
      Description:

      Determines whether the aircraft using waypoint auto flight speed executing waypoint mission. If true, the aircraft will use waypoint auto flight speed between two waypoints. Otherwise, will use getAutoFlightSpeed as max flight speed.

      Return:
      booleanA boolean value to check if the aircraft use waypoint auto 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. In flight controller firmware 3.2.10.0 or above, different speeds between individual waypoints can also be set in waypoint objects which will overwrite getAutoFlightSpeed.

      Return:
      floatThe float value of auto flight speed.
      Damping Distance
      method
      method getDampingDistance
      float getDampingDistance()
      Package:dji.common.mission.waypointv2
      Description:

      Corner radius of the waypoint. When the flight path mode is COORDINATE_TURN the flight path near a waypoint will be acurve (rounded corner) with radius [0.2,1000]. When there is a corner radius, the aircraft will never pass the waypoint. By default, the radius is 0.2 m. If the corner is made of three adjacent waypoints (Short for A,B,C). Then the radius of A(short for Ra) plus radius of B(short for Rb) must be smaller than the distance between A and B. The radius of the first and the last waypoint in a mission does not affect the flight path and it should keep the default value (0.2m). When the flight path mode is GOTO_FIRST_POINT_ALONG_STRAIGHT_LINE When aircraft reaches the first waypoint, The flight path will be a straight flight with this distance. When the flight path mode is STRAIGHT_OUT The flight path will be a straight flight with this distance before until last waypoint.

      Return:
      floatA float value of Damping Distance.
      Constructor
      class
      enum WaypointV2FlightPathMode
      enum WaypointV2FlightPathMode
      Package:dji.common.mission.waypointv2
      Description:

      Waypoint flight path mode.

      Enum Members:
      CURVATURE_CONTINUOUS_PASSEDIn the mission, the aircraft will go to the waypoint along a curve and fly past the waypoint.
      GOTO_POINT_CURVE_AND_STOPIn the mission, the aircraft will go to the waypoint along a curve and stop at the waypoint.
      GOTO_POINT_STRAIGHT_LINE_AND_STOPIn the mission, the aircraft will go to the waypoint along a straight line and stop at the waypoint.
      COORDINATE_TURNIn the mission, the aircraft will fly from the previous waypoint to the next waypoint along a smooth curve without stopping at this waypoint. the next in a curved motion, adhering to the getDampingDistance, which is set in WaypointV2.
      GOTO_FIRST_POINT_ALONG_STRAIGHT_LINEIn the mission, the aircraft will go to the first waypoint along a straight line. This is only valid for the first waypoint.
      STRAIGHT_OUTStraight exit the Last waypoint, Only valid for last waypoint.
      UNKNOWNUnknown.
      Class Members:
      enum WaypointV2HeadingMode
      enum WaypointV2HeadingMode
      Package:dji.common.mission.waypointv2
      Description:

      Represents current aircraft's heading mode on current waypoint.

      Enum Members:
      AUTOAircraft's heading will always be in the direction of flight.
      FIXEDAircraft'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.
      MANUALThe aircraft's heading in the mission can be controlled by the remote controller.
      WAYPOINT_CUSTOMIn the mission, the aircraft's heading will change dynamically and adapt to the heading set at the next waypoint. See getHeading to preset the heading.
      TOWARD_POINT_OF_INTERESTAfter the first waypoint has been reached, aircraft heading will always toward to the point of interest. Using getPointOfInterest and getPointOfInterestAltitude to set the coordinate of point of interest.
      UNKNOWNUnknown.
      Class Members:
      enum WaypointV2TurnMode
      enum WaypointV2TurnMode
      Package:dji.common.mission.waypointv2
      Description:

      The direction when the aircraft changes its heading to adapt to the heading at the waypoint.

      Enum Members:
      CLOCKWISEThe aircraft's heading rotates clockwise.
      COUNTER_CLOCKWISEThe aircraft's heading rotates counterclockwise.
      UNKNOWNChanges the heading of the aircraft by rotating the aircraft anti-clockwise.
      Class Members: