DJIWaypointMission

@interface DJIWaypointMission : DJIMission

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

  • Number of waypoints in the waypoint mission.

    Declaration

    Objective-C

    @property (readonly, nonatomic) int waypointCount;
  • While the aircraft is traveling 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.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) float maxFlightSpeed;
  • 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.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) float autoFlightSpeed;
  • Action the aircraft will take when the waypoint mission is complete.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        DJIWaypointMissionFinishedAction finishedAction;
  • Heading of the aircraft as it moves between waypoints. Default is DJIWaypointMissionHeadingAuto.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        DJIWaypointMissionHeadingMode headingMode;
  • Flight path mode of the waypoint mission.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        DJIWaypointMissionFlightPathMode flightPathMode;
  • Determines the aricraft how to go to first waypoint frome current position. Default is DJIWaypointMissionGotoWaypointSafely.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        DJIWaypointMissionGotoWaypointMode gotoFirstWaypointMode;
  • Determines whether exit mission when RC signal lost. Default is NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL exitMissionOnRCSignalLost;
  • Property is used when headingMode is DJIWaypointMissionHeadingTowardPointOfInterest. Aircraft will always be heading to point while executing mission. Default is kCLLocationCoordinate2DInvalid.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CLLocationCoordinate2D pointOfInterest;
  • Determines whether the aircraft can rotate gimbal pitch when executing waypoint mission. If YES, the aircraft will control gimbal pitch rotation between waypoints using the gimbalPitch of the DJIWaypoint.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL rotateGimbalPitch;
  • Repeat times for mission execution. Default is 1.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) int repeatTimes;
  • Add a waypoint to the waypoint mission. The number of waypoints should be in the range [DJIWaypointMissionMinimumWaypointCount, DJIWaypointMissionMaximumWaypointCount]. A waypoint will only be valid if the distance (in three dimensions) between two adjacent waypoints is in range [0.5,2000] meters.

    Declaration

    Objective-C

    - (void)addWaypoint:(DJIWaypoint *_Nonnull)waypoint;

    Parameters

    Waypoint

    to be added to the waypoint mission.

  • Adds an array of waypoints to the waypoint mission.

    Declaration

    Objective-C

    - (void)addWaypoints:(NSArray *_Nonnull)waypoints;

    Parameters

    waypoints

    of waypoints to be added to the waypoint mission.

  • Removes a specific waypoint that was previously added.

    Declaration

    Objective-C

    - (void)removeWaypoint:(DJIWaypoint *_Nonnull)waypoint;

    Parameters

    waypoint

    Waypoint object to be removed.

  • Removes the waypoint at an index.

    Declaration

    Objective-C

    - (void)removeWaypointAtIndex:(int)index;

    Parameters

    index

    Index of the waypoint to be removed from the waypoint mission.

  • Removes all waypoints from the waypoint mission.

    Declaration

    Objective-C

    - (void)removeAllWaypoints;
  • Gets the waypoint at the specified index in the mission waypoint array.

    Declaration

    Objective-C

    - (DJIWaypoint *_Nullable)getWaypointAtIndex:(int)index;

    Parameters

    index

    Index of the waypoint to be retrieved.

    Return Value

    Waypoint of type DJIWaypoint, if the index exists.

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

    Declaration

    Objective-C

    + (void)setAutoFlightSpeed:(float)speed
                withCompletion:(DJICompletionBlock)completion;

    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. Its range is [-maxFlightSpeed, maxFlightSpeed] m/s.

    completion

    Completion block.