Skip to main content
Version: 2.2.0

Nowcasting

Overview

Nowcasting (aka Nowcast) is turbulence prediction data issued by the SkyPath.

Nowcast data is issued hourly for up to 6 hours forecast.

H3 resolution 5 is used by SkyPath for the nowcast area. Each nowcast item covers ~252.9 square km hexagon area (as per the H3 resolutions table) and 1000 feet of altitude. Each hexagon is connected to the other so this allows for covering the area better. So one nowcast item covers for example FL370..<FL380 or FL380..<FL390.

NowcastNowcast

Setup in DataQuery

By default, the nowcast data fetch is disabled. It should be included in the DataQuery.types list:

SkyPath.shared.dataQuery.types = [.turbulence, .nowcast]

Or using a DataTypeOptions.set(type:enabled:) function :

SkyPath.shared.dataQuery.types.set(type: .nowcast, enabled: true)

It can be enabled or disabled at any time.

When enabled, nowcast will be fetched from the server hourly. Fetched data will be stored on disk and will be available offline.

Nowcast data will be fetched for areas set in DataQuery.polygon and DataQuery.viewport, similar to the turbulence fetch flow.

The SkyPathDelegate.didReceiveNewNowcast() delegate function will be called when the SDK has fetched new nowcast data from the server.

Query

Get nowcast data using a query locally cached on disk data without making a server request.

Use NowcastQuery to get filtered data as a GeoJSON string or as an array of objects.

It blocks the current thread, so using a separate background thread is recommended.

var query = NowcastQuery(
hours: .now,
altRange: altRange,
resultOptions: .geoJSON)
query.polygon = polygon

do {
let result = try SkyPath.shared.nowcast(with: query).get()
let geoJSON = result.geoJSON
// Show geoJSON on the map
} catch {
print(error)
}