DJI Mobile SDK Documentation

      class DJIRTK

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

      Real Time Kinematic

      Class Members:
      State Updates
      property
      property delegate
      @property(nonatomic, weak) id<DJIRTKDelegate> delegate
      Header:DJIRTK.h
      Description:

      DJI RTK delegate.

      See Also:

      DJIRTKDelegate

      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 and Matrice 600 series, 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.
      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.
      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. It is only supported by Phantom 4 RTK and Matrice 210 RTK V2.

      Enum Members:
      DJIRTKReferenceStationSourceBaseStationRTK is using the D-RTK 2 base station as the reference station.
      DJIRTKReferenceStationSourceCustomNetworkServiceRTK is using third-party network service as the reference station. The network service should use NTRIP(Networked Transport of RTCM via Internet Protocol).
      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" to the project by using Cocoapods (https://cocoapods.org/pods/DJINetworkRTKHelper) to get the rtcm data. It is only supported by Phantom 4 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.