Class: FlightPathCalculator
Defined in: src/sdk/flightplan/FlightPathCalculator.ts:162
Calculates the flight path vectors for a given set of legs.
Constructors
Constructor
new FlightPathCalculator(
facilityLoader,options,bus):FlightPathCalculator
Defined in: src/sdk/flightplan/FlightPathCalculator.ts:187
Creates an instance of the FlightPathCalculator.
Parameters
| Parameter | Type | Description |
|---|---|---|
facilityLoader | FacilityLoader | The facility loader to use with this instance. |
options | Readonly<FlightPathCalculatorInitOptions> | The options to use with this flight path calculator. |
bus | EventBus | An instance of the EventBus. |
Returns
FlightPathCalculator
Methods
calculateFlightPath()
calculateFlightPath(
legs,activeLegIndex,initialIndex,count):Promise<void>
Defined in: src/sdk/flightplan/FlightPathCalculator.ts:331
Calculates a flight path for a given set of flight plan legs.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
legs | LegDefinition[] | undefined | The legs of the flight plan to calculate. |
activeLegIndex | number | undefined | The index of the active leg. |
initialIndex | number | 0 | The index of the leg at which to start the calculation. |
count | number | Number.POSITIVE_INFINITY | The number of legs to calculate. |
Returns
Promise<void>
A Promise which is fulfilled when the calculation is finished.
createLegCalculatorMap()
protectedcreateLegCalculatorMap():Record<LegType,FlightPathLegCalculator>
Defined in: src/sdk/flightplan/FlightPathCalculator.ts:277
Creates a map from leg types to leg calculators.
Returns
Record<LegType, FlightPathLegCalculator>
A map from leg types to leg calculators.