GSGimbal

@objc
public protocol GSGimbal : GSCalibratableGimbal

Objective-C version of Gimbal.

The gimbal is the peripheral “holding” and orientating the camera. It can be a real mechanical gimbal, or a software one.

The gimbal can act on one or multiple axes. It can stabilize a given axis, meaning that the movement on this axis will be following the horizon (for .roll and .pitch) or the North (for the .yaw).

Note

This class is for Objective-C only and must not be used in Swift.
  • Offset correction process. Not nil when offset correction is started (see startOffsetsCorrectionProcess() and stopOffsetsCorrectionProcess()).

    Declaration

    Swift

    var offsetsCorrectionProcess: GimbalOffsetsCorrectionProcess? { get }
  • Tells whether a given axis is supported

    Declaration

    Swift

    func isAxisSupported(_ axis: GimbalAxis) -> Bool

    Parameters

    axis

    the axis to query

    Return Value

    true if the axis is supported, false otherwise

  • Tells whether a given axis is currently locked.

    While an axis is locked, you cannot set a speed or a position.

    An axis can be locked because the drone is controlling this axis on itself, thus it does not allow the controller to change its orientation. This might be the case during a FollowMe or when the PointOfInterestPilotingItf is active.

    Declaration

    Swift

    func isAxisLocked(_ axis: GimbalAxis) -> Bool

    Parameters

    axis

    the axis to query

    Return Value

    true if the axis is supported and locked, false otherwise

  • Gets the lower bound of the attitude on a given axis.

    Declaration

    Swift

    func attitudeLowerBound(onAxis axis: GimbalAxis) -> NSNumber?

    Parameters

    axis

    the axis

    Return Value

    a double in an NSNumber. nil if axis is not supported.

  • Gets the upper bound of the attitude on a given axis.

    Declaration

    Swift

    func attitudeUpperBound(onAxis axis: GimbalAxis) -> NSNumber?

    Parameters

    axis

    the axis

    Return Value

    a double in an NSNumber. nil if axis is not supported.

  • Gets the max speed setting on a given axis.

    Declaration

    Swift

    func maxSpeed(onAxis axis: GimbalAxis) -> DoubleSetting?

    Parameters

    axis

    the axis

    Return Value

    the max speed setting or nil if the axis is not supported.

  • Gets the stabilization setting on a given axis

    Declaration

    Swift

    func stabilization(onAxis axis: GimbalAxis) -> BoolSetting?

    Parameters

    axis

    the axis

    Return Value

    the stabilization setting or nil if the axis is not supported

  • Gets the current attitude on a given axis.

    Declaration

    Swift

    func currentAttitude(onAxis axis: GimbalAxis) -> NSNumber?

    Parameters

    axis

    the axis

    Return Value

    the current attitude as a double in an NSNumber. nil if axis is not supported.

  • Gets the current attitude on a given axis and frame of reference

    Declaration

    Swift

    func currentAttitude(onAxis axis: GimbalAxis, frameOfReference: FrameOfReference) -> NSNumber?

    Parameters

    axis

    the axis

    frameOfReference

    the frame of reference

    Return Value

    the current attitude as a double in an NSNumber. nil if axis is not supported.

  • Controls the gimbal.

    Unit of the yaw, pitch, roll values depends on the value of the mode parameter:

    • .position: axis value is in degrees and represents the desired position of the gimbal on the given axis.
    • .velocity: axis value is in max speed (maxSpeedSettings[thisAxis].value) ratio (from -1 to 1).

    If mode is .position, frame of reference of a given axis depends on the value of the stabilization on this axis. If this axis is stabilized (i.e. stabilizationSettings[thisAxis].value == true), the .absolute frame of reference is used. Otherwise .relative frame of reference is used.

    Declaration

    Swift

    func control(mode: GimbalControlMode, yaw: NSNumber?, pitch: NSNumber?, roll: NSNumber?)

    Parameters

    mode

    the mode that should be used to move the gimbal. This parameter will change the unit of the following parameters

    yaw

    target on the yaw axis as a Double in an NSNumber. nil if you want to keep the current value.

    pitch

    target on the pitch axis as a Double in an NSNumber. nil if you want to keep the current value.

    roll

    target on the roll axis as a Double in an NSNumber. nil if you want to keep the current value.

  • Starts the offsets correction process.

    When offset correction is started, offsetsCorrectionProcess is not nil and correctable offsets can be corrected.

    Declaration

    Swift

    func startOffsetsCorrectionProcess()
  • Stops the offsets correction process.

    offsetsCorrectionProcess will be set to nil.

    Declaration

    Swift

    func stopOffsetsCorrectionProcess()