DJIWaypoint
@interface DJIWaypoint : NSObject
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
.
-
Waypoint coordinate latitude and longitude in degrees.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) CLLocationCoordinate2D coordinate;
-
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 flys between waypoints.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) float altitude;
-
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 toDJIWaypointMissionHeadingUsingWaypointHeading
. A heading has a range of [-180, 180] degrees, where 0 represents True North.Declaration
Objective-C
@property (assign, readwrite, nonatomic) float heading;
-
Determines how many times the set of waypoint actions are repeated. The default value is one time, and the maximum is
DJIMaxActionRepeatTimes
.Declaration
Objective-C
@property (assign, readwrite, nonatomic) NSUInteger actionRepeatTimes;
-
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.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) int actionTimeoutInSeconds;
-
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. The radius should not be larger than the three dimensional distance between any two of the three waypoints that comprise the corner.Declaration
Objective-C
@property (assign, readwrite, nonatomic) float cornerRadiusInMeters;
-
Determines whether the aircraft will turn clockwise or anitclockwise when changing its heading.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) DJIWaypointTurnMode turnMode;
-
Gimbal pitch angle when reached this waypoint. This property is used when the
DJIWaypointMission
propertyrotateGimbalPitch
isYES
. Value should in range [-90, 0] degree.Declaration
Objective-C
@property (assign, readwrite, nonatomic) float gimbalPitch;
-
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 overrideautoFlightSpeed
. Thisspeed
can only define movement forward through the waypoint mission in comparison toautoFlightSpeed
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
4)autoFlightSpeed
Warning:
speed
,shootPhotoTimeInterval
andshootPhotoDistanceInterval
relate to behavior between this waypoint and the next waypoint in the mission. In comparison,turnMode
,altitude
andheading
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.Declaration
Objective-C
@property (assign, readwrite, nonatomic) float speed;
-
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 time interval between two photos cannot smaller than 10 seconds for all cameras except those on the Inspire 2 which can be 5 seconds. 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
orshootPhotoDistanceInterval
is 0.0.Input with precision of greater than 1 decimal places, will be rounded to 1.
Warning:
speed
,shootPhotoTimeInterval
andshootPhotoDistanceInterval
relate to behavior between this waypoint and the next waypoint in the mission. In comparison,turnMode
,altitude
andheading
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.Declaration
Objective-C
@property (assign, readwrite, nonatomic) float shootPhotoTimeInterval;
-
The distance interval in meters when two photos are taken as the aircraft moves between the current waypoint and the next waypoint. The first photo is taken at the first 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 for all cameras except those on the Inspire 2 which can be 5 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
orshootPhotoDistanceInterval
is 0.0.Input with precision of greater than 1 decimal places, will be rounded to 1.
Warning:
speed
,shootPhotoTimeInterval
andshootPhotoDistanceInterval
relate to behavior between this waypoint and the next waypoint in the mission. In comparison,turnMode
,altitude
andheading
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.Declaration
Objective-C
@property (assign, readwrite, nonatomic) float shootPhotoDistanceInterval;
-
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.
Declaration
Objective-C
@property (readonly, nonatomic) NSArray *_Nonnull waypointActions;
-
Initiate instance with specific waypoint.
Declaration
Objective-C
- (nonnull id)initWithCoordinate:(CLLocationCoordinate2D)coordinate;
-
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’sflightPathMode
property is set toDJIWaypointMissionFlightPathNormal
and is not executed when the mission’sflightPathMode
property is set toDJIWaypointMissionFlightPathCurved
. The maximum number of waypoint actions you can add is 15.Declaration
Objective-C
- (BOOL)addAction:(nonnull DJIWaypointAction *)action;
Parameters
action
Waypoint action to be added to the waypoint.
Return Value
Yes 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.
-
Insert a waypoint action at index.
Declaration
Objective-C
- (BOOL)insertAction:(nonnull DJIWaypointAction *)action atIndex:(int)index;
Parameters
action
Waypoint action to be inserted to the waypoint.
index
Index of the inserted action
Return Value
YES, if the waypoint action has been inserted. No if the waypoint action count is too high or the index is invalid.
-
Removes the last waypoint action from the waypoint.
Declaration
Objective-C
- (BOOL)removeAction:(nonnull DJIWaypointAction *)action;
Parameters
action
Waypoint action to be removed from the waypoint.
Return Value
YES if the waypoint action has been removed from the waypoint.
-
Removes a waypoint action from the waypoint by index. After removal, all actions higher than the index will be shifted down by one.
Declaration
Objective-C
- (BOOL)removeActionAtIndex:(int)index;
Parameters
index
The index of the waypoint action to be removed.
Return Value
YES if waypoint action has been removed from the waypoint.
-
Remove all the actions.
Declaration
Objective-C
- (void)removeAllActions;