DJI Mobile SDK Documentation

      class FlightControllerState

      @EXClassNullAway
      class FlightControllerState
      Package:dji.common.flightcontroller
      Description:

      This class represents the current state of the flight controller.

      Class Members:

      State Updates

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

      Callback function that updates the flight controller's current state data. This method gets called 10 times per second after startUpdatingFlightControllerCurrentState is called.

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

      Called when the flight controller's current state data has been updated. This method is called 10 times per second.

      Input Parameters:
      @NonNull FlightControllerState stateCurrent state of the flight controller.


      Flight Mode

      method getFlightModeString
      String getFlightModeString()
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.FLIGHT_MODE_STRING
      Description:

      Gets the flight mode as a string.

      Return:
      StringThe flight mode as a string. For example, "P-GPS" or "P-Atti".


      Sensors

      method getGPSSignalLevel
      GPSSignalLevel getGPSSignalLevel()
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.GPS_SIGNAL_LEVEL
      Description:

      Gets the aircraft's current GPS signal quality.

      Return:
      GPSSignalLevelThe aircraft's current GPS signal quality.
      Ultrasonic Sensor
      method
      method isUltrasonicBeingUsed
      boolean isUltrasonicBeingUsed()
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.IS_ULTRASONIC_BEING_USED
      Description:

      true if the ultrasonic sensor is being used. Variables that can impact the quality of the ultrasound measurement, or whether it's being used, are height above ground and the type of ground (if it reflects sound waves well). Usually, the ultrasonic sensor works when the aircraft is less than 8m above ground.

      Return:
      booleanA boolean value.
      method doesUltrasonicHaveError
      boolean doesUltrasonicHaveError()
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.ULTRASONIC_ERROR
      Description:

      true if ultrasonic sensor has error.

      Return:
      booleantrue if ultrasonic sensor has error.


      Home

      Go Home Assessment
      method
      method getGoHomeAssessment
      GoHomeAssessment getGoHomeAssessment()
      Package:dji.common.flightcontroller
      Description:

      Gets the aircraft's smart go home data. If smart go home is enabled, all the smart go home data will be available in GoHomeAssessment.

      Return:
      GoHomeAssessmentAn instance of GoHomeAssessment.
      Go Home State
      method
      method getGoHomeExecutionState
      GoHomeExecutionState getGoHomeExecutionState()
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.GO_HOME_STATUS
      Description:

      The current status of go-home execution.

      Return:
      GoHomeExecutionStateAn enum value of GoHomeExecutionState.
      method isGoingHome
      boolean isGoingHome()
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.IS_GOING_HOME
      Description:

      true if the aircraft is going home.

      Return:
      booleanA boolean value.


      enum BatteryThresholdBehavior
      @EXClassNullAway
      enum BatteryThresholdBehavior
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.BATTERY_THRESHOLD_BEHAVIOR
      Description:

      Remaining battery life state. This state describes the recommended action based on remaining battery life.

      Enum Members:
      FLY_NORMALLYRemaining battery life sufficient for normal flying.
      GO_HOMERemaining battery life sufficient to go home.
      LAND_IMMEDIATELYRemaining battery life sufficient to land immediately.
      UNKNOWNUnknown.
      Class Members:
      enum GoHomeExecutionState
      @EXClassNullAway
      enum GoHomeExecutionState
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.GO_HOME_STATUS
      Description:

      An enum used to identify the different stages of the go-home command.

      Enum Members:
      NOT_EXECUTINGThe aircraft is not executing a Go-Home command.
      TURN_DIRECTION_TO_HOME_POINTThe aircraft is turning the heading direction to the home point.
      GO_UP_TO_HEIGHTThe aircraft is going up to the height for go-home command.
      AUTO_FLY_TO_HOME_POINTThe aircraft is flying horizontally to home point.
      GO_DOWN_TO_GROUNDThe aircraft is going down after arriving at the home point.
      BRAKINGThe aircraft is braking to avoid collision.
      BYPASSINGThe aircraft is bypassing over the obstacle.
      COMPLETEDThe go-home command is completed.
      UNKNOWNThe go-home status is unknown.
      Class Members:
      enum GPSSignalLevel
      @EXClassNullAway
      enum GPSSignalLevel
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.GPS_SIGNAL_LEVEL
      Description:

      A enum class representing GPS signal levels, which are used to measure the signal quality.

      Enum Members:
      LEVEL_0The GPS has almost no signal, which is very bad.
      LEVEL_1The GPS signal is very weak.
      LEVEL_2The GPS signal is weak. At this level, the aircraft's go home functionality will still work.
      LEVEL_3The GPS signal is good. At this level, the aircraft can hover in the air.
      LEVEL_4The GPS signal is very good. At this level, the aircraft can record the home point.
      LEVEL_5The GPS signal is very strong.
      NONEThere is no GPS signal.
      Class Members:
      enum FlightMode
      @EXClassNullAway
      enum FlightMode
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.FLIGHT_MODE
      Description:

      Flight controller flight modes. For more information, see http://wiki.dji.com/en/index.php/Phantom_3_Professional-Aircraft.

      Enum Members:
      MANUALManual mode.
      ATTIAttitude mode.
      ATTI_COURSE_LOCKAttitude course lock mode.
      GPS_ATTIGPS Attitude mode.
      GPS_COURSE_LOCKGPS course lock mode.
      GPS_HOME_LOCKGPS Home mode.
      GPS_HOT_POINTGPS hotpoint mode.
      ASSISTED_TAKEOFFAssisted takeoff mode.
      AUTO_TAKEOFFAuto takeoff mode.
      AUTO_LANDINGAuto landing mode.
      GPS_WAYPOINTGPS waypoint mode.
      GO_HOMEGo home mode.
      JOYSTICKJoystick mode.
      GPS_ATTI_WRISTBANDAttitude limited mode.
      DRAWDraw mode.
      GPS_FOLLOW_MEGPS follow me mode.
      ACTIVE_TRACKActiveTrack mode.
      TAP_FLYTapFly mode.
      GPS_SPORTSport mode.
      GPS_NOVICEGPS Novice mode.
      UNKNOWNThe main controller flight mode is unknown.
      CONFIRM_LANDINGConfirm landing mode.
      TERRAIN_FOLLOWThe aircraft should move following the terrain.
      TRIPODTripod mode.
      TRACK_SPOTLIGHTActive track mode, corresponds to Spotlight active track mode.
      MOTORS_JUST_STARTEDThe motors are just started.
      Class Members: