DJI Mobile SDK Documentation

      class DJIGimbalState

      @interface DJIGimbalState : NSObject
      Header:DJIGimbalState.h
      Inherits From:NSObject
      Description:

      This class provides the current state of the gimbal.

      Class Members:

      Information

      Get Yaw Angle
      property
      property yawRelativeToAircraftHeading
      @property(nonatomic, readonly) double yawRelativeToAircraftHeading
      Header:DJIGimbalState.h
      SDK Key:DJIGimbalKey.DJIGimbalParamAttitudeYawRelativeToAircraft
      Description:

      This function will return the angle between gimbal and the drone heading.


      Members

      Attitude
      property
      property attitudeInDegrees
      @property(nonatomic, readonly) DJIGimbalAttitude attitudeInDegrees
      Header:DJIGimbalState.h
      SDK Key:DJIGimbalKey.DJIGimbalParamAttitudeInDegrees
      Description:

      The current gimbal attitude in degrees. Roll, pitch and yaw are 0 if the gimbal is level with the aircraft and points in the forward direction of North Pole.

      See Also:

      DJIGimbalAttitude

      Roll fine-tune
      property
      property fineTunedRoll
      @property(nonatomic, readonly) float fineTunedRoll
      Header:DJIGimbalState.h
      SDK Key:DJIGimbalKey.DJIGimbalParamFineTuneRollInDegrees
      Description:

      Returns the gimbal's roll fine-tuned value. The range for the fine-tuned value is [-10, 10] degrees. If the fine-tune value is negative, the gimbal will be fine- tuned to the specified number of degrees in the counterclockwise direction.

      Pitch Fine Tune
      property
      property fineTunedPitch
      @property(nonatomic, readonly) float fineTunedPitch
      Header:DJIGimbalState.h
      Description:

      Returns the gimbal's pitch fine-tuned value. The range for the fine-tuned value is [-10, 10] degrees. If the fine-tune value is negative, the gimbal will be fine-tuned to the specified number of degrees in the downward direction. It is only supported by Spark.

      Fine Tuned Yaw
      property
      property fineTunedYaw
      @property(nonatomic, readonly) float fineTunedYaw
      Header:DJIGimbalState.h
      Description:

      Returns the gimbal's yaw fine-tuned value. The range for the fine-tuned value is [-10, 10] degrees. If the fine-tune value is negative, the gimbal will be fine-tuned to the specified number of degrees in the port (left) direction. Only supported by DJI Mavic Air.

      Work Mode
      property
      property mode
      @property(nonatomic, readonly) DJIGimbalMode mode
      Header:DJIGimbalState.h
      SDK Key:DJIGimbalKey.DJIGimbalParamMode
      Description:

      Returns the gimbal's current work mode.

      See Also:

      DJIGimbalMode

      Check Mobile Device Mounted
      property
      property isMobileDeviceMounted
      @property(nonatomic, readonly) BOOL isMobileDeviceMounted
      Header:DJIGimbalState.h
      Description:

      YES if the mobile device is mounted on the gimbal.

      Check Motor Overloaded
      property
      property isMotorOverloaded
      @property(nonatomic, readonly) BOOL isMotorOverloaded
      Header:DJIGimbalState.h
      Description:

      YES if one of the gimbal motors is overloaded.


      Calibration

      Calibration Succeeded
      property
      property isCalibrationSuccessful
      @property(nonatomic, readonly) BOOL isCalibrationSuccessful
      Header:DJIGimbalState.h
      SDK Key:DJIGimbalKey.DJIGimbalParamIsCalibrationSuccessful
      Description:

      YES if the gimbal calibration succeeded.

      Calibrate
      property
      property isCalibrating
      @property(nonatomic, readonly) BOOL isCalibrating
      Header:DJIGimbalState.h
      SDK Key:DJIGimbalKey.DJIGimbalParamIsCalibrating
      Description:

      YES if the gimbal is calibrating.

      property calibrationProgress
      @property(nonatomic, readonly) NSInteger calibrationProgress
      Header:DJIGimbalState.h
      SDK Key:DJIGimbalKey.DJIGimbalParamCalibrationProgress
      Description:

      Current progress (percentage) for calibration.


      Reach Limit

      Pitch Reach Limit
      property
      property isPitchAtStop
      @property(nonatomic, readonly) BOOL isPitchAtStop
      Header:DJIGimbalState.h
      SDK Key:DJIGimbalKey.DJIGimbalParamIsPitchAtStop
      Description:

      YES if the gimbal's pitch value is at its limit.

      Roll Reach Limit
      property
      property isRollAtStop
      @property(nonatomic, readonly) BOOL isRollAtStop
      Header:DJIGimbalState.h
      SDK Key:DJIGimbalKey.DJIGimbalParamIsRollAtStop
      Description:

      YES if the gimbal's roll value is at its limit.

      Yaw Reach Limit
      property
      property isYawAtStop
      @property(nonatomic, readonly) BOOL isYawAtStop
      Header:DJIGimbalState.h
      SDK Key:DJIGimbalKey.DJIGimbalParamIsYawAtStop
      Description:

      YES if the gimbal's yaw value is at its limit.


      Balance

      Testing Payload Balance
      property
      property isBalanceTesting
      @property(nonatomic, readonly) BOOL isBalanceTesting
      Header:DJIGimbalState.h
      Description:

      YES if the gimbal is currently testing payload balance.

      Pitch Axis Balance Test Result
      property
      property pitchBalanceTestResult
      @property(nonatomic, readonly) DJIGimbalBalanceTestResult pitchBalanceTestResult
      Header:DJIGimbalState.h
      Description:

      Returns the pitch axis balance test result.

      See Also:

      DJIGimbalBalanceTestResult

      Roll Axis Balance Test Result
      property
      property rollBalanceTestResult
      @property(nonatomic, readonly) DJIGimbalBalanceTestResult rollBalanceTestResult
      Header:DJIGimbalState.h
      Description:

      Returns the roll axis balance test result.

      See Also:

      DJIGimbalBalanceTestResult

      Yaw Axis Balance Test Result
      property
      property yawBalanceTestResult
      @property(nonatomic, readonly) DJIGimbalBalanceTestResult yawBalanceTestResult
      Header:DJIGimbalState.h
      Description:

      Returns the yaw axis balance test result.

      See Also:

      DJIGimbalBalanceTestResult

      Gimbal Balance State
      property
      property balanceState
      @property(nonatomic, readonly) DJIGimbalBalanceState balanceState
      Header:DJIGimbalState.h
      Description:

      Returns the balance status of the gimbal.

      See Also:

      DJIGimbalBalanceState

      Mounted Upwards
      property
      property isMountedUpwards
      @property(nonatomic, readonly) BOOL isMountedUpwards
      Header:DJIGimbalState.h
      Description:

      YES if the gimbal is mounted upwards on the aircraft. It is only supported by M210 and M210 RTK.