AlertQuery
public struct AlertQuery
Control how to search alerts.
By default, it uses the current location and beam mode with default values.
When passing route the search will be done in coordinates instead.
By default, the current location altitude will be used to make a range with +/- 2k feet.
Set altRange when you need the custom range to search for alerts.
-
Min severity level of turbulence to alert.
Optional. The default is
nil.Declaration
Swift
public var minSev: TurbulenceSeverity? -
Severity levels of turbulence. Will use only turbulence with these severities if set.
Optional. The default is
nil.Declaration
Swift
public var sevs: [TurbulenceSeverity]? -
Distance of “beam” or
routeif set.Measured in nautical miles (NM). The default is 100 NM.
Declaration
Swift
public var distance: Double -
Time frame from now in which search for turbulence.
distancewill be ignored.Distance will be dynamically calculated from the current speed and this
timeset. If speed is not currently available, thedistancewill be used. Measured in seconds.Optional. The default is
nil.Declaration
Swift
public var timeFrame: TimeInterval? -
Angle in degrees from velocity vector.
The default is 15 degrees.
Declaration
Swift
public var angleSpan: Double -
Altitude lower and upper bounds of the range. Should be round to a thousand feet.
If set, the turbulence will be searched inside this altitude range only despite the current location altitude.
Measured in feet.
Declaration
Swift
public var altRange: ClosedRange<Double>? -
If the aircraft is far from this value from the nearest coordinate of a route (if set), then switch to beam mode searching alerts.
The default is 20 NM. Measured in nautical miles (NM).
Declaration
Swift
public var switchToBeamOnDistanceFromRoute: Double -
Do not alert on your own recorded turbulence for the last time span.
Measured in minutes. The default is 60.
Declaration
Swift
public var excludeOwnTimeSpan: Int -
Coordinates of the route line.
widthAroundwill be used for a route corridor.Declaration
Swift
public var route: [CLLocationCoordinate2D]? -
Distance from the route line coordinates to search for alerts.
Measured in NM. The default is 20 NM.
Declaration
Swift
public var widthAround: Double? -
Polygon coordinates to get turbulence alerts inside it only.
The last coordinate should be the same as the first to have a closed polygon.
Declaration
Swift
public var polygon: [CLLocationCoordinate2D]? -
Array of tile keys. Use it to query turbulence in specific tiles.
Declaration
Swift
public var tiles: [String]? -
History time of queried data. When it’s
niltheSkyPath.dataHistoryTimevalue is used.Optional. The default is
nil.Declaration
Swift
public var dataHistoryTime: DataHistoryTime? -
By default it’s
falseand only route corridor and viewport low-resolution H3 turbulence reports will be queried.But when offline and no low-resolution turbulence reports are cached it could be useful to use high-resolution turbulence polygons to search for alerts instead. In this case, set it to
trueand the query will return aTurbulenceItemarray generated from turbulence polygons cached for the specified area.It will use polygons data only if no low-resolution H3 turbulence reports meet the query. A recommendation for when to use it is when the app is offline.
Optional. By default, it is
false.Declaration
Swift
public var usePolygonsEnabled: Bool -
init(minSev:sevs: distance: timeFrame: angleSpan: altRange: route: widthAround: switchToBeamOnDistanceFromRoute: excludeOwnTimeSpan: dataHistoryTime: ) Default initializer.
Declaration
Swift
public init(minSev: TurbulenceSeverity? = nil, sevs: [TurbulenceSeverity]? = nil, distance: Double = 100, timeFrame: TimeInterval? = nil, angleSpan: Double = 15, altRange: ClosedRange<Double>? = nil, route: [CLLocationCoordinate2D]? = nil, widthAround: Double? = 20, switchToBeamOnDistanceFromRoute: Double = 20, excludeOwnTimeSpan: Int = 60, dataHistoryTime: DataHistoryTime? = nil)Parameters
minSevMin severity level of turbulence to alert. Optional. The default is
nil.sevsSeverity levels of turbulence. Will use only turbulence with these severities if set. Optional. The default is
nil.distanceDistance of “beam” or
routeif set. Measured in nautical miles (NM). The default is 100 NM.timeFrameangleSpanAngle of a “beam”. Measured in degrees.
altRangeAltitude range. Optional. Measured in feet.
routeCoordinates of the route line.
widthAroundwill be used for a route corridor.widthAroundDistance from the route line coordinates to search for alerts. Measured in NM. The default is 20 NM.
switchToBeamOnDistanceFromRouteWhen to switch to beam mode. Optional. Measured in nautical miles (NM).
excludeOwnTimeSpanDo not alert on your own recorded turbulence for the last time span. Measured in minutes. The default is 60.
dataHistoryTimeHistory time of queried data. When it’s
niltheSkyPath.dataHistoryTimevalue is used. Optional. The default isnil.
AlertQuery Structure Reference