Skip to main content

AUTELWaypointMissionHandler

protocol AUTELWaypointMissionHandler

description:Protocols for waypoint mission are used to download, perform, stop, and pause mission. subclass of AUTELMissionHandler


method stopMissionExecution:WithCompletion

- (void)stopMissionExecution:(WaypointMissionFinishAction)finishAction WithCompletion:(AUTELCompletionBlock)completion;

description: Stops the current mission. The aircraft will hover in place.

param:

finishActionWaypointMissionFinishAction,The action while the aircraft finish mission。

return:none。


protocol  AUTELMissionHandler

description:Protocols for Autopilot are used to download, perform, stop, and pause Autopilot tasks.


property handlerType

@property  (assign, nonatomic, readonly) AUTELMissionHandlerType handlerType;

description: type of AUTELMissionHandler


property handlerState

@property  (nonatomic, readonly) AUTELMissionHandlerState handlerState;

description:Return to the state of "uploading or downloading the task data"


property isRunning

@property  (nonatomic, readonly) BOOL isRunning;

description: Whether the aircraft is performing or about to perform the handlerType task

If handlerType = AUTELMissionHandlerTypeWaypoint, isRunning means the state of "whether the aircraft is performing or about to perform the Waypoint task"

If handlerType = AUTELMissionHandlerTypeHotPoint, isRunning means the state of "whether the aircraft is performing or about to perform the Orbit task"

If handlerType = AUTELMissionHandlerTypeFollowMe, isRunning means the state of "whether the aircraft is performing or about to perform the Follow task"

Other tasks are the same.


method prepareMission:withProgresswith:Completion

- (void)prepareMission:(AUTELMission *)mission withProgress:(AUTELMissionProgressHandler)preparationProgress withCompletion:(AUTELCompletionBlock)completion;

description: Prepares the mission for execution. For the waypoint mission, data needs to be uploaded to the aircraft (product) and the AUTELMissionProgressHandler can be used to monitor upload progress. The follow-me, panorama, hotpoint and custom missions require much shorter time for the preparation phase. PrepareMission should fail if a mission is currently executing.

param:

mission: Mission object.

preparationProgress: Progress handler callback method to monitor preparation progress .

completion: The callback method after execution is finished

return:none。


method downloadMissionWithProgress:downladProgress:withCompletion

- (void)downloadMissionWithProgress:(AUTELMissionProgressHandler)downladProgress withCompletion:(AUTELMissionDownloadCompletionBlock)completion;

description: Download flight task from aircraft: only available when the aircraft is ready for the given flight task.

param:

downladProgress: Progress handler callback method to monitor download progress.

completion: Completion block.


method startMissionExecutionWithCompletion:

- (void)startMissionExecutionWithCompletion:(AUTELCompletionBlock)completion;

description: Start performing the task: only available when the task is prepared successfully.

param:completion Completion block.

return:none。


method pauseMissionExecutionWithCompletion:

- (void)pauseMissionExecutionWithCompletion:(AUTELCompletionBlock)completion;

description: Pauses the current mission being executed and the aircraft will hover in its current location. Current state will be saved until resumeMissionExecutionWithCompletion is called.

param:completion Completion block.

return:none。


method resumeMissionExecutionWithCompletion:

- (void)resumeMissionExecutionWithCompletion:(AUTELCompletionBlock)completion;

description: Resumes the currently paused mission.

param:completion Completion block.

return:none。


method stopMissionExecutionWithCompletion:

- (void)stopMissionExecutionWithCompletion:(AUTELCompletionBlock)completion;

description: Stops the current mission. The aircraft will hover in place.

param:none

return:none。


class AUTELMissionProgressStatus

description: The class is an base class representing the progress of an executing mission.


property error

@property(nonatomic, strong) NSError *error;

description: This property describes the error which are generated by executing mission.


class AUTELWaypointMissionStatus

description: Provides current waypoint mission status.


property misstionStatus

@property(nonatomic, readonly) WaypointMissionStatus misstionStatus;

description: way point status. 0:pause; 1:running; 2:completed; other:as defiens latter


property residualTime

@property(nonatomic, readonly) NSInteger residualTime;

description: Remaining task time.


property residualDistance

@property(nonatomic, readonly) NSInteger residualDistance;

description: Length of remaining mission route.


property photoCount

@property(nonatomic, readonly) NSInteger photoCount;

description: Current number of photos taken.


