Geofence

@objc(GSGeofence)
public protocol Geofence : Peripheral

Geofence peripheral interface.

This peripheral provides access to geofence settings, which prevent the drone from flying over the given altitude and distance.

This peripheral can be retrieved by:

device.getPeripheral(Peripherals.geofence)
  • Maximum altitude setting. This setting allows to define the maximum altitude relative to the takeoff altitude, in meters. The drone won’t go higher than this maximum altitude.

    Declaration

    Swift

    var maxAltitude: DoubleSetting { get }
  • Maximum distance setting. This setting allows to define the maximum distance relative to the geofenceCenter in meters.

    If current geofenceMode is .cylinder, the drone won’t fly over the given distance in any piloting mode, otherwise this setting is ignored.

    Declaration

    Swift

    var maxDistance: DoubleSetting { get }
  • Geofence mode setting.

    Declaration

    Swift

    var mode: GeofenceModeSetting { get }
  • Geofence center location.

    This location represents the center of the geofence zone. This can be either the controller position, or the home location.

    Declaration

    Swift

    var center: CLLocation? { get }