Class: AiracUtils
Defined in: src/sdk/navigation/AiracUtils.ts:33
Utilities for AIRAC cycles.
Constructors
Constructor
new AiracUtils():
AiracUtils
Returns
AiracUtils
Properties
CYCLE_DURATION
readonly
static
CYCLE_DURATION:number
Defined in: src/sdk/navigation/AiracUtils.ts:37
Duration of an AIRAC cycle (28 days) in milliseconds.
Methods
getCurrentCycle()
static
getCurrentCycle(date
,out?
):AiracCycle
Defined in: src/sdk/navigation/AiracUtils.ts:105
Gets the current cycle for a given date.
Parameters
Parameter | Type | Description |
---|---|---|
date | Date | The date to determine the current cycle for. |
out? | Partial <AiracCycle > | An optional object to write the result to. If not specified a new object will be used. |
Returns
The AIRAC cycle information.
getCycleNumber()
static
getCycleNumber(effectiveTimestamp
):number
Defined in: src/sdk/navigation/AiracUtils.ts:91
Gets the AIRAC cycle number in the effective year, given the effective date.
Parameters
Parameter | Type | Description |
---|---|---|
effectiveTimestamp | number | The effective timestamp, in milliseconds since the UNIX epoch, to determine the cycle number for. |
Returns
number
The cycle number.
getOffsetCycle()
static
getOffsetCycle(baseCycle
,offset
,out?
):AiracCycle
Defined in: src/sdk/navigation/AiracUtils.ts:79
Gets a cycle offset from another cycle in increments of 28-days (the length of an AIRAC cycle).
Parameters
Parameter | Type | Description |
---|---|---|
baseCycle | AiracCycle | The base cycle to offset from. |
offset | number | The offset in number of cycles (i.e. 28-day increments). |
out? | Partial <AiracCycle > | An optional object to write the result to. If not specified a new object will be used. |
Returns
The AIRAC cycle information.
parseFacilitiesCycle()
static
parseFacilitiesCycle(facilitiesDateRange
,out?
):undefined
|AiracCycle
Defined in: src/sdk/navigation/AiracUtils.ts:49
Parses the MSFS facility database effective dates into an AIRAC cycle.
Parameters
Parameter | Type | Description |
---|---|---|
facilitiesDateRange | string | The MSFS facilities date range from the game var FLIGHT NAVDATA DATE RANGE . |
out? | Partial <AiracCycle > | An optional object to write the result to. If not specified a new object will be used. |
Returns
undefined
| AiracCycle
The AIRAC cycle information for the MSFS facility database, or undefined if an error occurs.