Gimbal

public class Gimbal

Provide control over a gimbal.

  • Initializes a new Gimbal plugin.

    Normally never created manually, but used from the Drone helper class instead.

    Declaration

    Swift

    public convenience init(address: String = "localhost",
                            port: Int32 = 50051,
                            scheduler: SchedulerType = ConcurrentDispatchQueueScheduler(qos: .background))

    Parameters

    address

    The address of the MavsdkServer instance to connect to

    port

    The port of the MavsdkServer instance to connect to

    scheduler

    The scheduler to be used by Observables

  • Undocumented

    See more

    Declaration

    Swift

    public struct RuntimeGimbalError : Error
  • Undocumented

    See more

    Declaration

    Swift

    public struct GimbalError : Error
  • Gimbal mode type.

    See more

    Declaration

    Swift

    public enum GimbalMode : Equatable
  • Result type.

    See more

    Declaration

    Swift

    public struct GimbalResult : Equatable
  • Set gimbal pitch and yaw angles.

    This sets the desired pitch and yaw angles of a gimbal. Will return when the command is accepted, however, it might take the gimbal longer to actually be set to the new angles.

    Declaration

    Swift

    public func setPitchAndYaw(pitchDeg: Float, yawDeg: Float) -> Completable

    Parameters

    pitchDeg

    Pitch angle in degrees (negative points down)

    yawDeg

    Yaw angle in degrees (positive is clock-wise, range: -180 to 180 or 0 to 360)

  • Set gimbal mode.

    This sets the desired yaw mode of a gimbal. Will return when the command is accepted. However, it might take the gimbal longer to actually be set to the new angles.

    Declaration

    Swift

    public func setMode(gimbalMode: GimbalMode) -> Completable

    Parameters

    gimbalMode

    The mode to be set.

  • Set gimbal region of interest (ROI).

    This sets a region of interest that the gimbal will point to. The gimbal will continue to point to the specified region until it receives a new command. The function will return when the command is accepted, however, it might take the gimbal longer to actually rotate to the ROI.

    Declaration

    Swift

    public func setRoiLocation(latitudeDeg: Double, longitudeDeg: Double, altitudeM: Float) -> Completable

    Parameters

    latitudeDeg

    Latitude in degrees

    longitudeDeg

    Longitude in degrees

    altitudeM

    Altitude in metres (AMSL)