DJI Windows SDK Documentation

class GimbalHandler

sealed class GimbalHandler
Declaration:DJI.WindowsSDK.Components
Description:

Handler.

Class Members:
property
property ProductIndex
uint ProductIndex { get; }
Declaration:DJI.WindowsSDK.Components
Description:

The index of the product to which this component handler belongs. The default product index is 0.

property ComponentIndex
uint ComponentIndex { get; }
Declaration:DJI.WindowsSDK.Components
Description:

The index of the component. It is unique for a type of components inside a product. It is useful when a product has multiple handlers of the same kind. If the product only has one handler of this kind, the index is 0.

method ~GimbalHandler
~GimbalHandler()
Declaration:DJI.WindowsSDK.Components
Description:

The destructor. It should not be called explicitly.

struct GimbalResetCommandMsg
struct GimbalResetCommandMsg
Declaration:DJI.WindowsSDK
Description:

A class that contains a reset command type of gimbals.

Struct Members:
GimbalResetCommand valueThe actual value of the class.
struct GimbalAngleRotation
struct GimbalAngleRotation
Declaration:DJI.WindowsSDK
Description:

A class that used to control the gimbal to rotate a specific angle.

Struct Members:
GimbalAngleRotationMode modeThe rotation mode, either it is relative or absolute.
double pitchThe pitch property of a gimbal rotation operation, how much the gimbal rotates on the pitch axis. It only takes effect when bool pitchIgnored is false.
double rollThe roll property of a gimbal rotation operation, how much the gimbal rotates on the pitch axis. It only takes effect when bool rollIgnored is false.
double yawThe yaw property of a gimbal rotation operation, how much the gimbal rotates on the pitch axis. It only takes effect when bool yawIgnored is false.
bool pitchIgnoredtrue to ignore the pitch value of this rotation so that the gimbal will not rotate pitch.
bool rollIgnoredtrue to ignore the roll value of this rotation so that the gimbal will not rotate roll.
bool yawIgnoredtrue to ignore the yaw value of this rotation so that the gimbal will not rotate yaw.
double durationThe duration for the rotation operation. A longer duration can slower the rotation.
struct GimbalSpeedRotation
struct GimbalSpeedRotation
Declaration:DJI.WindowsSDK
Description:

A class that used to control the gimbal to rotate in a specific speed.

Struct Members:
double pitchThe speed on the pitch dimension.
double yawThe speed on the yaw dimension.
double rollThe speed on the roll dimension.
struct GimbalCalibrationState
struct GimbalCalibrationState
Declaration:DJI.WindowsSDK
Description:

The calibration state, which contains the status and the progress if valid.

Struct Members:
GimbalCalibrationStatus statusThe calibration status.
int progressThe calibration progress in percentage. It is valid when GimbalCalibrationStatus status is IN_PROGRESS.
enum GimbalResetCommand
enum GimbalResetCommand
Declaration:DJI.WindowsSDK
Description:

Commands to reset the gimbal to some specific attitude.

Enum Members:
TOGGLE_PITCHToggles gimbal's pitch position, either point forward or point to the ground.
UNKNOWNUnknown.
struct GimbalAttitudeRange
struct GimbalAttitudeRange
Declaration:DJI.WindowsSDK
Description:

The valid range of attitudes supported by the connected gimbal.

Struct Members:
DoubleMinMax rollThe valid range in roll axis in degrees.
DoubleMinMax pitchThe valid range in pitch axis in degrees.
DoubleMinMax yawThe valid range in yaw axis in degrees.
enum GimbalMode
enum GimbalMode
Declaration:DJI.WindowsSDK
Description:

Gimbal work modes.

Enum Members:
FREEThe gimbal can move independently of the aircraft's yaw. In this mode, even if the aircraft yaw changes, the camera will continue pointing in the same world direction.
FPVThe gimbal's work mode is FPV mode. In this mode, the gimbal yaw will follow the aircraft's heading, and the gimbal roll will follow the RC's roll channel value. The pitch will be available to move.
YAW_FOLLOWThe gimbal's work mode is such that it will follow the yaw. In this mode, the gimbal yaw will be fixed, while pitch and roll will be available to move.
UNKNOWNUnknown.
enum GimbalAngleRotationMode
enum GimbalAngleRotationMode
Declaration:DJI.WindowsSDK
Description:

The mode of the gimbal angle rotation.

Enum Members:
RELATIVE_ANGLEThe angle value, when the gimbal is rotating, relative to the current angle.
ABSOLUTE_ANGLEThe angle value, when the gimbal is rotating, relative to 0 degrees (aircraft heading).
UNKNOWNUnknown.
enum GimbalCalibrationStatus
enum GimbalCalibrationStatus
Declaration:DJI.WindowsSDK
Description:

The calibration satus of gimbals.

Enum Members:
IDLEThe gimbal is idle.
IN_PROGRESSThe calibration is in progress.
FAILEDThe calibration failed.
UNKNOWNUnknown.
delegate GimbalCalibrationStateChangedEventHandler
delegate void GimbalCalibrationStateChangedEventHandler(object sender, GimbalCalibrationState? value)
Declaration:DJI.WindowsSDK
Description:

A delegate type used to subscribe the updated values in type GimbalCalibrationState.

delegate GimbalAttitudeRangeChangedEventHandler
delegate void GimbalAttitudeRangeChangedEventHandler(object sender, GimbalAttitudeRange? value)
Declaration:DJI.WindowsSDK
Description:

A delegate type used to subscribe the updated values in type GimbalAttitudeRange.

Methods
method
method ResetGimbalAsync
async Task<SDKError> ResetGimbalAsync(GimbalResetCommandMsg value)
Declaration:DJI.WindowsSDK.Components
Description:

Resets the gimbal. The gimbal will have different behaviors with different gimbal reset modes.

Input Parameters:
GimbalResetCommandMsg valueA parameter object of type GimbalResetCommandMsg.
Return:
async Task<SDKError>A Task<SDKErrorCode> object.
method GetGimbalAttitudeAsync
async Task<ResultValue<Attitude?>> GetGimbalAttitudeAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Gets the attitude of the gimbal.

Return:
async Task<ResultValue<Attitude?>>A Task<ResultValue<Attitude?>> object.
method GetYawRelativeToBodyHeadingAsync
async Task<ResultValue<DoubleMsg?>> GetYawRelativeToBodyHeadingAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Gets the angle between gimbal and the aircraft heading.

Return:
async Task<ResultValue<DoubleMsg?>>A Task<ResultValue<DoubleMsg?>> object.
method RotateByAngleAsync
async Task<SDKError> RotateByAngleAsync(GimbalAngleRotation value)
Declaration:DJI.WindowsSDK.Components
Description:

Rotate gimbal's pitch, roll, and yaw to the specific angle.

Input Parameters:
GimbalAngleRotation valueA parameter object of type GimbalAngleRotation.
Return:
async Task<SDKError>A Task<SDKErrorCode> object.
method RotateBySpeedAsync
async Task<SDKError> RotateBySpeedAsync(GimbalSpeedRotation value)
Declaration:DJI.WindowsSDK.Components
Description:

Rotate gimbal's pitch, roll, and yaw in a specific speed.

Input Parameters:
GimbalSpeedRotation valueA parameter object of type GimbalSpeedRotation.
Return:
async Task<SDKError>A Task<SDKErrorCode> object.
method CalibrateGimbalAsync
async Task<SDKError> CalibrateGimbalAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Starts calibrating the gimbal. The product should be stationary (not flying, or being held) and horizontal during calibration. For gimbal's with adjustable payloads, the payload should be present and balanced before doing a calibration.

Return:
async Task<SDKError>A Task<SDKErrorCode> object.
method GetGimbalAttitudeRangeAsync
async Task<ResultValue<GimbalAttitudeRange?>> GetGimbalAttitudeRangeAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Gets the valid range of the gimbal's attitudes.

Return:
async Task<ResultValue<GimbalAttitudeRange?>>A Task<ResultValue<GimbalAttitudeRange?>> object.
method GetGimbalCalibrationStateAsync
async Task<ResultValue<GimbalCalibrationState?>> GetGimbalCalibrationStateAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Gets the calibration state of the gimbal.

Return:
async Task<ResultValue<GimbalCalibrationState?>>A Task<ResultValue<GimbalCalibrationState?>> object.
method GetConnectionAsync
async Task<ResultValue<BoolMsg?>> GetConnectionAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Determines if a component is connected or not.

Return:
async Task<ResultValue<BoolMsg?>>A Task<ResultValue<BoolMsg?>> object.
method GetSerialNumberAsync
async Task<ResultValue<StringMsg?>> GetSerialNumberAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Gets the serial number of the component.

Return:
async Task<ResultValue<StringMsg?>>A Task<ResultValue<StringMsg?>> object.
event GimbalAttitudeChanged
event AttitudeChangedEventHandler GimbalAttitudeChanged
Declaration:DJI.WindowsSDK.Components
Description:

Subscribe the event to receive changes of the gimbal's attitude.

event YawRelativeToBodyHeadingChanged
event DoubleMsgChangedEventHandler YawRelativeToBodyHeadingChanged
Declaration:DJI.WindowsSDK.Components
Description:

Subscribe the event to receive changes of the gimbal's yaw relative to the aircraft's heading.

event GimbalAttitudeRangeChanged
event GimbalAttitudeRangeChangedEventHandler GimbalAttitudeRangeChanged
Declaration:DJI.WindowsSDK.Components
Description:

Subscribe the event to receive changes of the gimbal's valid attitude range.

event GimbalCalibrationStateChanged
event GimbalCalibrationStateChangedEventHandler GimbalCalibrationStateChanged
Declaration:DJI.WindowsSDK.Components
Description:

Subscribe the event to receive changes of the gimbal's calibration state.

event ConnectionChanged
event BoolMsgChangedEventHandler ConnectionChanged
Declaration:DJI.WindowsSDK.Components
Description:

Subscribe the event to receive a component's connection change.

event SerialNumberChanged
event StringMsgChangedEventHandler SerialNumberChanged
Declaration:DJI.WindowsSDK.Components
Description:

Subscribe the event to receive changes of the serial number of the component.