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 travelling 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. It is not supported by Spark.
Number of waypoints in the waypoint mission. Note there are some cases when the waypoint count will be different to the waypoint array length from allWaypoints. This is usually the case when the waypoint mission is still being downloaded from the aircraft and the mission object hasn't existed previously (e.g. when the mobile device is connected to an aircraft with a previously uploaded mission). In these cases, isComplete will return NO.
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.
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.
The path the aircraft follows between waypoints. The aircraft can either fly directly between waypoints in a straight line, or turn near a waypoint in the curve where the waypoint location defines a part of the curve.
Mission execution can be repeated more than once. The value range is [1, 255]. If 255 is selected, then the mission will continue to be executed until stopMissionWithCompletion is called or any error occurs. Other values represent the exact execution times of the mission.
When downloading a waypoint mission, the number of waypoints in allWaypoints will be less than waypointCount until the download is complete. This property is YES when all the information in the waypoint mission is downloaded, and complete in this object.
Actions taken when the waypoint mission has finished.
No further action will be taken on completion of mission. At this point, the aircraft can be controlled by the remote controller.
The aircraft will go home when the mission is complete. If the aircraft is more than 20m away from the home point it will go home and land. Otherwise, it will land directly at the current location.
The aircraft will land automatically at the last waypoint.
The aircraft will go back to its first waypoint and hover in position.
When the aircraft reaches its final waypoint, it will hover without ending the mission. The joystick can still be used to pull the aircraft back along its previous waypoints. The only way this mission can end is if stopMission is called.
Aircraft's heading will always be in the direction of flight.
Aircraft's heading will be set to the heading when reaching the first waypoint. Before reaching the first waypoint, the aircraft's heading can be controlled by the remote controller. When the aircraft reaches the first waypoint, its heading will be fixed.
This enum will determine the goto point mode while the drone executes the flight.
Go to the waypoint safely. The aircraft will rise to the same altitude of the waypoint if the current altitude is lower then the waypoint altitude. It then goes to the waypoint coordinate from the current altitude, and proceeds to the altitude of the waypoint.
Go to the waypoint from the current aircraft point to the waypoint directly.
Aircraft has reached a waypoint, has rotated to the new heading and is now processing actions. This state will be called before the waypoint actions starts executing and will occur for each waypoint action.
Aircraft is at a waypoint and is executing an action.
Aircraft is at a waypoint and has finished executing the current waypoint action. This state occurs once for each waypoint action.