Skip to main content

Class: AiracUtils

Utilities for AIRAC cycles.

Constructors

constructor

new AiracUtils(): AiracUtils

Returns

AiracUtils

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

NameTypeDescription
dateDateThe 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

AiracCycle

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

NameTypeDescription
effectiveTimestampnumberThe 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

NameTypeDescription
baseCycleAiracCycleThe base cycle to offset from.
offsetnumberThe 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

AiracCycle

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

NameTypeDescription
facilitiesDateRangestringThe 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