DJI Mobile SDK Documentation

      class DJITapFlyMissionOperator

      @interface DJITapFlyMissionOperator : NSObject
      Header:DJITapFlyMissionOperator.h
      Inherits From:NSObject
      Description:

      The operator for TapFly mission. It is used to execute a TapFly mission.

      Class Members:
      Current State
      property
      property currentState
      @property (nonatomic, readonly) DJITapFlyMissionState currentState
      Header:DJITapFlyMissionOperator.h
      Description:

      The current state of the operator.

      See Also:

      DJITapFlyMissionState

      Mode
      property
      property mode
      @property (nonatomic, readonly) DJITapFlyMode mode
      Header:DJITapFlyMissionOperator.h
      Description:

      The current tracking mode of the aircraft. It is valid when the currentState is one of the following:

      For the other states, the value is DJITapFlyModeUnknown.

      See Also:

      DJITapFlyMode

      Persistent Error
      property
      property persistentError
      @property (nonatomic, readonly, nullable) NSError *persistentError
      Header:DJITapFlyMissionOperator.h
      Description:

      Existing error that prevents a TapFly mission to start. If it is not nil, currentState will be DJITapFlyMissionStateCannotStart.

      method addListenerToEvents:withQueue:andBlock
      -(void)addListenerToEvents:(id)listener
      withQueue:(dispatch_queue_t)queue
      andBlock:(DJITapFlyMissionOperatorEventBlock)block
      Header:DJITapFlyMissionOperator.h
      Description:

      Adds listener to receive all the events of the TapFly mission operator.

      Input Parameters:
      id listenerListener that is interested in the TapFly mission operator.
      dispatch_queue_t queueThe dispatch queue that block will be called on.
      DJITapFlyMissionOperatorEventBlock blockBlock will be called when there is event updated.
      Remove Listener
      method
      method removeListener
      -(void)removeListener:(id)listener
      Header:DJITapFlyMissionOperator.h
      Description:

      Removes listener. The listener will not receive any updates after calling this method.

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

      Remove all listeners.

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

      Starts to execute a TapFly mission. It can only be called when the currentState is DJITapFlyMissionStateReadyToStart. If the mission is started successfully, the currentState will become DJITapFlyMissionStateExecuting.

      Input Parameters:
      DJITapFlyMission * missionAn object of DJITapFlyMission.
      DJICompletionBlock completionCompletion block that will be called when the operator succeeds or fails to start the execution. If it fails, an error will be returned.
      Stop Mission
      method
      method stopMissionWithCompletion
      -(void)stopMissionWithCompletion:(DJICompletionBlock)completion
      Header:DJITapFlyMissionOperator.h
      Description:

      Stops the executing mission. It can only be called when the currentState is one of the following:

      After a mission is stopped successfully, currentState will become DJITapFlyMissionStateReadyToStart.

      Input Parameters:
      DJICompletionBlock completionCompletion block that will be called when the operator succeeds or fails to start the execution. If it fails, an error will be returned.
      Reset Heading
      method
      method resetHeadingWithCompletion
      -(void)resetHeadingWithCompletion:(DJICompletionBlock)completion
      Header:DJITapFlyMissionOperator.h
      Description:

      Resets aircraft heading to the flight direction. It can only be used when mode is DJITapFlyModeFree.

      Input Parameters:
      DJICompletionBlock completionCompletion block that receives the execution result.
      Auto Flight Speed
      method
      method setAutoFlightSpeed:withCompletion
      -(void)setAutoFlightSpeed:(float)speed withCompletion:(DJICompletionBlock)completion
      Header:DJITapFlyMissionOperator.h
      Description:

      Sets auto flight speed for TapFly mission. It can be changed before or during the execution of a TapFly mission.

      Input Parameters:
      float speedAuto flight speed.
      DJICompletionBlock completionCompletion block that receives the execution result.
      method getAutoFlightSpeedWithCompletion
      -(void)getAutoFlightSpeedWithCompletion:(DJIFloatCompletionBlock)completion
      Header:DJITapFlyMissionOperator.h
      Description:

      Gets the auto flight speed for TapFly mission in m/s.

      Input Parameters:
      DJIFloatCompletionBlock completionCompletion block that receives the execution result.
      method setHorizontalObstacleBypassEnabled:withCompletion
      -(void)setHorizontalObstacleBypassEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion
      Header:DJITapFlyMissionOperator.h
      Description:

      YES allows the aircraft to bypass or move around an obstacle by going to the left or right of the obstacle. If NO, the aircraft will only go over an obstacle to avoid it. It can be changed before or during the execution of a TapFly mission.

      Input Parameters:
      BOOL enabledYES allows aircraft to bypass or move around an obstacle by going to the left or right.
      DJICompletionBlock completionCompletion block that receives the execution result.
      method getHorizontalObstacleBypassEnabledWithCompletion
      -(void)getHorizontalObstacleBypassEnabledWithCompletion:(DJIBooleanCompletionBlock)completion
      Header:DJITapFlyMissionOperator.h
      Description:

      YES allows the aircraft to bypass or move around an obstacle by going to the left or right of the obstacle. If NO, the aircraft will only go over an obstacle to avoid it. It can be changed before or during the execution of a TapFly mission.

      Input Parameters:
      DJIBooleanCompletionBlock completionCompletion block that receives the execution result.
      typedef block DJITapFlyMissionOperatorEventBlock
      typedef void (^DJITapFlyMissionOperatorEventBlock)(DJITapFlyMissionEvent *event)
      Header:DJITapFlyMissionOperator.h
      Description:

      Block to receive the Tap Fly operator event.

      Input Parameters:
      DJITapFlyMissionEvent * eventThe Tap Fly operator event with the state change.