Structures
The following structures are available globally.
-
Use
LiveFlightQuery
to get filtered data as an array ofLiveFlight
objects or a GeoJSON string.It will query locally cached data received previously. Used in
See moreSkyPath.liveFlights(with:)
.Declaration
Swift
public struct LiveFlightQuery
-
A result of query live flights using
LiveFlightQuery
.Specified in
See moreLiveFlightQuery.resultOptions
.Declaration
Swift
public struct LiveFlightResult
-
Controls how to receive a queried items result.
See moreDeclaration
Swift
public struct LiveFlightResultOptions : OptionSet
-
Use
NowcastQuery
to get filtered data as an array ofNowcastItem
objects or a GeoJSON string.It will query locally cached data received previously. Used in
See moreSkyPath.nowcast(with:)
.Declaration
Swift
public struct NowcastQuery
-
Declaration
Swift
public struct NowcastResult<Item> where Item : Decodable, Item : Encodable
-
Controls how to receive a queried data result using
See moreNowcastQuery
.Declaration
Swift
public struct NowcastResultOptions : OptionSet
-
Use
TurbulencePolygonsQuery
to get filtered data as a GeoJSON string.It will query locally cached data received previously. Used in
See moreSkyPath.turbulencePolygons(with:)
.Declaration
Swift
public struct TurbulencePolygonsQuery
-
A result of query turbulence polygons using
TurbulencePolygonsQuery
.Specified in
See moreTurbulencePolygonsQuery.resultOptions
.Declaration
Swift
public struct TurbulencePolygonsResult
-
Controls how to receive a queried turbulence result using
See moreTurbulencePolygonsQuery
.Declaration
Swift
public struct TurbulencePolygonsResultOptions : OptionSet
-
Use
TurbulenceQuery
to get filtered data as an array ofTurbulenceItem
objects or a GeoJSON string.It will query locally cached data received previously. Used in
See moreSkyPath.turbulence(with:)
.Declaration
Swift
public struct TurbulenceQuery
-
A result of query turbulence using
TurbulenceQuery
.Specified in
See moreTurbulenceQuery.resultOptions
.Declaration
Swift
public struct TurbulenceResult
-
Controls how to receive a queried turbulence result using
See moreTurbulenceQuery
.Declaration
Swift
public struct TurbulenceResultOptions : OptionSet
-
A supported by SkyPath aircraft data.
See moreDeclaration
Swift
public struct Aircraft : Codable, Equatable
-
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
See morealtRange
when you need the custom range to search for alerts.Declaration
Swift
public struct AlertQuery
-
Result object with found alerts based on
AlertQuery
configuration.It will always have at least one item in the
See moreturbulence
array.Declaration
Swift
public struct AlertResult : Equatable
-
At first request, the whole data according to
SkyPath.dataQuery
is fetched.Then only the new data that appeared (delta) is fetched to save network traffic. When cached data expires or a delta can’t be received, the whole fresh data will be received again.
There are thousands of turbulence reports around the globe. To reduce network traffic usage and keep only data that is currently needed the data fetch is separated into the different types controlled by the
SkyPath.dataQuery
object that is set initially to default values and can be updated at any time.All of the below are optional to set but recommended due to your specific flow.
After updating
SkyPath.dataQuery
in any way, the check, if need to fetch new data, will be made. And if the change requires a new server fetch, the server request will be made immediately. No need to callSkyPath.fetchData(refresh:)
.You can update data query at any time and in both ways by setting a property only or a whole object.
See moreSkyPath.shared.dataQuery.polygon = polygon SkyPath.shared.dataQuery = DataQuery(polygon: polygon)
Declaration
Swift
public struct DataQuery
-
SkyPath data types available to be fetched from the server.
Only specified type in
See moreDataQuery.types
will be fetched and stored locally.Declaration
Swift
public struct DataTypeOptions : OptionSet, Hashable
-
Tracked data is aggregated and anonymized.
To group tracked data it’s attached to a corresponding flight. The set flight object is stored locally until removed.
See moreDeclaration
Swift
public struct Flight : Codable
-
The live flight object.
See moreDeclaration
Swift
public struct LiveFlight : Codable, Hashable
extension LiveFlight: PolygonFilterable
-
External injected location for SDK to use when the device’s location is not available.
See moreDeclaration
Swift
public struct InjectedLocation
-
The nowcast data object.
See moreDeclaration
Swift
public struct NowcastItem : Codable, Equatable, Hashable
-
The
Tile
is a representation of a turbulence report’s H3 index area within a corresponding altitude box.SkyPath divides the world into 10x10 miles x 1000 feet high logical rectangular boxes, which were found to be the best balance; not to overload the pilots with information, but give enough granularity for the pilots to be able to take action and avoid CAT consequences.
SkyPath uses H3 hexagonal hierarchical geospatial indexing system. H3 resolution 5 is used to represent turbulence area by hexagons of different severity levels.
SDK handles all work with H3 indexes out of the box so you don’t need to do anything for it on your side.
See moreDeclaration
Swift
public struct Tile : Codable, Equatable, Hashable
-
The turbulence data object.
See moreDeclaration
Swift
public struct TurbulenceItem : Codable, Equatable