OneLayer
Overview
SkyPath OneLayer is the world's first smart, consolidated ride quality layer. It integrates the best global turbulence data sources into one smart layer, including:
- SkyPath Observations
- SkyPath ADS-B Vertical Rate derived turbulence
- SkyPath Forecast (with 24-hour predictions)
- EDR
- PIREPs
With real-time insights, intelligent notifications, and a user-friendly display, OneLayer enhances situational awareness and reduces workload.
SkyPath can be used in two modes: observations mode, and OneLayer mode. Observation mode includes only SkyPath Observations. OneLayer mode includes all of the layers listed above, consolidated within the OneLayer. OneLayer mode is subsequently an advanced feature, and in SkyPath’s premium subscription tier. As such, there could be some customers who subscribe to Observations mode (basic subscription), and others who subscribe to OneLayer mode (premium subscription), but they are mutually exclusive. This necessitates a feature flag to enable either Observations or OneLayer Modes.


UX
- Show either Observations or OneLayer, not both.
- Use flag to check if OneLayer is enabled
DataTypeOptions.oneLayer.enabled
- Use flag to check if OneLayer is enabled
- Use the same UX
OneLayerItemandTurbulenceItemboth implement theTurbulenceItemableprotocol, soOneLayerItemhas all the same properties and a few more.
- Consider changing the UX to show OneLayer's additional data
- List of all sources contributing to the report from
OneLayerItem.sources - The leading source of the report from
OneLayerItem.usedSource

- List of all sources contributing to the report from
- Implement above UX changes everywhere data is shown - data on tap, notifications, etc.


Setup
By default, the OneLayer data fetch is disabled in the DataQuery.types. You can change it at any time. Only one of the types, turbulence or oneLayer, can be enabled at the same time.
if DataTypeOptions.oneLayer.enabled {
SkyPath.shared.dataQuery.types.set(type: .oneLayer, enabled: true)
} else {
SkyPath.shared.dataQuery.types.set(type: .turbulence, enabled: true)
}
When enabled, OneLayer will be fetched from the server every minute, same as Observations. Fetched data will be stored on disk and will be available offline.
Data will be fetched for areas set in DataQuery.polygon and DataQuery.viewport, similar to the turbulence fetch flow.
The SkyPathDelegate.didReceiveNewOneLayer(areaType:) delegate function will be called when the SDK has fetched new data from the server.
In case you need to check if this feature is enabled for you from the SkyPath side or not, you can check using the DataTypeOptions.enabled property:
DataTypeOptions.oneLayer.enabled
Query
See Query Data for the general query data approach details.
To query OneLayer, you will need:
OneLayerQueryfor a configurationSkyPath.oneLayer(with:)function to query the dataOneLayerItemto process the result items
Example of how to query the OneLayer data:
var query = OneLayerQuery(
altRange: altRange,
resultOptions: .geoJSON,
dataHistoryTime: dataHistoryTime)
query.polygon = polygon
do {
let result = try SkyPath.shared.oneLayer(with: query).get()
let geoJSON = result.geoJSON
// Show geoJSON on the map
} catch {
print(error)
}
Each item in the result will have a list of data sources OneLayerItem.sources.
If DataTypeOptions.oneLayer.enabled is disabled, the query will return an error, so make sure to have separate functions to query Observations and OneLayer:
if DataTypeOptions.oneLayer.enabled {
queryOneLayer()
} else {
queryObservations()
}
Forecast
Forecast is a separately entitled feature on top of OneLayer. It is not auto-enabled — check entitlement and opt in explicitly:
if DataTypeOptions.forecast.enabled {
SkyPath.shared.dataQuery.types.set(type: .forecast, enabled: true)
}
When entitled and enabled, OneLayer results will include the current hour prediction. To include a prediction for a specific time, set the future timestamp in OneLayerQuery.ts — no matter if it is a rounded hour or not. Inclusion can be controlled per-query by OneLayerQuery.isForecastEnabled, which is true by default.
Toggling .forecast in DataQuery.types triggers SkyPathDelegate.didReceiveNewOneLayer(areaType:) so you can re-query and re-render the merged result.
When entitled, items influenced by forecast will list DataSourceType.forecast in OneLayerItem.sources.