Gimbal
public class Gimbal
Provide control over a gimbal.
-
Initializes a new
Gimbalplugin.Normally never created manually, but used from the
Dronehelper class instead.Declaration
Swift
public convenience init(address: String = "localhost", port: Int32 = 50051, scheduler: SchedulerType = ConcurrentDispatchQueueScheduler(qos: .background))Parameters
addressThe address of the
MavsdkServerinstance to connect toportThe port of the
MavsdkServerinstance to connect toschedulerThe scheduler to be used by
Observables -
Undocumented
See moreDeclaration
Swift
public struct RuntimeGimbalError : Error -
Undocumented
See moreDeclaration
Swift
public struct GimbalError : Error -
Gimbal mode type.
See moreDeclaration
Swift
public enum GimbalMode : Equatable -
Result type.
See moreDeclaration
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) -> CompletableParameters
pitchDegPitch angle in degrees (negative points down)
yawDegYaw 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) -> CompletableParameters
gimbalModeThe 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) -> CompletableParameters
latitudeDegLatitude in degrees
longitudeDegLongitude in degrees
altitudeMAltitude in metres (AMSL)
View on GitHub
Install in Dash
Gimbal Class Reference