DJI Mobile SDK Documentation

      class DJIWaypoint

      @interface DJIWaypoint : NSObject
      Header:DJIWaypoint.h
      Inherits From:NSObject
      Description:

      The class represents a target point in the waypoint mission. For a waypoint mission, a flight route consists of multiple DJIWaypoint objects. The user can also define the actions to perform for each DJIWaypoint.

      Class Members:
      Constructor
      method
      method initWithCoordinate
      - (id)initWithCoordinate:(CLLocationCoordinate2D)coordinate
      Header:DJIWaypoint.h
      Description:

      Initiate instance with specific waypoint.

      Input Parameters:
      CLLocationCoordinate2D coordinateCoordinate Object.
      Return:
      idA DJIWaypoint object initialized with CLLocationCoordinate2D struct.
      Coordinate
      property
      property coordinate
      @property(nonatomic, assign) CLLocationCoordinate2D coordinate
      Header:DJIWaypoint.h
      Description:

      Waypoint coordinate latitude and longitude in degrees.

      Altitude
      property
      property altitude
      @property(nonatomic, assign) float altitude
      Header:DJIWaypoint.h
      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.

      Heading
      property
      property heading
      @property(nonatomic, assign) NSInteger heading
      Header:DJIWaypoint.h
      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 DJIWaypointMissionHeadingUsingWaypointHeading. A heading has a range of [-180, 180] degrees, where 0 represents True North.

      Corner Radius
      property
      property cornerRadiusInMeters
      @property(nonatomic, assign) float cornerRadiusInMeters
      Header:DJIWaypoint.h
      Description:

      Corner radius of the waypoint. When the flight path mode is DJIWaypointMissionFlightPathCurved the flight path near a waypoint will be a curve (rounded corner) with radius [0.2,1000]. When there is a corner radius, the aircraft will never go through 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).

      Turn Mode
      property
      property turnMode
      @property(nonatomic) DJIWaypointTurnMode turnMode
      Header:DJIWaypoint.h
      Description:

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

      See Also:

      DJIWaypointTurnMode

      Gimbal Pitch
      property
      property gimbalPitch
      @property(nonatomic, assign) float gimbalPitch
      Header:DJIWaypoint.h
      Description:

      Gimbal pitch angle when reached this waypoint. This property is used when the DJIWaypointMission property rotateGimbalPitch is YES . Value should in range [-90, 0] degree.

      Speed
      property
      property speed
      @property(nonatomic, assign) float speed
      Header:DJIWaypoint.h
      Description:

      The base automatic speed of the aircraft as it moves between this waypoint and the next waypoint with range [0, 15] m/s. By default, it is 0.0 and the aircraft will fly with autoFlightSpeed of the waypoint mission. If greater than 0, 'speed' will override autoFlightSpeed. This 'speed' can only define movement forward through the waypoint mission in comparison to autoFlightSpeed which can be both forward and backwards through a waypoint mission.
      Waypoint mission speed priority from highest to lowest is:
      1) manual speed adjustment with remote controller joy sticks
      2) 'speed'
      3) setAutoFlightSpeed:withCompletion
      4) autoFlightSpeed
      Warning: 'speed', shootPhotoTimeInterval and shootPhotoDistanceInterval relate to behavior between this waypoint and the next waypoint in the mission. In comparison, turnMode, altitude and heading relate to behavior between the last waypoint and this waypoint in the waypoint mission. Only supported by flight controller firmware 3.2.10.0 or above.

      Shoot Photo Time Interval
      property
      property shootPhotoTimeInterval
      @property(nonatomic, assign) float shootPhotoTimeInterval
      Header:DJIWaypoint.h
      Description:

      The time interval in seconds when two photos are taken as the aircraft moves between the current waypoint and the next waypoint. The first photo will be taken as the aircraft leaves the current waypoint. The maximum value is 6,000.0. The minimum value is above 0.0 and depends on the camera type and the camera parameters. When the photo file format is JPEG, the recommended minimum value is 2.0. When the photo file format is RAW, the minimum value is 10.0. If the input exceeds the camera's capability, the pictures will be taken at the maximum possible speed. The default value is 0.0 and no photo will be taken. For a waypoint, either shootPhotoTimeInterval or shootPhotoDistanceInterval is 0.0. Input with precision of greater than 1 decimal places, will be rounded to 1. Warning: 'speed', shootPhotoTimeInterval and shootPhotoDistanceInterval relate to behavior between this waypoint and the next waypoint in the mission. In comparison, turnMode, altitude and heading relate to behavior between the last waypoint and this waypoint in the waypoint mission. Only supported by flight controller firmware 3.2.10.0 or above.

      Shoot Photo Distance Interval
      property
      property shootPhotoDistanceInterval
      @property(nonatomic, assign) float shootPhotoDistanceInterval
      Header:DJIWaypoint.h
      Description:

      The distance interval in meters when two photos are taken as the aircraft moves between the current waypoint and the next waypoint. The maximum value is 6,000.0. The minimum value is above 0.0 and depends on the camera type, the camera parameters and the flight speed. When the photo file format is JPEG, the time interval between two photos cannot smaller than 2 seconds. When the photo file format is RAW, the time interval between two photos cannot smaller than 10 seconds. If the input exceeds the camera's capability, the taken photos may be less than expectation. The default value is 0.0 and no photo will be taken. For a waypoint, either shootPhotoTimeInterval or shootPhotoDistanceInterval is 0.0. Input with precision of greater than 1 decimal places, will be rounded to 1. Warning: 'speed', shootPhotoTimeInterval and shootPhotoDistanceInterval relate to behavior between this waypoint and the next waypoint in the mission. In comparison, turnMode, altitude and heading relate to behavior between the last waypoint and this waypoint in the waypoint mission. Only supported by flight controller firmware 3.2.10.0 or above.

      Actions
      property
      property waypointActions
      @property(nonatomic, readonly) NSArray *waypointActions
      Header:DJIWaypoint.h
      Description:

      Array of all waypoint actions for the respective waypoint. The waypoint actions will be executed consecutively from the start of the array once the aircraft reaches the waypoint.

      property actionRepeatTimes
      @property(nonatomic, assign) NSUInteger actionRepeatTimes
      Header:DJIWaypoint.h
      Description:

      Determines how many times the set of waypoint actions are repeated. The default value is one time, and the maximum is DJIMaxActionRepeatTimes.

      property actionTimeoutInSeconds
      @property(nonatomic) int actionTimeoutInSeconds
      Header:DJIWaypoint.h
      Description:

      The maximum time set to execute all the waypoint actions for a waypoint. If the time while executing the waypoint actions goes above the time set, the aircraft will stop executing the waypoint actions for the current waypoint and will move on to the next waypoint. The value of this property must be in the range of [0, 999] seconds. The default value is 60 seconds.

      Add Action
      method
      method addAction
      - (BOOL)addAction:(DJIWaypointAction *)action
      Header:DJIWaypoint.h
      Description:

      Adds a waypoint action to a waypoint. The number of waypoint actions should not be larger than DJIMaxActionCount. The action will only be executed when the mission's flightPathMode property is set to DJIWaypointMissionFlightPathNormal and will not be executed when the mission's flightPathMode property is set to DJIWaypointMissionFlightPathCurved. The maximum number of waypoint actions you can add is 15.

      Input Parameters:
      DJIWaypointAction * actionWaypoint action to be added to the waypoint.
      Return:
      BOOLYES if the waypoint action has been added to the waypoint. NO if the waypoint action count is too high, or if the waypoint action was incorrectly setup.
      method insertAction:atIndex
      - (BOOL)insertAction:(DJIWaypointAction *)action atIndex:(int)index
      Header:DJIWaypoint.h
      Description:

      Insert a waypoint action at index. @return YES, if the waypoint action has been inserted. NO if the waypoint action count is too high or the index is invalid.

      Input Parameters:
      DJIWaypointAction * actionWaypoint action to be inserted to the waypoint.
      int indexIndex of the inserted action.
      Return:
      BOOLA boolean value.
      Remove Action
      method
      method removeAction
      - (BOOL)removeAction:(DJIWaypointAction *)action
      Header:DJIWaypoint.h
      Description:

      Removes a waypoint action from the waypoint. @return YES if the waypoint action has been removed from the waypoint.

      Input Parameters:
      DJIWaypointAction * actionWaypoint action to be removed from the waypoint.
      Return:
      BOOLA boolean value.
      method removeActionAtIndex
      - (BOOL)removeActionAtIndex:(int)index
      Header:DJIWaypoint.h
      Description:

      Removes a waypoint action from the waypoint by index. After removal, all actions higher than the index will be shifted down by one.

      Input Parameters:
      int indexThe index of the waypoint action to be removed.
      Return:
      BOOLYES if waypoint action has been removed from the waypoint.
      method removeAllActions
      - (void)removeAllActions
      Header:DJIWaypoint.h
      Description:

      Remove all the actions.

      enum DJIWaypointTurnMode
      typedef NS_ENUM (NSUInteger, DJIWaypointTurnMode)
      Header:DJIWaypoint.h
      Description:

      How the aircraft will turn at a waypoint to transition between headings.

      Enum Members:
      DJIWaypointTurnClockwiseChanges the heading of the aircraft by rotating the aircraft clockwise.
      DJIWaypointTurnCounterClockwiseChanges the heading of the aircraft by rotating the aircraft anti-clockwise.
      const DJIMaxActionCount
      DJI_API_EXTERN const int DJIMaxActionCount
      Header:DJIWaypoint.h
      Description:

      Maximum number of actions a single waypoint can have. The maximum supported number is 15.

      const DJIMaxActionRepeatTimes
      DJI_API_EXTERN const int DJIMaxActionRepeatTimes
      Header:DJIWaypoint.h
      Description:

      Maximum number of times a single waypoint action can be repeated. The maximum supported number is 15.