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

      method setRTKEnabled:withCompletion
      - (void)setRTKEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion
      Header:DJIRTK.h
      SDK Key:DJIFlightControllerKey.DJIFlightControllerParamRTKEnabled
      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.

      Input Parameters:
      BOOL enabledYES to enable RTK positioning.
      DJICompletionBlock completionCompletion block that receives setter result.
      property
      property isConnected
      @property(nonatomic, readonly) BOOL isConnected
      Header:DJIRTK.h
      Description:

      YES if RTK is connected to the aircraft.

      Get RTK Enabled
      method
      method getRTKEnabledWithCompletion
      - (void)getRTKEnabledWithCompletion:(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.

      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.
      method getRTKBaseStationReferencingPositionWithCompletion
      - (void)getRTKBaseStationReferencingPositionWithCompletion:(void (^_Nonnull)(CLLocation *_Nullable location, NSError *_Nullable error))completion
      Header:DJIRTK.h
      Description:

      Gets the referencing position manually configured to the base station. When a user can get a more accurate position (coordinate with less absolute error) of the base station by using external tools, the accurate position can be set to the base station to improve the accuracy of the aircraft location. If the offset between the referencing position and the location detected by the base station is larger than 5 meters, the base station will ignore the referencing position. It is only supported by Phantom 4 RTK.

      Input Parameters:
      CLLocation *_Nullable locationThe referencing position of the base station.
      NSError *_Nullable errorError if there is any.
      void (^_Nonnull)(CLLocation *_Nullable location, NSError *_Nullable error) completionCompletion block that receives the execution result.
      method setRTKBaseStationReferencingPosition:withCompletion
      - (void)setRTKBaseStationReferencingPosition:(CLLocation *)location withCompletion:(DJICompletionBlock)completion
      Header:DJIRTK.h
      Description:

      Sets the referencing position of the base station to improve the accuracy. When a user can get a more accurate position (coordinate with less absolute error) of the base station by using external tools, the accurate position can be set to the base station to improve the accuracy of the aircraft location. If the offset between the referencing position and the location detected by the base station is larger than 5 meters, the base station will ignore the referencing position. Also, the location to be set should be within a 50 meters radius of current base station's location. It is only supported by Phantom 4 RTK.

      Input Parameters:
      CLLocation * locationThe referencing position of the base station.
      DJICompletionBlock completionCompletion block that receives the execution 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:didUpdateBaseStationBatteryState
      @optional
      - (void)rtk:(DJIRTK *_Nonnull)rtk didUpdateBaseStationBatteryState:(DJIRTKBaseStationBatteryState *)state
      Header:DJIRTK.h
      Description:

      Callback function that updates the RTK base station battery state. Only Supported by Phantom 4 RTK.

      Input Parameters:
      DJIRTK *_Nonnull rtkInstance of the RTK.
      DJIRTKBaseStationBatteryState * stateBase station battery State.
      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:DJIRTK.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 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.
      DJIRTKReferenceStationSourceCustomNetworkServiceRTK is using third-party network service as the reference station. The network service should use NTRIP(Networked Transport of RTCM via Internet Protocol).
      DJIRTKReferenceStationSourceUnknownUnknown reference station source.