class DJIHotpointMissionOperator
@interface DJIHotpointMissionOperator : NSObject
Header: DJIHotpointMissionOperator.h Inherits From: NSObject
Description:
The hotpoint mission operator is the only object that controls, runs and monitors Hotpoint Missions. It can be accessed from DJIMissionControl
.
Class Members:
property currentState
@property (readonly , nonatomic ) DJIHotpointMissionState currentState
Header: DJIHotpointMissionOperator.h
Description:
The current state of the executing Hotpoint mission executing.
See Also:
DJIHotpointMissionState
method addListenerToEvents:withQueue:andBlock
- (void )addListenerToEvents:(id )listener
withQueue:(nullable dispatch_queue_t )queue
andBlock:(DJIHotpointMissionOperatorEventBlock)block
Header: DJIHotpointMissionOperator.h
Description:
Adds listener to receive all of the Hotpoint mission operator events.
id listener Listener that is interested in the Hotpoint mission operator. nullable dispatch_queue_t queue The dispatch queue that block
will be called on. DJIHotpointMissionOperatorEventBlock block Block will be called when there is event updated.
method addListenerToStarted:withQueue:andBlock
- (void )addListenerToStarted:(id )listener
withQueue:(nullable dispatch_queue_t )queue
andBlock:(DJIHotpointMissionOperatorSimpleEventBlock)block
Header: DJIHotpointMissionOperator.h
Description:
Adds listener to receive a notification when a Hotpoint mission is started.
id listener Listener that is interested in the start of the Hotpoint mission. nullable dispatch_queue_t queue The dispatch queue that block
will be called on. DJIHotpointMissionOperatorSimpleEventBlock block Block will be called when a Hotpoint mission is started.
method addListenerToFinished:withQueue:andBlock
- (void )addListenerToFinished:(id )listener
withQueue:(nullable dispatch_queue_t )queue
andBlock:(DJICompletionBlock)block
Header: DJIHotpointMissionOperator.h
Description:
Adds listener to receive a notification when a Hotpoint mission is finished.
id listener Listener that is interested in the finish of the Hotpoint mission. nullable dispatch_queue_t queue The dispatch queue that block
will be called on. DJICompletionBlock block Block will be called when a Hotpoint mission is finished. If the mission is interrupted with an error, the error will be passed to the block.
method removeListener
- (void )removeListener:(id )listener
Header: DJIHotpointMissionOperator.h
Description:
Removes listener. If the listener is listening to events and notifications, then it will stop listening to all if called with this method.
id listener Listener to be removed.
method removeListenerOfEvents
- (void )removeListenerOfEvents:(id )listener
Header: DJIHotpointMissionOperator.h
Description:
Removes listener from listener pool of events.
id listener Listener to be removed.
method removeListenerOfStarted
- (void )removeListenerOfStarted:(id )listener
Header: DJIHotpointMissionOperator.h
Description:
Removes listener from listener pool of start mission notifications.
id listener Listener to be removed.
method removeListenerOfFinished
- (void )removeListenerOfFinished:(id )listener
Header: DJIHotpointMissionOperator.h
Description:
Removes listener from listener pool of stop mission notifications
id listener Listener to be removed.
method removeAllListeners
- (void )removeAllListeners
Header: DJIHotpointMissionOperator.h
Description:
Remove all listeners from listener pool.
method stopMissionWithCompletion
- (void )stopMissionWithCompletion:(DJICompletionBlock)completion
Header: DJIHotpointMissionOperator.h
Description:
Stops the executing or paused mission. It can only be called when currentState
is one of the following: After a mission is stopped successfully, currentState
will become DJIHotpointMissionStateReadyToStart
.
DJICompletionBlock completion Completion block that will be called when the operator succeeds or fails to stop the mission. If it fails, an error will be returned.
Get Executing Mission
method
method getExecutingMissionWithCompletion
-(void )getExecutingMissionWithCompletion:(void (^_Nonnull )(DJIHotpointMission *_Nullable mission,
NSError *_Nullable error))completion
Header: DJIHotpointMissionOperator.h
Description:
Gets the executing mission from the aircraft. It can only be called when currentState
is one of the following:
DJIHotpointMission *_Nullable mission Detailed information of the mission being executed. altitude
and radius
may be different from the initial settings when starting the mission. It is nil
if there is an error encountered when trying to get the mission. NSError *_Nullable error Error retrieving the value. void(^_Nonnull )(DJIHotpointMission *_Nullable mission, NSError *_Nullable error) completion Completion block to receive the execution result.
Set Angular Velocity
method
method setAngularVelocity:withCompletion
- (void )setAngularVelocity:(float )angularVelocity withCompletion:(DJICompletionBlock)completion
Header: DJIHotpointMissionOperator.h
Description:
Sets angular velocity for the executing mission. It can only be called when currentState
is one of the following:
float angularVelocity Angular velocity to set. DJICompletionBlock completion Completion block to receive the execution result.
method setRadius:completion
- (void )setRadius:(float )radius completion:(DJICompletionBlock)completion
Header: DJIHotpointMissionOperator.h
Description:
Sets radius for the executing mission. It can only be called when the currentState
is one of the following:
float radius Radius to set. DJICompletionBlock completion Completion block to receive the execution result.
Reset Mission Heading
method
method resetMissionHeadingWithCompletion
- (void )resetMissionHeadingWithCompletion:(DJICompletionBlock)completion
Header: DJIHotpointMissionOperator.h
Description:
Resets aircraft's heading to the direction defined by heading
of DJIHotpointMission
. It can only be called when the currentState
is one of the following:
DJICompletionBlock completion Completion block that will be called when the operator succeeds or fails to reset the mission heading. If it fails, an error will be returned.
Max Angular Velocity
class method
class method getMaxAngularVelocityForRadius:withCompletion
+ (void )getMaxAngularVelocityForRadius:(double )radius withCompletion:(void (^)(float angularVelocity, NSError *_Nullable error))completion
Header: DJIHotpointMissionOperator.h
Description:
Returns the maximum supported angular velocity, in degrees/s, for a given Hotpoint mission radius in meters. Returns 0 if an unsupported radius is specified.
double radius Hotpoint radius with a range of [5,500] meters. This is used to calculate the maximum angular velocity. float angularVelocity Angular velocity in degrees/s. NSError *_Nullable error Error if there is any. void(^)(float angularVelocity, NSError *_Nullable error) completion Completion block to receive the execution result.
typedef block DJIHotpointMissionOperatorEventBlock
typedef void (^DJIHotpointMissionOperatorEventBlock)(DJIHotpointMissionEvent *event)
Header: DJIHotpointMissionOperator.h
Description:
Block to receive the hotpoint operator event.
typedef block DJIHotpointMissionOperatorSimpleEventBlock
typedef void (^DJIHotpointMissionOperatorSimpleEventBlock)()
Header: DJIHotpointMissionOperator.h
Description:
Block to receive the notification that a Hotpoint mission is started successfully.