DataHistoryTime
public enum DataHistoryTime : Double, Codable, CaseIterable, Comparable
When started, SDK fetches initial data from time back in time and then receives only updates since the last update. The server does some data precalculations so only the specified time frames are supported.
It determines the data history to be fetched from the server.
So if it is set to .twoHours for example (the default one), there will be no data locally available for more than 2 hours ago.
If need 4 hours of history, set SkyPath.dataHistoryTime to .fourHours.
-
The 30 mins of data history.
Declaration
Swift
case halfHour = 0.5 -
The 1 hour of data history.
Declaration
Swift
case hour = 1 -
The 2 hours of data history.
Declaration
Swift
case twoHours = 2 -
The 4 hours of data history.
Declaration
Swift
case fourHours = 4 -
The 6 hours of data history.
Declaration
Swift
case sixHours = 6 -
Only predefined values are supported. When there is no such case for provided minutes value, the default
twoHourswill be used.It’s a convenient initializer to create an enum case from minutes value.
The
minsshould strictly match one of the cases’minsproperty, otherwisetwoHourswill be used. This can lead to a mismatch between what you show to the pilot and what is used to fetch/query data. So do not use it with any custom minutes value. Use it only withDataHistoryTime.minsif you ever need it.Declaration
Swift
public init(mins: Int)Parameters
minsShould match
DataHistoryTime.minsof one of the cases. If no case with a such number of minstwoHourswill be used.
DataHistoryTime Enumeration Reference