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

      Maintain Position Accuracy
      method
      method isMaintainingPositionAccuracy
      boolean isMaintainingPositionAccuracy()
      Package:dji.common.flightcontroller
      Description:

      Whether aircraft is maintaining position accuracy after losing RTK signal. If return true, the aircraft will maintain position accuracy about 10 minutes after losing RTK signal.

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

      It will be true when the positioning solution is fixed and the RTK location data received period is between 2 seconds. The flight controller will use RTK data when isRTKBeingUsed is true.

      Return:
      booleanA boolean value.
      Mobile Station Satellite Count
      method
      method getMobileStation1SatelliteCount
      int getMobileStation1SatelliteCount()
      Package:dji.common.flightcontroller
      Description:

      Get the total number of satellites from Mobile station (aircraft) receiver 1.

      Return:
      intAn int value.
      method getMobileStation2SatelliteCount
      int getMobileStation2SatelliteCount()
      Package:dji.common.flightcontroller
      Description:

      Get the total number of satellites from Mobile station (aircraft) receiver 2.

      Return:
      intAn int value.
      property distanceToHomePointDataSource
      @Nullable public DataSource getDistanceToHomePointDataSource() {
      return distanceToHomePointDataSource
      Package:dji.common.flightcontroller
      Description:

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

      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
      property
      property homePointDataSource
      @Nullable public DataSource getHomePointDataSource() {
      return homePointDataSource
      Package:dji.common.flightcontroller
      Description:

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

      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
      property
      property homePointLocation
      @Nullable public LocationCoordinate2D getHomePointLocation() {
      return homePointLocation
      Package:dji.common.flightcontroller
      Description:

      Home point location. Only Supported by Phantom 4 RTK.

      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.
      Ellipsoid height
      method
      method getEllipsoidHeight
      float getEllipsoidHeight()
      Package:dji.common.flightcontroller
      Description:

      Ellipsoid height. An absolute altitude above sea level read from GPS. Only Supported by Matrice 300 RTK.

      Return:
      floatA float value of the ellipsoid height.
      Aircraft altitude
      method
      method getAircraftAltitude
      float getAircraftAltitude()
      Package:dji.common.flightcontroller
      Description:

      Aircraft altitude. Aircraft's absolute altitude above sea level. When RTK is used and valid, this value will be a fusion RTK altitude. Otherwise, it is a fusion barometer altitude. Supported by Matrice 300 RTK, Phantom 4 RTK and P4 Multispectral.

      Return:
      floatA float value of the aircraft altitude.
      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.


      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: