public class

DJIWaypointMission

extends DJIMission
java.lang.Object
   ↳ dji.sdk.missionmanager.DJIMission
     ↳ dji.sdk.missionmanager.DJIWaypointMission

Class Overview

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 chan he 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 traveling 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.

Summary

Nested Classes
enum DJIWaypointMission.DJIWaypointMissionExecutionState Current waypoint mission state. 
enum DJIWaypointMission.DJIWaypointMissionFinishedAction Actions for when the waypoint mission has finished. 
enum DJIWaypointMission.DJIWaypointMissionFlightPathMode This enum reflects the path mode. 
enum DJIWaypointMission.DJIWaypointMissionGotoWaypointMode This enum will determine the goto point mode while the drone executes the flight. 
enum DJIWaypointMission.DJIWaypointMissionHeadingMode This enum will determine the direction while the drone executes the flight. 
class DJIWaypointMission.DJIWaypointMissionStatus This class provides the real-time status of an executing waypoint mission. 
Constants
int DJI_WAYPOINT_MISSION_MAXIMUM_WAYPOINT_COUNT
int DJI_WAYPOINT_MISSION_MINIMUM_WAYPOINT_COUNT
Fields
public float autoFlightSpeed The base automatic speed of the aircraft as it moves between waypoints with range [-15, 15] m/s.
public DJIWaypointMission.DJIWaypointMissionFinishedAction finishedAction Supported only by the Inspire 1 and Phantom 3 Series
The action the aircraft will take after completing the last waypoint.
public DJIWaypointMission.DJIWaypointMissionFlightPathMode flightPathMode Supported only by the Inspire 1 and Phantom 3 Series
What type of path is generated for the aircraft to follow.
public DJIWaypointMission.DJIWaypointMissionGotoWaypointMode goFirstWaypointMode Determines how the aircraft goes to the first waypoint from the current position.
public DJIWaypointMission.DJIWaypointMissionHeadingMode headingMode Supported only by the Inspire 1 and Phantom 3 Series
Heading of the aircraft as it moves between waypoints.
public float maxFlightSpeed While the aircraft is travelling between waypoints, you can offset its speed by using the throttle joystick on the remote controller.
public boolean needExitMissionOnRCSignalLost Determines whether to exit the mission when the RC signal is lost.
public boolean needRotateGimbalPitch Determines whether the aircraft can rotate the gimbal pitch when executing a waypoint mission.
public double pointOfInterestLatitude Used when 'headingMode' is 'DJIWaypointMissionHeadingMode.TowardPointOfInterest'.
public double pointOfInterestLongitude Property is used when 'headingMode' is 'DJIWaypointMissionHeadingMode.TowardPointOfInterest'.
public int repeatNum How many times the ground station task will be repeated, meaning that if mRepeatNum is 1, the aircraft will return to the first waypoint after finishing the task, and repeat the task once more.
public List<DJIWaypoint> waypointsList ArrayList of waypoints in the task.
Public Constructors
DJIWaypointMission()
Constructor.
Public Methods
boolean addWaypoint(DJIWaypoint waypoint)
Add a waypoint to the waypoint mission.
boolean addWaypoints(List<DJIWaypoint> waypoints)
Adds a list of waypoints to the waypoint mission.
DJIWaypoint getWaypointAtIndex(int index)
Gets a waypoint at an index in the mission waypoint array.
int getWaypointCount()
Number of waypoints in the waypoint mission.
boolean isPausable()
Indicates whether the mission can be paused.
void removeAllWaypoints()
Removes all waypoints from the waypoint mission.
void removeWaypoint(DJIWaypoint waypoint)
Removes the specific waypoint previously added.
void removeWaypointAtIndex(int index)
Removes the waypoint at an index.
static void setAutoFlightSpeed(float speed, DJICommonCallbacks.DJICompletionCallback callback)
Set the flight speed while the mission is executing automatically (without manual joystick speed input).
[Expand]
Inherited Methods
From class dji.sdk.missionmanager.DJIMission
From class java.lang.Object

Constants

public static final int DJI_WAYPOINT_MISSION_MAXIMUM_WAYPOINT_COUNT

Constant Value: 99 (0x00000063)

public static final int DJI_WAYPOINT_MISSION_MINIMUM_WAYPOINT_COUNT

Constant Value: 2 (0x00000002)

Fields

