DJI Mobile SDK Documentation

      class RTKState

      @EXClassNullAway
      final class RTKState
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.RTK_STATE
      Description:

      This class holds the state of the RTK system, including position, positioning solution, and receiver information. Receiver 1 is used for positioning. Receiver 2 is used for orienteering.

      Class Members:

      Use and Position

      method isRTKBeingUsed
      boolean isRTKBeingUsed()
      Package:dji.common.flightcontroller
      Description:

      Whether the RTK is being used.

      Return:
      booleanA boolean value.
      method getDistanceToHomePointDataSource
      DataSource getDistanceToHomePointDataSource()
      Package:dji.common.flightcontroller
      Description:

      Distance to home point data source. Only Supported by Phantom 4 RTK.

      Return:
      DataSourceAn enum value of DataSource.
      method isTakeoffAltitudeRecorded
      boolean isTakeoffAltitudeRecorded()
      Package:dji.common.flightcontroller
      Description:

      true if the altitude is recorded by the flight controller when the aircraft takes off. Only Supported by Phantom 4 RTK.

      Return:
      booleanA boolean value to check if take off altitude has been recorded.
      Data Source
      method
      method getHomePointDataSource
      DataSource getHomePointDataSource()
      Package:dji.common.flightcontroller
      Description:

      Home point data source. Only Supported by Phantom 4 RTK.

      Return:
      DataSourceAn enum value of getHomePointDataSource.
      Satellite Count
      method
      method getSatelliteCount
      int getSatelliteCount()
      Package:dji.common.flightcontroller
      Description:

      Gps or RTK satellite count. Only Supported by Phantom 4 RTK.

      Return:
      intSatellite count.
      Home Point Location
      method
      method getHomePointLocation
      LocationCoordinate2D getHomePointLocation()
      Package:dji.common.flightcontroller
      Description:

      Home point location. Only Supported by Phantom 4 RTK.

      Return:
      LocationCoordinate2DA LocationCoordinate2D object of the home point location.
      Take Off Altitude
      method
      method getTakeOffAltitude
      float getTakeOffAltitude()
      Package:dji.common.flightcontroller
      Description:

      Takeoff altitude. Only Supported by Phantom 4 RTK.

      Return:
      floatA float value of the takeoff altitude.
      Distance to Home Point
      method
      method getDistanceToHomePoint
      float getDistanceToHomePoint()
      Package:dji.common.flightcontroller
      Description:

      Distance to home point. Only Supported by Phantom 4 RTK.

      Return:
      floatA float value of the distance to home point.
      Positioning Solution
      method
      method getPositioningSolution
      PositioningSolution getPositioningSolution()
      Package:dji.common.flightcontroller
      Description:

      The positioning solution describes the method used to determine positioning. The solutions vary in accuracy, from NONE (no positioning) to FIXED_POINT.

      Return:
      PositioningSolutionAn enum value of PositioningSolution
      Error
      method
      method getError
      DJIError getError()
      Package:dji.common.flightcontroller
      Description:

      Gets RTK errors, if any. Returns null when RTK is normal.

      Return:
      DJIErrorAn instance of DJIError.
      Heading
      method
      method isHeadingValid
      boolean isHeadingValid()
      Package:dji.common.flightcontroller
      Description:

      true if heading value is valid. Heading is invalid when a satellite fix hasn't been obtained.

      Return:
      booleanA boolean value.
      method getHeading
      float getHeading()
      Package:dji.common.flightcontroller
      Description:

      Heading relative to True North as defined by the vector formed from Antenna 2 to Antenna 1 on the mobile station. Unit is degrees.

      Return:
      floatA float value.
      Heading Solution
      method
      method getHeadingSolution
      HeadingSolution getHeadingSolution()
      Package:dji.common.flightcontroller
      Description:

      The heading solution describes the method used to determine heading. The solutions vary in accuracy, from NONE (no heading) to FIXED_POINT. It's supported by Matrice 200 series V2 and Phantom 4 RTK.

      Return:
      HeadingSolutionAn enum value of getHeadingSolution.
      Mobile Station Position
      method
      method getMobileStationLocation
      LocationCoordinate2D getMobileStationLocation()
      Package:dji.common.flightcontroller
      Description:

      Always indicate RTK location data. Location information of the mobile station's receiver 1 antenna. This location information is relative to the base station's location and is in degrees when getPositioningSolution is FIXED_POINT.

      Return:
      LocationCoordinate2DAn instance of LocationCoordinate2D.
      method getMobileStationAltitude
      float getMobileStationAltitude()
      Package:dji.common.flightcontroller
      Description:

      Altitude of the mobile station's receiver 1 antenna relative, to the ground system location. Units are meters.

      Return:
      floatA float value.
      Mobile Station Deviation
      method
      method getMobileStationStandardDeviation
      LocationStandardDeviation getMobileStationStandardDeviation()
      Package:dji.common.flightcontroller
      Description:

      Standard deviation of location accuracy in meters. Returns null when the aircraft receives no signal. Only Supported by Phantom 4 RTK.

      Return:
      LocationStandardDeviationA LocationStandardDeviation object of the mobile station standard deviation.
      Mobile Station Fusion Location
      method
      method getFusionMobileStationLocation
      LocationCoordinate2D getFusionMobileStationLocation()
      Package:dji.common.flightcontroller
      Description:

      The fusion location of the mobile station (in degrees). It is the combination of GPS and RTK. The flight controller uses this location for navigation (e.g. waypoint mission) when RTK is available.

      Return:
      LocationCoordinate2DAn instance of LocationCoordinate2D.
      Mobile Station Fusion Altitude
      method
      method getFusionMobileStationAltitude
      float getFusionMobileStationAltitude()
      Package:dji.common.flightcontroller
      Description:

      The fusion altitude of the mobile station. The flight controller fuses the data from GPS, RTK and the barometer. The flight controller uses this altitude for navigation (e.g. waypoint mission) when RTK is available.

      Return:
      floatA float value.
      Mobile Station Fusion Heading
      method
      method getFusionHeading
      float getFusionHeading()
      Package:dji.common.flightcontroller
      Description:

      The fusion heading of the mobile station. It is the combination of RTK and the compass. The flight controller uses this heading for navigation (e.g. waypoint mission) when RTK is available.

      Return:
      floatA float value.
      Base Station Position
      method
      method getBaseStationLocation
      LocationCoordinate2D getBaseStationLocation()
      Package:dji.common.flightcontroller
      Description:

      Base station's location coordinates, in degrees.

      Return:
      LocationCoordinate2DAn instance of LocationCoordinate2D.
      method getBaseStationAltitude
      float getBaseStationAltitude()
      Package:dji.common.flightcontroller
      Description:

      Altitude of the base station above sea level, in meters.

      Return:
      floatA float value.


      Satellite Information

      method getMobileStationReceiver1GPSInfo
      ReceiverInfo getMobileStationReceiver1GPSInfo()
      Package:dji.common.flightcontroller
      Description:

      Mobile station (aircraft) receiver 1 GPS info.

      Return:
      ReceiverInfoAn instance of ReceiverInfo
      method getMobileStationReceiver1BeiDouInfo
      ReceiverInfo getMobileStationReceiver1BeiDouInfo()
      Package:dji.common.flightcontroller
      Description:

      Mobile station (aircraft) receiver 1 BeiDou info.

      Return:
      ReceiverInfoAn instance of ReceiverInfo
      method getMobileStationReceiver1GLONASSInfo
      ReceiverInfo getMobileStationReceiver1GLONASSInfo()
      Package:dji.common.flightcontroller
      Description:

      Mobile station (aircraft) receiver 1 GLONASS info.

      Return:
      ReceiverInfoAn instance of ReceiverInfo
      method getMobileStationReceiver1GalileoInfo
      ReceiverInfo getMobileStationReceiver1GalileoInfo()
      Package:dji.common.flightcontroller
      Description:

      Mobile station (aircraft) receiver 1 Galileo info. Only Supported by Phantom 4 RTK.

      Return:
      ReceiverInfoAn instance of ReceiverInfo
      method getMobileStationReceiver2GPSInfo
      ReceiverInfo getMobileStationReceiver2GPSInfo()
      Package:dji.common.flightcontroller
      Description:

      Mobile station (aircraft) receiver 2 GPS info.

      Return:
      ReceiverInfoAn instance of ReceiverInfo
      method getMobileStationReceiver2BeiDouInfo
      ReceiverInfo getMobileStationReceiver2BeiDouInfo()
      Package:dji.common.flightcontroller
      Description:

      Mobile station (aircraft) receiver 2 BeiDou info.

      Return:
      ReceiverInfoAn instance of ReceiverInfo.
      method getMobileStationReceiver2GLONASSInfo
      ReceiverInfo getMobileStationReceiver2GLONASSInfo()
      Package:dji.common.flightcontroller
      Description:

      Mobile station (aircraft) receiver 2 GLONASS info.

      Return:
      ReceiverInfoAn instance of ReceiverInfo.
      method getMobileStationReceiver2GalileoInfo
      ReceiverInfo getMobileStationReceiver2GalileoInfo()
      Package:dji.common.flightcontroller
      Description:

      Mobile station (aircraft) receiver 2 Galileo info. Only Supported by Phantom 4 RTK.

      Return:
      ReceiverInfoAn instance of ReceiverInfo.
      method getBaseStationReceiverGPSInfo
      ReceiverInfo getBaseStationReceiverGPSInfo()
      Package:dji.common.flightcontroller
      Description:

      Base station receiver GPS info.

      Return:
      ReceiverInfoAn instance of ReceiverInfo
      method getBaseStationReceiverBeiDouInfo
      ReceiverInfo getBaseStationReceiverBeiDouInfo()
      Package:dji.common.flightcontroller
      Description:

      Base station receiver BeiDou info.

      Return:
      ReceiverInfoAn instance of ReceiverInfo.
      method getBaseStationReceiverGLONASSInfo
      ReceiverInfo getBaseStationReceiverGLONASSInfo()
      Package:dji.common.flightcontroller
      Description:

      Base station receiver GLONASS info.

      Return:
      ReceiverInfoAn instance of ReceiverInfo.
      method getBaseStationReceiverGalileoInfo
      ReceiverInfo getBaseStationReceiverGalileoInfo()
      Package:dji.common.flightcontroller
      Description:

      Base station receiver Galileo info. Only Supported by Phantom 4 RTK.

      Return:
      ReceiverInfoAn instance of ReceiverInfo.


      interface
      interface Callback
      interface Callback
      Package:dji.common.flightcontroller
      Description:

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

      Interface Methods:
      method
      method onUpdate
      void onUpdate(@NonNull RTKState state)
      Package:dji.common.flightcontroller
      Description:

      Callback function that updates the RTK state data.

      Input Parameters:
      @NonNull RTKState stateCurrent state of the RTK.
      enum PositioningSolution
      @EXClassNullAway
      enum PositioningSolution
      Package:dji.common.flightcontroller
      Description:

      This enum defines the positioning solution currently being used.

      Enum Members:
      NONENo positioning 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 positioning.
      FLOATFloat solution positioning.
      FIXED_POINTFixed-point solution positioning (most accurate).
      UNKNOWNUnknown.
      Class Members: