GimbalKey provides a set of methods to set and get gimbal data, including obtaining the gimbal attitude data, controlling the gimbal rotation, and setting the related parameters of the gimbal.
staticfinal DJIKeyInfo<Attitude> KeyGimbalAttitude = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GimbalAttitude", new DJIValueConverter<>(Attitude.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
Get gimbal attitude data. The yaw angle uses the north east down coordinate system. If you need to get the yaw angle of the gimbal relative to the nose of the aircraft, please call KeyYawRelativeToAircraftHeading.
staticfinal DJIKeyInfo<GimbalMode> KeyGimbalMode = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GimbalMode", new SingleValueConverter<>(GimbalMode.class,GimbalModeMsg.class)).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
staticfinal DJIActionKeyInfo<GimbalAngleRotation,EmptyMsg> KeyRotateByAngle = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"RotateByAngle", new DJIValueConverter<>(GimbalAngleRotation.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
Rotate the pitch angle, roll angle and yaw angle of the gimbal in angle mode. Relative angle mode and absolute angle mode are supported. Note: Different gimbal payloads have different controllable angles. The following provides a method to obtain the maximum and minimum limit angles of the gimbal: Please use the remote controller's gimbal dial to control the pitch, roll and yaw of gimbal to the maximum and minimum limit, and then call KeyGimbalAttitude to get the adjustable limit angle of the gimbal.
staticfinal DJIActionKeyInfo<GimbalSpeedRotation,EmptyMsg> KeyRotateBySpeed = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"RotateBySpeed", new DJIValueConverter<>(GimbalSpeedRotation.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
Rotate the pitch angle, roll angle and yaw angle of the gimbal in speed mode. Unit: 0.1 degree/second, range: [-359.9, 359.9]. The greater value you set, the greater the rotating speed. Both the frequency of this method call and the signal strength of the airlink will influence the final gimbal attitude which may cause some offset.
static final DJIActionKeyInfo<GimbalResetType,EmptyMsg> KeyGimbalReset = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"GimbalReset", new SingleValueConverter<>(GimbalResetType.class,GimbalResetCommandMsg.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false).setInnerIdentifier("ResetGimbal")
staticfinal DJIActionKeyInfo<Double,EmptyMsg> KeyFineTunePitchInDegrees = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"FineTunePitchInDegrees", SingleValueConverter.DoubleConverter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Double
Gimbal pitch axis can be fine-tuned through custom offset value. If there still have small angle offset after gimbal centering back, this function can be used to gimbal leveling. Single Fine-tune range is [-2.0, 2.0], unit: degree. Total fine-tuned range is [-10.0, 10.0], unit:degree. If the offset value is negative, the gimbal will fine-tune a specified number of degrees in the counterclockwise direction. The total offset value of fine-tuning can be obtained through KeyFineTunePitchTotalDegree.
staticfinal DJIActionKeyInfo<Double,EmptyMsg> KeyFineTuneYawInDegrees = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"FineTuneYawInDegrees", SingleValueConverter.DoubleConverter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Double
Gimbal yaw axis can be fine-tuned through custom offset value. If there still have small angle offset after gimbal centering back, this function can be used to gimbal leveling. Single Fine-tune range is [-2.0, 2.0], unit: degree. Total fine-tuned range is [-10.0, 10.0], unit:degree. If offset value is negative, the gimbal will fine-tune a specified number of degrees in the counterclockwise direction. Total offset value of fine-tuning can be obtained through KeyFineTuneYawTotalDegree.
staticfinal DJIActionKeyInfo<Double,EmptyMsg> KeyFineTuneRollInDegrees = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"FineTuneRollInDegrees", SingleValueConverter.DoubleConverter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Double
Gimbal roll axis can be fine-tuned through custom offset value. If there still have small angle offset after gimbal centering back, this function can be used to gimbal leveling. Single Fine-tune range is [-2.0, 2.0], unit: degree. Total fine-tuned range is [-10.0, 10.0], unit:degree. If offset value is negative, the gimbal will fine-tune a specified number of degrees in the counterclockwise direction. Total offset value of fine-tuning can be obtained through KeyFineTuneRollTotalDegree.
static final DJIKeyInfo<GimbalCalibrationStatusInfo> KeyGimbalCalibrationStatus = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GimbalCalibrationStatus", new DJIValueConverter<>(GimbalCalibrationStatusInfo.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("GimbalCalibrationState")
staticfinal DJIKeyInfo<Boolean> KeyPitchRangeExtensionEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"PitchRangeExtensionEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Boolean
Set to enable or disable the pitch range extension of gimbal. Taking M30 series for example, their gimbal is mounted under the drone. When the pitch range extension of gimbal is disabled, the pitch range is [45, -90]. When the pitch range extension of gimbal is enabled, the range extends to [45, -120]. It means when the pitch range extension of gimbal is enabled and the gimbal pitch axis is moving downward, the angle can reach -120 degrees.
staticfinal DJIKeyInfo<Integer> KeyPitchControlMaxSpeed = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"PitchControlMaxSpeed", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("PitchControllerMaxSpeed")
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Integer
Set maximum spped of gimbal pitch control. This value is a percentage, the range is [1,100]. The larger the value, the faster the speed. 100% means that gimbal is controlled by maximum physical speed it can reached.
staticfinal DJIKeyInfo<Integer> KeyYawControlMaxSpeed = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"YawControlMaxSpeed", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("YawControllerMaxSpeed")
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Integer
Set maximum spped of gimbal yaw control. This value is a percentage, the range is [1,100]. The larger the value, the faster the speed. 100% means that gimbal is controlled by maximum physical speed it can reached.
staticfinal DJIKeyInfo<Integer> KeyPitchSmoothingFactor = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"PitchSmoothingFactor", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Integer
Set gimbal to slow start/stop in pitch direction. The range is [0,30]. The larger the value, the longer the buffer distance of controlling gimbal pitch axis to start/stop turning.
staticfinal DJIKeyInfo<Integer> KeyYawSmoothingFactor = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"YawSmoothingFactor", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Integer
Set gimbal to slow start/stop in yaw direction. The range is [0,30]. The larger the value, the longer the buffer distance of controlling gimbal pitch axis to start/stop turning.