DJI Mobile SDK Documentation

      class RTK

      class RTK implements DJIParamAccessListener
      Package:dji.sdk.flightcontroller
      Description:

      Real Time Kinematic

      Class Members:
      enum RTKConnectionStateWithBaseStationReferenceSource
      enum RTKConnectionStateWithBaseStationReferenceSource
      Package:dji.common.flightcontroller.rtk
      Description:

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

      Enum Members:
      IDLEAircraft RTK is in idle state.
      SCANNINGAircraft is scanning all base stations that are possible to be connected.
      CONNECTINGThe aircraft is connecting with the base station.
      CONNECTEDThe aircraft is connected with the base station.
      DISCONNECTEDThe aircraft is disconnected from the base station.
      UNKNOWNUnknown base station location connection state.
      Class Members:
      enum PPKModeState
      enum PPKModeState
      Package:dji.common.rtk
      Description:

      PPK mode status.

      Enum Members:
      IDLEPPK Mode is idle.
      RUNNINGPPK Mode is running.
      UNKNOWNUnknown error.
      Class Members:
      enum DataSource
      enum DataSource
      Package:dji.common.flightcontroller.rtk
      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:
      GPSThe location coordinate is from GPS.
      RTKThe location coordinate is from RTK.
      UNKNOWNData source is unknown.
      Class Members:
      enum CoordinateSystem
      enum CoordinateSystem
      Package:dji.common.flightcontroller.rtk
      Description:

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

      Enum Members:
      WGS84The coordinate system is World Geodetic System 1984.
      CGCS2000The coordinate system is China Geodetic Coordinate System 2000.
      UNKNOWNThe coordinate system is unknown.
      Class Members:
      enum NetworkServiceAccountState
      enum NetworkServiceAccountState
      Package:dji.common.flightcontroller.rtk
      Description:

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

      Enum Members:
      NOT_PURCHASEDNetwork RTK service is not purchased.
      UNBOUNDDevice is not bound.
      BOUNDDevice is bound.
      UNKNOWNNetwork RTK service account state is unknown.
      Class Members:
      enum NetworkServicePlanType
      enum NetworkServicePlanType
      Package:dji.common.flightcontroller.rtk
      Description:

      Network RTK service plan type.

      Enum Members:
      APlan type A.
      BPlan type B.
      UNKNOWNUnknown Plan type.
      Class Members:
      enum NetworkServicePlanState
      enum NetworkServicePlanState
      Package:dji.common.flightcontroller.rtk
      Description:

      Network RTK Service Plan's State.

      Enum Members:
      UNACTIVATEDThe plan has not activated.
      ACTIVATEDThe plan has activated.
      EXPIREDThe plan has Expired.
      UNKNOWNThe plan state is unknown.
      Class Members:
      enum ReferenceStationSource
      enum ReferenceStationSource
      Package:dji.common.flightcontroller.rtk
      Description:

      All the possible state of ReferenceStationSource.

      Enum Members:
      NONENot using any reference station source.
      BASE_STATIONRTK 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.
      CUSTOM_NETWORK_SERVICERTK 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.
      NETWORK_RTKDefault 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" to the project via gradle:
      implementation 'com.dji:library-networkrtk-helper:2.0.2'. It is only supported by Matrice 300 RTK and Matrice 350 RTK.
      NTRIP_NETWORK_SERVICENtrip network service which is used for CMCC network RTK service. It is only supported Matrice 300 RTK and Matrice 350 RTK.
      UNKNOWNUnknown reference station source.
      Class Members:
      State Updates
      class
      enum HeadingSolution
      @EXClassNullAway
      enum HeadingSolution
      Package:dji.common.flightcontroller
      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 getHeading. It is supported by Phantom 4 RTK and Matrice 200 Series V2.

      Enum Members:
      NONENo 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.
      SINGLE_POINTRTK point Heading.
      FLOATFloat solution Heading.
      FIXED_POINTFixed-point solution direction (most accurate).
      UNKNOWNUnknown.
      Class Members:
      State Updates
      method
      method setStateCallback
      void setStateCallback(@Nullable RTKState.Callback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Set RTK state update callback.

      Input Parameters:
      @Nullable RTKState.Callback callbackThe execution callback with the execution result returned.
      method addReferenceStationSourceCallback
      void addReferenceStationSourceCallback(@NonNull ReferenceStationSource.Callback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Adds a listener to receive the reference station source.

      Input Parameters:
      @NonNull ReferenceStationSource.Callback callbackCallback to receive reference station source.
      method removeReferenceStationSourceCallback
      void removeReferenceStationSourceCallback(@NonNull ReferenceStationSource.Callback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Removes a listener that receives the reference station source.

      Input Parameters:
      @NonNull ReferenceStationSource.Callback callbackCallback to receive reference station source.
      method setRtkBaseStationListCallback
      void setRtkBaseStationListCallback(@Nullable RTKBaseStationListCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Sets RTK base station scanned information update rtkBaseStationListCallback.

      Input Parameters:
      @Nullable RTKBaseStationListCallback callbackCallback to receive the information of rtk base station scanned.
      method setRtkConnectionStateWithBaseStationCallback
      void setRtkConnectionStateWithBaseStationCallback(RTKConnectionStateWithBaseStationReferenceSourceCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Set RTK base station connection state and information update rtkBaseStationConnectionInformationCallback.

      Input Parameters:
      RTKConnectionStateWithBaseStationReferenceSourceCallback callbackCallback to receive the information of the connection between RTK and base station.
      method setPPKModeStateListener
      void setPPKModeStateListener(CommonCallbacks.CompletionCallbackWith<PPKModeState> callback)
      Package:dji.sdk.flightcontroller
      Description:

      Set listener for the PPK mode which is used to listen the status changes. Only supported by Phantom 4 RTK.

      Input Parameters:
      CommonCallbacks.CompletionCallbackWith<PPKModeState> callbackThe execution callback with the execution result returned.
      method setPPKModeEnabled
      void setPPKModeEnabled(boolean enable, @Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      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:
      SOURCE_DIFFERENT enabledtrue to enable PPK mode.
      @Nullable final CompletionCallback callbackThe execution callback with the execution result returned.
      method getPPKModeEnabled
      void getPPKModeEnabled(@Nullable final CommonCallbacks.CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      Description:

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

      Input Parameters:
      @Nullable final CommonCallbacks.CompletionCallbackWith<Boolean> callbackThe execution callback with the execution result returned.
      RTK Enabled
      method
      method setRtkEnabled
      void setRtkEnabled(boolean enabled, @Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      SDK Key:FlightControllerKey.RTK_ENABLED
      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:
      boolean enabledtrue to enable RTK positioning.
      @Nullable final CompletionCallback callbackThe execution callback with the execution result returned.
      Is Connected
      method
      method isConnected
      boolean isConnected()
      Package:dji.sdk.flightcontroller
      Description:

      true if RTK is connected to the aircraft.

      Return:
      booleanA boolean value.
      Get RTK Enabled
      method
      method getRtkEnabled
      void getRtkEnabled(@NonNull final CommonCallbacks.CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      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:
      @NonNull final CommonCallbacks.CompletionCallbackWith<Boolean> callbackThe completion block that receives the result.
      Set Reference Station Source
      method
      method setReferenceStationSource
      void setReferenceStationSource(@NonNull final ReferenceStationSource source, @Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      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:
      @NonNull final ReferenceStationSource sourceReference station source to set.
      @Nullable final CompletionCallback callbackThe completion block that receives the result.
      Start Search Base Station
      method
      method startSearchBaseStation
      void startSearchBaseStation(@Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Used to start searching for DJI base station that can be controlled with the Mobile SDK. Searching will automatically stop after a base station is connected. Only can be used when current ReferenceStationSource is BASE_STATION. It is supported only by Matrice 300 RTK.

      Input Parameters:
      @Nullable final CompletionCallback callbackThe completion block that receives the result.
      Stop Search Base Station
      method
      method stopSearchBaseStation
      void stopSearchBaseStation(@Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

      Used to stop searching for DJI base station that can be controlled with the Mobile SDK. If searching is stopped without selecting a base station, the last connected base station will be reconnected. Only can be used when current ReferenceStationSource is BASE_STATION. It is supported only by Matrice 300 RTK.

      Input Parameters:
      @Nullable final CompletionCallback callbackThe completion block that receives the result.
      Connect To Base Station
      method
      method connectToBaseStation
      void connectToBaseStation(long baseStationID, @Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      Description:

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

      Input Parameters:
      long baseStationIDThe base station's ID that chosen to be connected.
      @Nullable final CompletionCallback callbackThe completion block that receives the result.
      RTK Maintain Positioning Accuracy Mode
      method
      method setRTKMaintainPositioningAccuracyModeEnabled
      void setRTKMaintainPositioningAccuracyModeEnabled(boolean enabled, @Nullable final CompletionCallback callback)
      Package:dji.sdk.flightcontroller
      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:
      boolean enabledtrue to enable RTK maintain positioning accuracy mode.
      @Nullable final CompletionCallback callbackThe execution callback with the returned execution result.
      method getRTKMaintainPositioningAccuracyModeEnabled
      void getRTKMaintainPositioningAccuracyModeEnabled(@Nullable final CommonCallbacks.CompletionCallbackWith<Boolean> callback)
      Package:dji.sdk.flightcontroller
      Description:

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

      Input Parameters:
      @Nullable final CommonCallbacks.CompletionCallbackWith<Boolean> callbackThe execution callback with the returned value(s).