DJI Mobile SDK Documentation

      class DJIRTK

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

      Real Time Kinematic

      Class Members:
      enum DJIRTKConnectionStateWithBaseStationReferenceSource
      typedef NS_ENUM(uint8_t, DJIRTKConnectionStateWithBaseStationReferenceSource)
      Header:DJIRTKServcieBaseTypes.h
      Description:

      All the possible connection state of DJIRTKConnectionStateWithBaseStationReferenceSource when DJIRTKReferenceStationSource is DJIRTKReferenceStationSourceBaseStation. It is only supported by Matrice 300 RTK.

      Enum Members:
      DJIRTKConnectionStateWithBaseStationReferenceSourceAircraftRTKIdleAircraft RTK is in idle state.
      DJIRTKConnectionStateWithBaseStationReferenceSourceAircraftRTKScanningAircraft is scanning all base stations that are possible to be connected.
      DJIRTKConnectionStateWithBaseStationReferenceSourceBaseStationConnectingThe aircraft is connecting with the base station.
      DJIRTKConnectionStateWithBaseStationReferenceSourceBaseStationConnectedThe aircraft is connected with the base station.
      DJIRTKConnectionStateWithBaseStationReferenceSourceBaseStationDisconnectedThe aircraft is disconnected from the base station.
      DJIRTKConnectionStateWithBaseStationReferenceSourceUnknownUnknown base station location connection state.
      enum DJIRTKPPKModeState
      typedef NS_ENUM(uint8_t, DJIRTKPPKModeState)
      Header:DJIRTK.h
      Description:

      PPK mode status.

      Enum Members:
      DJIRTKPPKModeState_IdlePPK Mode is idle.
      DJIRTKPPKModeState_RunningPPK Mode is running.
      DJIRTKPPKModeState_UnknownUnknown error.
      protocol DJIRTKDelegate
      @protocol DJIRTKDelegate <NSObject>
      Header:DJIRTK.h
      Inherits From:NSObject
      Description:

      This protocol provides a delegate method to update the RTK state.

      Protocol Methods:

      Protocol Method

      method rtk:didUpdateState
      @optional
      - (void)rtk:(DJIRTK *_Nonnull)rtk didUpdateState:(DJIRTKState *_Nonnull)state
      Header:DJIRTK.h
      Description:

      Callback function that updates the RTK state data.

      Input Parameters:
      DJIRTK *_Nonnull rtkInstance of the RTK.
      DJIRTKState *_Nonnull stateCurrent state of the RTK.
      method rtk:didUpdateReferenceStationSource
      @optional
      - (void)rtk:(DJIRTK *_Nonnull)rtk didUpdateReferenceStationSource:(DJIRTKReferenceStationSource)source
      Header:DJIRTK.h
      Description:

      Callback function that updates the RTK reference station source.

      Input Parameters:
      DJIRTK *_Nonnull rtkInstance of the RTK.
      DJIRTKReferenceStationSource sourceReference station source.
      method rtk:didUpdateBaseStationsList
      @optional
      - (void)rtk:(DJIRTK *_Nonnull)rtk didUpdateBaseStationsList:(NSArray <DJIRTKBaseStationInformation *> *)informations
      Header:DJIRTK.h
      Description:

      Provides the list of DJI base station that can be connected with. Delegate will continue to receive an updated list after startSearchBaseStationWithCompletion is called. Invoke stopSearchBaseStationWithCompletion to stop searching.

      Input Parameters:
      DJIRTK *_Nonnull rtkInstance of the RTK.
      NSArray <DJIRTKBaseStationInformation *> * informationsAn array contains Base station scan information.
      method rtk:didUpdateRTKConnectionStateWithBaseStationReferenceSource:connectedBaseStation
      @optional
      - (void)rtk:(DJIRTK *_Nonnull)rtk didUpdateRTKConnectionStateWithBaseStationReferenceSource:(DJIRTKConnectionStateWithBaseStationReferenceSource)state connectedBaseStation:(DJIRTKBaseStationInformation *_Nullable)information
      Header:DJIRTK.h
      Description:

      Updates RTK connection state and connected base station information. Aircraft will try to connect to the base station connected last time after it restarts. Stops to reconnect after 10 seconds. If current connection state is DJIRTKConnectionStateWithBaseStationReferenceSourceAircraftRTKScanning or DJIRTKConnectionStateWithBaseStationReferenceSourceAircraftRTKIdle, this method still updates the base station information connected last time. Only can be used when current DJIRTKReferenceStationSource is DJIRTKReferenceStationSourceBaseStation. It is supported only by Matrice 300 RTK.

      Input Parameters:
      DJIRTK *_Nonnull rtkInstance of the RTK.
      DJIRTKConnectionStateWithBaseStationReferenceSource stateAn enum value of DJIRTKConnectionStateWithBaseStationReferenceSource.
      DJIRTKBaseStationInformation *_Nullable informationBase station connection information.
      enum DJIRTKDataSource
      typedef NS_ENUM (uint8_t, DJIRTKDataSource)
      Header:DJIRTKServcieBaseTypes.h
      Description:

      This enum defines the data source (either GPS or RTK) of a recorded location, e.g. home point. Only support by Phantom 4 RTK.

      Enum Members:
      DJIRTKDataSourceGPSThe location coordinate is from GPS.
      DJIRTKDataSourceRTKThe location coordinate is from RTK.
      DJIRTKDataSourceUnknownData source is unknown.
      enum DJIRTKNetworkServiceCoordinateSystem
      typedef NS_ENUM(uint8_t, DJIRTKNetworkServiceCoordinateSystem)
      Header:DJIRTKServcieBaseTypes.h
      Description:

      Coordinate System for Network RTK. It is supported by Phantom 4 RTK.

      Enum Members:
      DJIRTKNetworkServiceCoordinateSystemWGS84The coordinate system is World Geodetic System 1984.
      DJIRTKNetworkServiceCoordinateSystemCGCS2000The coordinate system is China Geodetic Coordinate System 2000.
      DJIRTKNetworkServiceCoordinateSystemUnknownThe coordinate system is unknown.
      enum DJIRTKNetworkServiceAccountState
      typedef NS_ENUM(uint8_t, DJIRTKNetworkServiceAccountState)
      Header:DJIRTKServcieBaseTypes.h
      Description:

      All the possible state of DJIRTKNetworkServiceCoordinateSystem. It is supported by Phantom 4 RTK.

      Enum Members:
      DJIRTKNetworkServiceAccountStateNotPurchasedNetwork RTK service is not purchased.
      DJIRTKNetworkServiceAccountStateUnboundDevice is not bound.
      DJIRTKNetworkServiceAccountStateBoundDevice is bound.
      DJIRTKNetworkServiceAccountStateUnknownNetwork RTK service account state is unknown.
      enum DJIRTKNetworkServicePlanType
      typedef NS_ENUM(NSUInteger, DJIRTKNetworkServicePlanType)
      Header:DJIRTKServcieBaseTypes.h
      Description:

      Network RTK service plan type.

      Enum Members:
      DJIRTKNetworkServicePlanTypeAPlan type A.
      DJIRTKNetworkServicePlanTypeBPlan type B.
      DJIRTKNetworkServicePlanTypeUnknownUnknown Plan type.
      enum DJIRTKNetworkServicePlanState
      typedef NS_ENUM(NSUInteger, DJIRTKNetworkServicePlanState)
      Header:DJIRTKServcieBaseTypes.h
      Description:

      Network RTK Service Plan's State.

      Enum Members:
      DJIRTKNetworkServicePlanStateUnactivatedThe plan has not activated.
      DJIRTKNetworkServicePlanStateActivatedThe plan has activated.
      DJIRTKNetworkServicePlanStateExpiredThe plan has Expired.
      DJIRTKNetworkServicePlanStateUnknownThe plan state is unknown.
      enum DJIRTKReferenceStationSource
      typedef NS_ENUM(uint8_t, DJIRTKReferenceStationSource)
      Header:DJIRTKServcieBaseTypes.h
      Description:

      All the possible state of DJIRTKReferenceStationSource.

      Enum Members:
      DJIRTKReferenceStationSourceBaseStationRTK is using the D-RTK 2 base station as the reference station. It is supported by Phantom 4 RTK, P4 Multispectral and Matrice 300 RTK.
      DJIRTKReferenceStationSourceCustomNetworkServiceRTK is using third-party network service as the reference station. The network service should use NTRIP(Networked Transport of RTCM via Internet Protocol). It is supported by Phantom 4 RTK, P4 Multispectral, Matrice 210 RTK V2 and Matrice 300 RTK.
      DJIRTKReferenceStationSourceNetworkRTKDefault virtual reference station solution to provide cm level accurate position. The frame can be either WGS84 or CGCS 2000. Please note that this default solution can only be used in China. Please add the "DJINetworkRTKHelper.framework" ~> '2.0.2' to the project by using Cocoapods (https://cocoapods.org/pods/DJINetworkRTKHelper) to get the rtcm data. It is only supported by Phantom 4 RTK, P4 Multispectral and Matrice 300 RTK.
      DJIRTKReferenceStationSourceUnknownUnknown reference station source.
      enum DJIRTKHeadingSolution
      typedef NS_ENUM (uint8_t, DJIRTKHeadingSolution)
      Header:DJIRTKServcieBaseTypes.h
      Description:

      This enum defines the Heading solution currently being used. The heading solution describes the method used to determine heading. And Indicates the accuracy of the heading. It is supported by Phantom 4 RTK and Matrice 200 Series V2.

      Enum Members:
      DJIRTKHeadingSolutionNoneNo heading solution. This can be caused by an insufficient number of satellites in view, insufficient time to lock onto the satellites, or a loss in communication link between the mobile station and base station.
      DJIRTKHeadingSolutionSinglePointRTK point Heading.
      DJIRTKHeadingSolutionFloatFloat solution Heading.
      DJIRTKHeadingSolutionFixedPointFixed-point solution direction (most accurate).
      DJIRTKHeadingSolutionUnknownUnknown.
      State Updates
      property
      property delegate
      @property(nonatomic, weak) id<DJIRTKDelegate> delegate
      Header:DJIRTK.h
      Description:

      DJI RTK delegate.

      See Also:

      DJIRTKDelegate

      method setPPKModeEnabled:withCompletion
      - (void)setPPKModeEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion
      Header:DJIRTK.h
      Description:

      In PPK mode, the camera will automatically create a folder before the next photo taking, and start to record PPK data. The camera will not store the data in the created folder until PPK mode disabled. To use this interface, you must insert SD card and set camera mode to photo mode. Only supported by Phantom 4 RTK.

      Input Parameters:
      BOOL enabledYES to enable PPK mode.
      DJICompletionBlock completionThe completion block that receives the execution result.
      method getPPKModeEnabledWithCompletion
      - (void)getPPKModeEnabledWithCompletion:(void (^)(BOOL enabled, NSError *_Nullable error))completion
      Header:DJIRTK.h
      Description:

      Gets the PPK mode status. Only supported by Phantom 4 RTK.

      Input Parameters:
      BOOL enabledYES if PPK mode is enabled.
      void (^)(BOOL enabled, NSError *_Nullable error) completionThe completion block that receives the execution result.
      Is Connected
      property
      property isConnected
      @property(nonatomic, readonly) BOOL isConnected
      Header:DJIRTK.h
      Description:

      YES if RTK is connected to the aircraft.

      Set Enabled
      method
      method setEnabled:withCompletion
      - (void)setEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion
      Header:DJIRTK.h
      Description:

      Enables RTK positioning. Disable RTK when in poor signal environments, where incorrect positioning information might make controlling the aircraft difficult. Can only be set when the motors are off. It's supported by Matrice 210 RTK, Matrice 210 RTK V2 and Phantom 4 RTK.

      Input Parameters:
      BOOL enabledYES to enable RTK positioning.
      DJICompletionBlock completionCompletion block that receives setter result.
      Get Enabled
      method
      method getEnabledWithCompletion
      - (void)getEnabledWithCompletion:(void (^)(BOOL enabled, NSError *_Nullable error))completion
      Header:DJIRTK.h
      Description:

      Determines if RTK is enabled. Phantom 4 RTK has different behavior from the other products that supports RTK:
      - For aircrafts except Phantom 4 RTK, disabling RTK will stop RTK from pushing valid position.
      - For Phantom 4 RTK, RTK will continue to push latest RTK coordinate if there is strong satellite signal after disabling RTK. However, the flight controller will not use the RTK coordinate for navigation. It's supported by Matrice 210 RTK, Matrice 210 RTK V2 and Phantom 4 RTK.

      Input Parameters:
      BOOL enabledYES if RTK is enabled.
      NSError *_Nullable errorError occurs if there is any.
      void (^)(BOOL enabled, NSError *_Nullable error) completionThe completion block that receives the result.
      Set Reference Station Source
      method
      method setReferenceStationSource:withCompletion
      - (void)setReferenceStationSource:(DJIRTKReferenceStationSource)source withCompletion:(DJICompletionBlock)completion
      Header:DJIRTK.h
      Description:

      Sets the reference station source that provides real-time corrections for the RTK air system. It is only supported by Phantom 4 RTK. For Matrice 210 RTK, Matrice 600 series and Mavic 2 Enterprise Advanced, the reference station is always the physical base station.

      Input Parameters:
      DJIRTKReferenceStationSource sourceReference station source to set.
      DJICompletionBlock completionThe completion block that receives the result.
      Start Search Base Station
      method
      method startSearchBaseStationWithCompletion
      - (void)startSearchBaseStationWithCompletion:(DJICompletionBlock)completion
      Header:DJIRTK.h
      Description:

      Used to start searching for DJI base station that can be controlled with the Mobile SDK. Use rtk:didUpdateBaseStationsList to receive the product list. Searching will automatically stop after a base station is connected. Only can be used when current DJIRTKReferenceStationSource is DJIRTKReferenceStationSourceBaseStation. It is supported only by Matrice 300 RTK.

      Input Parameters:
      DJICompletionBlock completionThe completion block that receives the result.
      Stop Search Base Station
      method
      method stopSearchBaseStationWithCompletion
      - (void)stopSearchBaseStationWithCompletion:(DJICompletionBlock)completion
      Header:DJIRTK.h
      Description:

      Used to stop searching for DJI base station that can be controlled with the Mobile SDK. rtk:didUpdateBaseStationsList will stop to receive the product list. If searching is stopped without selecting a base station, the last connected base station will be reconnected. Only can be used when current DJIRTKReferenceStationSource is DJIRTKReferenceStationSourceBaseStation. It is supported only by Matrice 300 RTK.

      Input Parameters:
      DJICompletionBlock completionThe completion block that receives the result.
      Connect To Base Station
      method
      method connectToBaseStation:withCompletion
      - (void)connectToBaseStation:(NSUInteger)baseStationID withCompletion:(DJICompletionBlock)completion
      Header:DJIRTK.h
      Description:

      Choose a base station to connect by base station's ID. Only can be used when current DJIRTKReferenceStationSource is DJIRTKReferenceStationSourceBaseStation. It is supported only by Matrice 300 RTK.

      Input Parameters:
      NSUInteger baseStationIDThe base station's ID that chosen to be connected.
      DJICompletionBlock completionThe completion block that receives the result.
      RTK Maintain Positioning Accuracy Mode
      method
      method setRTKMaintainPositioningAccuracyModeEnabled:withCompletion
      - (void)setRTKMaintainPositioningAccuracyModeEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion
      Header:DJIRTK.h
      Description:

      Sets RTK maintain position accuracy mode enable. When enabled is TRUE`, the aircraft will maintain position accuracy about 10 minutes after losing RTK signal. Only supported by Phantom 4 RTK. When the aircraft is in Maintain Positioning Accuracy mode: 1. The aircraft positioning accuracy will decrease gradually. Be sure to fly with caution. Stop the flight or reconnect to the RTK signal source immediately to avoid flight hazards. 2. Flying the aircraft for a long distance (for example, automatically performing operations alongside the planned flight route), or controlling the aircraft with a large stick movement will lead to faster positioning accuracy decrease. 3. The RtkFlag of the images the aircraft captured is 16(Point Positioning), which cannot meet the requirements for mapping. It is not recommended to use Maintain Positioning Accuracy mode in flight route operations, especially in operations with an absolute altitude. This mode is more suitable for inspection or waypoint operations.

      Input Parameters:
      BOOL enabledYES to enable RTK maintain positioning accuracy mode.
      DJICompletionBlock completionThe completion block that receives the execution result.
      method getRTKMaintainPositioningAccuracyModeEnabled
      - (void)getRTKMaintainPositioningAccuracyModeEnabled:(void (^)(BOOL enabled, NSError *_Nullable error))completion
      Header:DJIRTK.h
      Description:

      Gets RTK maintain positioning accuracy mode status. Only supported by Phantom 4 RTK.

      Input Parameters:
      BOOL enabledYES if maintain position accurary mode is enabled.
      void (^)(BOOL enabled, NSError *_Nullable error) completionThe completion block that receives the execution result.


      Protocol Method

      method rtk:didUpdatePPKmodeState
      @optional
      - (void)rtk:(DJIRTK *_Nonnull)rtk didUpdatePPKmodeState:(DJIRTKPPKModeState)state
      Header:DJIRTK.h
      Description:

      Callback function that updates the PPK mode state. Only supported by Phantom 4 RTK.

      Input Parameters:
      DJIRTK *_Nonnull rtkInstance of the RTK.
      DJIRTKPPKModeState stateCurrent state of PPK mode.