DJI Mobile SDK Documentation

      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:
      Current State
      property
      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.

      Input Parameters:
      id listenerListener that is interested in the Hotpoint mission operator.
      nullable dispatch_queue_t queueThe dispatch queue that block will be called on.
      DJIHotpointMissionOperatorEventBlock blockBlock 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.

      Input Parameters:
      id listenerListener that is interested in the start of the Hotpoint mission.
      nullable dispatch_queue_t queueThe dispatch queue that block will be called on.
      DJIHotpointMissionOperatorSimpleEventBlock blockBlock 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.

      Input Parameters:
      id listenerListener that is interested in the finish of the Hotpoint mission.
      nullable dispatch_queue_t queueThe dispatch queue that block will be called on.
      DJICompletionBlock blockBlock 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.
      Remove Listener
      method
      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.

      Input Parameters:
      id listenerListener to be removed.
      method removeListenerOfEvents
      - (void)removeListenerOfEvents:(id)listener
      Header:DJIHotpointMissionOperator.h
      Description:

      Removes listener from listener pool of events.

      Input Parameters:
      id listenerListener to be removed.
      method removeListenerOfStarted
      - (void)removeListenerOfStarted:(id)listener
      Header:DJIHotpointMissionOperator.h
      Description:

      Removes listener from listener pool of start mission notifications.

      Input Parameters:
      id listenerListener to be removed.
      method removeListenerOfFinished
      - (void)removeListenerOfFinished:(id)listener
      Header:DJIHotpointMissionOperator.h
      Description:

      Removes listener from listener pool of stop mission notifications

      Input Parameters:
      id listenerListener to be removed.
      method removeAllListeners
      - (void)removeAllListeners
      Header:DJIHotpointMissionOperator.h
      Description:

      Remove all listeners from listener pool.

      Start Mission
      method
      method startMission:withCompletion
      - (void)startMission:(DJIHotpointMission *)mission withCompletion:(DJICompletionBlock)completion
      Header:DJIHotpointMissionOperator.h
      Description:

      Starts to execute a Hotpoint mission. This only be called when the currentState is DJIHotpointMissionStateReadyToStart. After a mission is started successfully, the currentState will become DJIHotpointMissionStateExecutingInitialPhase or DJIHotpointMissionStateExecuting.

      Input Parameters:
      DJIHotpointMission * missionAn object of DJIHotpointMission.
      DJICompletionBlock completionCompletion block that will be called when the operator succeeds or fails to start the mission. If it fails, an error will be returned.
      Pause Mission
      method
      method pauseMissionWithCompletion
      - (void)pauseMissionWithCompletion:(DJICompletionBlock)completion
      Header:DJIHotpointMissionOperator.h
      Description:

      Pauses the executing mission. It can only be called when the currentState is DJIHotpointMissionStateExecutingInitialPhase or DJIHotpointMissionStateExecuting. If this method is called in the DJIHotpointMissionStateExecutingInitialPhase state, the aircraft will continue flying to the start point but it will not continue to circle around the hotpoint until the user resumes the mission. After a mission is paused successfully, the currentState will become DJIHotpointMissionStateExecutionPaused.

      Input Parameters:
      DJICompletionBlock completionCompletion block that will be called when the operator succeeds or fails to pause the mission. If it fails, an error will be returned.
      Resume Mission
      method
      method resumeMissionWithCompletion
      - (void)resumeMissionWithCompletion:(DJICompletionBlock)completion
      Header:DJIHotpointMissionOperator.h
      Description:

      Resumes the paused mission. It can only be called when the currentState is DJIHotpointMissionStateExecutionPaused. After a mission is resumed successfully, the currentState will become DJIHotpointMissionStateExecutingInitialPhase or DJIHotpointMissionStateExecuting.

      Input Parameters:
      DJICompletionBlock completionCompletion block that will be called when the operator succeeds or fails to resume the mission. If it fails, an error will be returned.
      Stop Mission
      method
      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.

      Input Parameters:
      DJICompletionBlock completionCompletion 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:

      Input Parameters:
      DJIHotpointMission *_Nullable missionDetailed 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 errorError retrieving the value.
      void(^_Nonnull )(DJIHotpointMission *_Nullable mission, NSError *_Nullable error) completionCompletion 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:

      Input Parameters:
      float angularVelocityAngular velocity to set.
      DJICompletionBlock completionCompletion block to receive the execution result.
      Set Radius
      method
      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:

      Input Parameters:
      float radiusRadius to set.
      DJICompletionBlock completionCompletion 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:

      Input Parameters:
      DJICompletionBlock completionCompletion 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.

      Input Parameters:
      double radiusHotpoint radius with a range of [5,500] meters. This is used to calculate the maximum angular velocity.
      float angularVelocityAngular velocity in degrees/s.
      NSError *_Nullable errorError if there is any.
      void(^)(float angularVelocity, NSError *_Nullable error) completionCompletion 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.

      Input Parameters:
      DJIHotpointMissionEvent * eventThe hotpoint operator event with the state change.
      typedef block DJIHotpointMissionOperatorSimpleEventBlock
      typedef void (^DJIHotpointMissionOperatorSimpleEventBlock)()
      Header:DJIHotpointMissionOperator.h
      Description:

      Block to receive the notification that a Hotpoint mission is started successfully.