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 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 RuntimeGeofenceError : Error
  • Undocumented

    See more

    Declaration

    Swift

    public struct GeofenceError : Error
  • Point type.

    See more

    Declaration

    Swift

    public struct Point : Equatable
  • Polygon type.

    See more

    Declaration

    Swift

    public struct Polygon : Equatable
  • Result type.

    See more

    Declaration

    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)