DJI Mobile SDK Documentation

      class Rotation

      @EXClassNullAway
      class Rotation
      Package:dji.common.gimbal
      SDK Key:GimbalKey.ROTATE
      Description:

      Represents a gimbal speed or angular rotation operation. If you don't want a specific axis to get rotated, invoke the rotate method and set the value of the axis to NO_ROTATION in the Rotation object. By default, the values of pitch, roll, and yaw in the Rotation are set to NO_ROTATION.

      Class Members:
      Rotation Mode
      method
      method getMode
      RotationMode getMode()
      Package:dji.common.gimbal
      Description:

      Type of gimbal rotation operation mode.

      Return:
      RotationModeA RotationMode enum value.
      Pitch Value
      method
      method getPitch
      float getPitch()
      Package:dji.common.gimbal
      Description:

      The pitch property of a gimbal rotation operation, how much the gimbal rotates on the pitch axis. When it is null, no operation will be applied to the pitch axis.

      Return:
      floatA float value.
      Roll Value
      method
      method getRoll
      float getRoll()
      Package:dji.common.gimbal
      Description:

      The roll property of a gimbal rotation operation, how much the gimbal rotates on the roll axis. When it is null, no operation will be applied to the roll axis.

      Return:
      floatA float value.
      Yaw Value
      method
      method getYaw
      float getYaw()
      Package:dji.common.gimbal
      Description:

      The yaw property of a gimbal rotation operation, how much the gimbal rotates on the yaw axis. When the rotation mode is ABSOLUTE_ANGLE, the yaw value is relative to the aircraft's heading. When it is null, no operation will be applied to the yaw axis.

      Return:
      floatA float value.
      Time
      method
      method getTime
      double getTime()
      Package:dji.common.gimbal
      Description:

      The time of the gimbal speed rotation operation(unit: second). Does not take effect in waypoint mission.

      Return:
      doubleA double value. Should set a value greater than 0.
      method
      method getIgnore
      boolean getIgnore()
      Package:dji.common.gimbal
      Description:

      Sets true to ignore remote controller gimbal stick control.

      Return:
      booleanA boolean value.
      Constructor
      class
      enum RotationMode
      @EXClassNullAway
      enum RotationMode
      Package:dji.common.gimbal
      Description:

      The mode of the gimbal rotation operation.

      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).
      For Inspire 1, using X3, X3 Zoom and Z3 cameras will be relative to true north. Using X5, XT and X5R will be relative to the aircraft heading.
      For Inspire 2, using X4S and X5S cameras will be relative to true north. Using X7 and Z30 will be relative to the aircraft heading.
      For Matrice 300 RTK with H20 series and Zenmuse P1 camera, the angle rotation is relative to the aircraft heading if you rotate the gimbal directly. The angle rotation is relative to true North if you use it in WaypointV2MissionAction.
      SPEEDRotate the gimbal's pitch, roll, and yaw in SPEED Mode. The direction can either be set to clockwise or counter-clockwise.
      For Phantom 3 Professional, Phantom 3 Advanced and Phantom 3 Standard, roll and yaw rotations are not available.
      For Inspire 1, Inspire Pro and M100, pitch, roll and yaw rotations are available.
      For Osmo, roll rotation is not available. The yaw angleVelocity of DJIGimbalSpeedRotation range is (-120, 120).
      Class Members: