Skip to main content

Class: FlightPathCalculator

Calculates the flight path vectors for a given set of legs.

Constructors

constructor

new FlightPathCalculator(facilityLoader, options, bus): FlightPathCalculator

Creates an instance of the FlightPathCalculator.

Parameters

NameTypeDescription
facilityLoaderFacilityLoaderThe facility loader to use with this instance.
optionsReadonly<FlightPathCalculatorInitOptions>The options to use with this flight path calculator.
busEventBusAn instance of the EventBus.

Returns

FlightPathCalculator

Defined in

src/sdk/flightplan/FlightPathCalculator.ts:187

Methods

calculateFlightPath

calculateFlightPath(legs, activeLegIndex, initialIndex?, count?): Promise<void>

Calculates a flight path for a given set of flight plan legs.

Parameters

NameTypeDefault valueDescription
legsLegDefinition[]undefinedThe legs of the flight plan to calculate.
activeLegIndexnumberundefinedThe index of the active leg.
initialIndexnumber0The index of the leg at which to start the calculation.
countnumberNumber.POSITIVE_INFINITYThe number of legs to calculate.

Returns

Promise<void>

A Promise which is fulfilled when the calculation is finished.

Defined in

src/sdk/flightplan/FlightPathCalculator.ts:331


createLegCalculatorMap

createLegCalculatorMap(): Record<LegType, FlightPathLegCalculator>

Creates a map from leg types to leg calculators.

Returns

Record<LegType, FlightPathLegCalculator>

A map from leg types to leg calculators.

Defined in

src/sdk/flightplan/FlightPathCalculator.ts:277