Geofence
public class Geofence
Enable setting a geofence.
-
Initializes a new
Geofence
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 toport
The port of the
MavsdkServer
instance to connect toscheduler
The scheduler to be used by
Observable
s -
Undocumented
See moreDeclaration
Swift
public struct RuntimeGeofenceError : Error
-
Undocumented
See moreDeclaration
Swift
public struct GeofenceError : Error
-
Point type.
See moreDeclaration
Swift
public struct Point : Equatable
-
Polygon type.
See moreDeclaration
Swift
public struct Polygon : Equatable
-
Result type.
See moreDeclaration
Swift
public struct GeofenceResult : Equatable
-
Upload a geofence.
Polygons are uploaded to a drone. Once uploaded, the geofence will remain on the drone even if a connection is lost.
Declaration
Swift
public func uploadGeofence(polygons: [Polygon]) -> Completable
Parameters
polygons
Polygon(s) representing the geofence(s)