DJI Mobile SDK Documentation

      class Builder

      static final class Builder
      Package:dji.common.mission.waypointv2
      Description:

      Default constructor of DJIWaypointV2.

      Class Members:
      Set Coordinate
      method
      method setCoordinate
      Builder setCoordinate(@NonNull LocationCoordinate2D coordinate)
      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.

      Input Parameters:
      @NonNull LocationCoordinate2D coordinateLocationCoordinate2D object to set.
      Return:
      BuilderThe build of Builder.
      Set Altitude
      method
      method setAltitude
      Builder setAltitude(double altitude)
      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.

      Input Parameters:
      double altitudeDouble type value to set.
      Return:
      BuilderThe build of Builder.
      Set Point of Interest
      method
      method setPointOfInterest
      Builder setPointOfInterest(LocationCoordinate2D pointOfInterest)
      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".

      Input Parameters:
      LocationCoordinate2D pointOfInterestThe object of LocationCoordinate2D.
      Return:
      BuilderThe build of Builder.
      Set Point of Interest Altitude
      method
      method setPointOfInterestAltitude
      Builder setPointOfInterestAltitude(float pointOfInterestAltitude)
      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.

      Input Parameters:
      float pointOfInterestAltitudeThe float value to set.
      Return:
      BuilderThe build of Builder.
      Set Flight Path Mode
      method
      method setFlightPathMode
      Builder setFlightPathMode(WaypointV2FlightPathMode flightPathMode)
      Package:dji.common.mission.waypointv2
      Description:

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

      Input Parameters:
      WaypointV2FlightPathMode flightPathModeAn enum value of WaypointV2FlightPathMode.
      Return:
      BuilderThe build of Builder.
      Set Heading Mode
      method
      method setHeadingMode
      Builder setHeadingMode(WaypointV2HeadingMode headingMode)
      Package:dji.common.mission.waypointv2
      Description:

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

      Input Parameters:
      WaypointV2HeadingMode headingModeAn enum value of WaypointV2HeadingMode.
      Return:
      BuilderThe build of Builder.
      Set Heading
      method
      method setHeading
      Builder setHeading(float heading)
      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 headingMode is set to DJIWaypointV2_DJIWaypointV2HeadingMode_UsingWaypointHeading. A heading has a range of [-180, 180] degrees, where 0 represents True North.

      Input Parameters:
      float headingA float type value of heading.
      Return:
      BuilderThe build of Builder.
      Set Turn Mode
      method
      method setTurnMode
      Builder setTurnMode(WaypointV2TurnMode turnMode)
      Package:dji.common.mission.waypointv2
      Description:

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

      Input Parameters:
      WaypointV2TurnMode turnModeAn enum value of WaypointV2TurnMode.
      Return:
      BuilderThe build of Builder.
      Set Using Waypoint Auto Flight Speed
      method
      method setUsingWaypointAutoFlightSpeed
      Builder setUsingWaypointAutoFlightSpeed(boolean usingWaypointAutoFlightSpeed)
      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.

      Input Parameters:
      boolean usingWaypointAutoFlightSpeedA boolean type value to set.
      Return:
      BuilderThe build of Builder.
      Set Using Waypoint Max Flight Speed
      method
      method setUsingWaypointMaxFlightSpeed
      Builder setUsingWaypointMaxFlightSpeed(boolean usingWaypointMaxFlightSpeed)
      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.

      Input Parameters:
      boolean usingWaypointMaxFlightSpeedA boolean type value to set.
      Return:
      BuilderThe build of Builder.
      Set Auto Flight Speed
      method
      method setAutoFlightSpeed
      Builder setAutoFlightSpeed(float autoFlightSpeed)
      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 "autoFlightSpeed >0": Actual speed is "autoFlightSpeed" + Joystick Speed (with combined max of "maxFlightSpeed") If "autoFlightSpeed =0": Actual speed is controlled only by the remote controller joystick. If "autoFlightSpeed <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 "autoFlightSpeed".

      Input Parameters:
      float autoFlightSpeedA float type value to set.
      Return:
      BuilderThe build of Builder.
      Set Max Flight Speed
      method
      method setMaxFlightSpeed
      Builder setMaxFlightSpeed(@FloatRange(from = 2, to = 15) float maxFlightSpeed)
      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. "maxFlightSpeed" 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, maxFlightSpeed]"" 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. "maxFlightSpeed" has a range of [2,15] m/s.

      Input Parameters:
      @FloatRange(from = 2, to = 15) float maxFlightSpeedA float type value to set.
      Return:
      BuilderThe build of Builder.
      Set Damping Distance
      method
      method setDampingDistance
      Builder setDampingDistance(float dampingDistance)
      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.

      Input Parameters:
      float dampingDistanceA float type value of damping distance.
      Return:
      BuilderThe build of Builder.
      Build
      method
      method build
      WaypointV2 build()
      Package:dji.common.mission.waypointv2
      Description:

      Build the object into a WaypointV2 object.

      Return:
      WaypointV2The build of Builder.