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 twoHours will be used.

    It’s a convenient initializer to create an enum case from minutes value.

    The mins should strictly match one of the cases’ mins property, otherwise twoHours will 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 with DataHistoryTime.mins if you ever need it.

    Declaration

    Swift

    public init(mins: Int)

    Parameters

    mins

    Should match DataHistoryTime.mins of one of the cases. If no case with a such number of mins twoHours will be used.