public float autoFlightSpeed

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`.

public DJIWaypointMission.DJIWaypointMissionFinishedAction finishedAction

Supported only by the Inspire 1 and Phantom 3 Series
The action the aircraft will take after completing the last waypoint. Default is none.

public DJIWaypointMission.DJIWaypointMissionFlightPathMode flightPathMode

Supported only by the Inspire 1 and Phantom 3 Series
What type of path is generated for the aircraft to follow. Path can either be generated by connecting adjacent waypoints with straight lines, or with smooth curves. Default is Normal.

See Also

public DJIWaypointMission.DJIWaypointMissionGotoWaypointMode goFirstWaypointMode

Determines how the aircraft goes to the first waypoint from the current position. The default is DJIWaypointMissionGotoWaypointSafely.

public DJIWaypointMission.DJIWaypointMissionHeadingMode headingMode

Supported only by the Inspire 1 and Phantom 3 Series
Heading of the aircraft as it moves between waypoints. Default is DJIWaypointMissionHeadingAuto.

See Also

public float maxFlightSpeed

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 subtrace 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.

public boolean needExitMissionOnRCSignalLost

Determines whether to exit the mission when the RC signal is lost. Default is false.

public boolean needRotateGimbalPitch

Determines whether the aircraft can rotate the gimbal pitch when executing a waypoint mission. If true, the aircraft will control the gimbal pitch rotation between waypoints using 'gimbalPitch' of DJIWaypoint.

public double pointOfInterestLatitude

Used when 'headingMode' is 'DJIWaypointMissionHeadingMode.TowardPointOfInterest'. The aircraft will always head to a point while executing mission. Default is NaN.

public double pointOfInterestLongitude

Property is used when 'headingMode' is 'DJIWaypointMissionHeadingMode.TowardPointOfInterest'. Aircraft will always head to a point while executing mission. Default is NaN.

public int repeatNum

How many times the ground station task will be repeated, meaning that if mRepeatNum is 1, the aircraft will return to the first waypoint after finishing the task, and repeat the task once more.
Default value is 0. Range is [0, 255].

See Also

public List<DJIWaypoint> waypointsList

ArrayList of waypoints in the task.

See Also

Public Constructors

public DJIWaypointMission ()

Constructor.

Public Methods

public boolean addWaypoint (DJIWaypoint waypoint)

Add a waypoint to the waypoint mission. The maximum number of waypoints should not larger than DJI_WAYPOINT_MISSION_MAXIMUM_WAYPOINT_COUNT. A waypoint will only be valid if the distance (in three dimensions) between two adjacent waypoints is in range [2,2000] meters.

Parameters
waypoint Waypoint to be added to the waypoint mission.

public boolean addWaypoints (List<DJIWaypoint> waypoints)

Adds a list of waypoints to the waypoint mission.

Parameters
waypoints Array of waypoints to be added to the waypoint mission.

public DJIWaypoint getWaypointAtIndex (int index)

Gets a waypoint at an index in the mission waypoint array.

Parameters
index Index of the waypoint wanting to be retrieved from the array of waypoints in the waypoint mission.
Returns
  • Waypoint of type DJIWaypoint if the index exists.

public int getWaypointCount ()

Number of waypoints in the waypoint mission.

public boolean isPausable ()

Indicates whether the mission can be paused.

Returns
  • true if mission can be paused, false otherwise.

public void removeAllWaypoints ()

Removes all waypoints from the waypoint mission.

public void removeWaypoint (DJIWaypoint waypoint)

Removes the specific waypoint previously added.

Parameters
waypoint Waypoint object to be removed.

public void removeWaypointAtIndex (int index)

Removes the waypoint at an index.

Parameters
index Index of waypoint to be removed from the waypoint mission from the array of all waypoints.

public static void setAutoFlightSpeed (float speed, DJICommonCallbacks.DJICompletionCallback callback)

Set the flight speed while the mission is executing automatically (without manual joystick speed input). This is the only property or method in this class that can communicate with the aircraft during a mission. All other properties and methods are used offline to prepare the mission which is then uploaded to the aircraft.

Parameters
speed Auto flight speed to be set. The absolute value of the auto flight speed should be less than or equal to the maxFlightSpeed. It's range is then [-maxFlightSpeed, maxFlightSpeed] m/s.
callback The execution callback with the execution result returned.