property targetWaypointIndex

@property(nonatomic, readonly) NSInteger targetWaypointIndex;

description: Index of the waypoint which the aircraft is flying to.


property execState

@property(nonatomic, readonly) AUTELWaypointMissionExecuteState execState;

description: Current execution state of the aircraft.


property isWaypointReached

@property(nonatomic, readonly) BOOL isWaypointReached;

description: Whether or not the aircraft has reached a waypoint. Will return true if a waypoint has been reached.


property autoSpeed

@property(nonatomic, readonly) float autoSpeed;

description: The speed of auto pilotion.


enum AUTELMissionHandlerState

description: Autopilot task state

typedef NS_ENUM(uint8_t, AUTELMissionHandlerState) {
/**
* @brief Idle
*
*/
AUTELMissionHandlerStateIdle,
/**
* @brief Uploading task
*
*/
AUTELMissionHandlerStateUploadMissionData,
/**
* @brief Downloading task
*
*/
AUTELMissionHandlerStateDownloadMissionData,
};

enum WaypointMissionFinishAction

description: Waypoint task finish action

typedef NS_ENUM(uint8_t, WaypointMissionFinishAction) {
/**
* @brief Hover
*
*/
WaypointMissionFinishActionHover,
/**
* @brief go home
*
*/
WaypointMissionFinishActionGoHome
};

enum AUTELMissionHandlerType

description:Autopilot type

typedef NS_ENUM(uint8_t, AUTELMissionHandlerType) {
/**
* @brief Not performing any task.
*
*/
AUTELMissionHandlerTypeUnknown,
/**
* @brief Waypoint task
*
*/
AUTELMissionHandlerTypeWaypoint,
/**
* @brief Obrit task
*
*/
AUTELMissionHandlerTypeHotPoint,
/**
* @brief Follow task
*
*/
AUTELMissionHandlerTypeFollowMe,
/**
* @brief Track task
*
*/
AUTELMissionHandlerTypeTrack,
/**
* @brief view point task
*
*/
AUTELMissionHandlerTypeViewpoint,
/**
* @brief One shot video task
*
*/
AUTELMissionHandlerTypeOneShotVideo,
/**
* @brief Precision Flight task
*
*/
AUTELMissionHandlerTypeTripod,
/**
* @brief Dual Stability task
*
*/
AUTELMissionHandlerTypePhotographer,
/**
* @brief Gesture task
*
*/
AUTELMissionHandlerTypeGesture,
/**
* @brief time-lapse photography task
*
*/
AUTELMissionHandlerTypeDelayShot,
/**
* @brief Vision Orbit task
*
*/
AUTELMissionHandlerTypeVisionOrbit,
/**
* @brief Vision Orbit time-lapse photography task
*
*/
AUTELMissionHandlerTypeOrbitDelayShot,
/**
* @brief Panoramic photography task
*
*/
AUTELMissionHandlerTypePanoramicPhoto
};

enum WaypointMissionStatus

description: misstion status

typedef NS_ENUM(uint8_t, WaypointMissionStatus) {
/**
* @brief pause
*
*/
WaypointMissionStatusPause,
/**
* @brief running
*
*/
WaypointMissionStatusRunning,
/**
* @brief completed
*
*/
WaypointMissionStatusCompleted,
/**
* @brief other:as defiens latter
*
*/
WaypointMissionStatusOther,
};

enum AUTELWaypointMissionExecuteState

description: The executing state of the Waypoint task

typedef NS_ENUM(uint8_t, AUTELWaypointMissionExecuteState) {
/**
* @brief Initializing the task
*
*/
AUTELWaypointMissionExecuteStateInitializing = 0,
/**
* @brief Performing the Waypoint task.
*
*/
AUTELWaypointMissionExecuteStateMoving = 1,
/**
* @brief Waypoint task paused. Aircraft hovering.
*
*/
AUTELWaypointMissionExecuteStatePause = 2,
/**
* @brief Waypoint task finish,go home.
*
*/
AUTELWaypointMissionExecuteStateGoHome = 3,
/**
* @brief Waypoint task finish,langding.
*
*/
AUTELWaypointMissionExecuteStateLanding = 4,

/**
* @brief The Waypoint task is finished.
*
*/
AUTELWaypointMissionExecuteStateFinish = 5,
/**
* @brief Waypoint task state unknown.
*
*/
AUTELWaypointMissionExecuteStateUnknown = 0xFF,
};