DJI Mobile SDK Documentation

      class IMUState

      @EXClassNullAway
      class IMUState
      Package:dji.common.flightcontroller.imu
      SDK Key:FlightControllerKey.IMU_STATE
      Description:

      This class provides the inertial measurement unit's (IMU) state information.

      Class Members:
      Information
      method
      method getIndex
      int getIndex()
      Package:dji.common.flightcontroller.imu
      Description:

      The IMU's ID. Starts at 0.

      Return:
      intAn int value.
      Sensor
      method
      method getGyroscopeState
      SensorState getGyroscopeState()
      Package:dji.common.flightcontroller.imu
      SDK Key:IMU_STATE_GYROSCOPE_STATE
      Description:

      Returns the gyroscopic sensor's state value.

      Return:
      SensorStateAn enum value of SensorState
      method getAccelerometerState
      SensorState getAccelerometerState()
      Package:dji.common.flightcontroller.imu
      SDK Key:IMU_STATE_ACCELEROMETER_STATE
      Description:

      Returns the accelerometers sensor state value.

      Return:
      SensorStateAn enum value of SensorState
      Calibration
      method
      method getCalibrationProgress
      int getCalibrationProgress()
      Package:dji.common.flightcontroller.imu
      SDK Key:IMU_STATE_CALIBRATION_PROGRESS
      Description:

      Returns the IMU's calibration progress, its range being [1, 100]. If the IMU is not calibrating, the value of the calibration progress will be -1.

      Return:
      intAn int value.
      method getCalibrationState
      CalibrationState getCalibrationState()
      Package:dji.common.flightcontroller.imu
      Description:

      Returns the status of the IMU's calibration.

      Return:
      CalibrationStateAn enum value of CalibrationState
      method getMultipleOrientationCalibrationHint
      MultipleOrientationCalibrationHint getMultipleOrientationCalibrationHint()
      Package:dji.common.flightcontroller.imu
      Description:

      For products that require the user to orient the aircraft during the IMU calibration, this method can be used to inform the user when each orientation is done. It is supported by flight controller firmware 3.2.0.0 or above.

      Return:
      MultipleOrientationCalibrationHintAn instance of MultipleOrientationCalibrationHint
      enum SensorState
      @EXClassNullAway
      enum SensorState
      Package:dji.common.flightcontroller.imu
      SDK Key:IMU_STATE_ACCELEROMETER_STATE, IMU_STATE_GYROSCOPE_STATE
      Description:

      Enum for IMU calibration Status.

      Enum Members:
      DISCONNECTEDThe IMU sensor is disconnected from the flight controller.
      CALIBRATINGThe IMU sensor is calibrating
      CALIBRATION_FAILEDCalibrate of the IMU sensor failed.
      DATA_EXCEPTIONThe IMU sensor has a data exception. Calibrate the IMU and restart the aircraft. If afterwards the status still exists, you may need to contact DJI for further assistance.
      WARMING_UPThe IMU sensor is warming up.
      IN_MOTIONThe IMU sensor is not static; the aircraft may not be stable enough to calculate sensor data correctly.
      NORMAL_BIASThe IMU's bias value is normal; the aircraft can safely take off.
      MEDIUM_BIASThe IMU's bias value is medium; the aircraft can safely take off.
      LARGE_BIASThe IMU's bias value is large; the aircraft cannot take off. IMU calibration is needed.
      UNKNOWNThe IMU sensor's status is unknown.
      Class Members:
      enum CalibrationState
      @EXClassNullAway
      enum CalibrationState
      Package:dji.common.flightcontroller.imu
      Description:

      Enum for IMU calibration Status.

      Enum Members:
      NONEIMU not in calibration; no calibration is executing.
      CALIBRATINGIMU calibration is in progress.
      SUCCESSFULIMU calibration succeeded.
      FAILEDIMU calibration failed.
      UNKNOWNUnknown calibration status.
      Class Members:
      enum CalibrationOrientation
      @EXClassNullAway
      enum CalibrationOrientation
      Package:dji.common.flightcontroller
      Description:

      The different orientations the aircraft needs for a multi-orientation IMU calibration.

      Enum Members:
      NOSE_DOWNThe front/nose of the aircraft should be pointed down.
      TAIL_DOWNThe back/tail of the aircraft should be pointed down.
      RIGHT_DOWNThe right/starboard side of the aircraft should be pointed down.
      LEFT_DOWNThe left/port side of the aircraft should be pointed down.
      BOTTOM_DOWNThe bottom/underbelly of the aircraft should be pointed down.
      TOP_DOWNThe top of the aircraft should be pointed down.
      Class Members:
      enum OrientationCalibrationState
      @EXClassNullAway
      enum OrientationCalibrationState
      Package:dji.common.flightcontroller.imu
      Description:

      IMU calibration status for the current aircraft orientation.

      Enum Members:
      CALIBRATINGCalibration of current aircraft orientation is in progress.
      COMPLETEDCalibration of current aircraft orientation is done. The orientation will be added to getOrientationsCalibrated. The aircraft should be rotated to a remaining orientation in getOrientationsToCalibrate.
      UNKNOWNUnknown. Used by products that do not require IMU multi-orientation calibration.
      Class Members: