Class: AiracUtils
Utilities for AIRAC cycles.
Constructors
constructor
• new AiracUtils(): AiracUtils
Returns
Properties
CYCLE_DURATION
▪ Static
Readonly
CYCLE_DURATION: number
Duration of an AIRAC cycle (28 days) in milliseconds.
Defined in
src/sdk/navigation/AiracUtils.ts:37
Methods
getCurrentCycle
▸ getCurrentCycle(date
, out?
): AiracCycle
Gets the current cycle for a given date.
Parameters
Name | 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.
Defined in
src/sdk/navigation/AiracUtils.ts:105
getCycleNumber
▸ getCycleNumber(effectiveTimestamp
): number
Gets the AIRAC cycle number in the effective year, given the effective date.
Parameters
Name | Type | Description |
---|---|---|
effectiveTimestamp | number | The effective timestamp, in milliseconds since the UNIX epoch, to determine the cycle number for. |
Returns
number
The cycle number.
Defined in
src/sdk/navigation/AiracUtils.ts:91
getOffsetCycle
▸ getOffsetCycle(baseCycle
, offset
, out?
): AiracCycle
Gets a cycle offset from another cycle in increments of 28-days (the length of an AIRAC cycle).
Parameters
Name | 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.
Defined in
src/sdk/navigation/AiracUtils.ts:79
parseFacilitiesCycle
▸ parseFacilitiesCycle(facilitiesDateRange
, out?
): undefined
| AiracCycle
Parses the MSFS facility database effective dates into an AIRAC cycle.
Parameters
Name | 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.
Defined in
src/sdk/navigation/AiracUtils.ts:49