Interface: FlightPlanPredictionsProvider
Interface for a system providing performance predictions for a flight plan and optional arbitrary facility entries
Properties
onPredictionsUpdated
• Readonly
onPredictionsUpdated: SubEventInterface
<FlightPlanPredictionsProvider
, void
>
Fires when any predictions have been updated.
Defined in
src/sdk/utils/predictions/FlightPlanPredictionProvider.ts:239
Methods
getDestinationPredictions
▸ getDestinationPredictions(): undefined
| Readonly
<Predictions
<GeoPoint
>>
Returns predictions for the MAP leg, or the last leg of the flight plan (with great circle distance to the destination added) if one does not exist
Note: The object reference returned by this method is not safe to keep around or mutate.
Returns
undefined
| Readonly
<Predictions
<GeoPoint
>>
a Predictions object
Defined in
src/sdk/utils/predictions/FlightPlanPredictionProvider.ts:164
getPredictionsForAltitude
▸ getPredictionsForAltitude(altitude
, predictActiveLeg?
): undefined
| Readonly
<Predictions
<GeoPoint
>>
Returns a prediction at the point at which the given altitude will be reached
Note: The object reference returned by this method is not safe to keep around or mutate.
Parameters
Name | Type | Description |
---|---|---|
altitude | number | the altitude used to predict the time, in metres |
predictActiveLeg? | boolean | Whether to use the current aircraft state to predict the active leg. Defaults to false. |
Returns
undefined
| Readonly
<Predictions
<GeoPoint
>>
a Predictions object, or undefined
if no prediction is
available (for example, if the altitude will never be reached)
Defined in
src/sdk/utils/predictions/FlightPlanPredictionProvider.ts:220
getPredictionsForDistance
▸ getPredictionsForDistance(distance
, predictActiveLeg?
): undefined
| Readonly
<Predictions
<GeoPoint
>>
Returns a prediction at the point at which the given distance (along track from aircraft present position) will be reached
Note: The object reference returned by this method is not safe to keep around or mutate.
Parameters
Name | Type | Description |
---|---|---|
distance | number | the distance used to predict the time, in metres |
predictActiveLeg? | boolean | Whether to use the current aircraft state to predict the active leg. Defaults to false. |
Returns
undefined
| Readonly
<Predictions
<GeoPoint
>>
a Predictions object, or undefined
if no prediction is
available (for example, if the distance will never be reached)
Defined in
src/sdk/utils/predictions/FlightPlanPredictionProvider.ts:234
getPredictionsForLeg
▸ getPredictionsForLeg(globalLegIndex
): undefined
| Readonly
<Predictions
<GeoPoint
>>
Returns predictions for a leg located at a given global index
Note: The object reference returned by this method is not safe to keep around or mutate.
Parameters
Name | Type | Description |
---|---|---|
globalLegIndex | number | the global leg index |
Returns
undefined
| Readonly
<Predictions
<GeoPoint
>>
a Predictions object
Defined in
src/sdk/utils/predictions/FlightPlanPredictionProvider.ts:154
getPredictionsForTime
▸ getPredictionsForTime(time
, predictActiveLeg?
): undefined
| Readonly
<Predictions
<GeoPoint
>>
Returns a prediction at the point at which the given time will be reached
Note: The object reference returned by this method is not safe to keep around or mutate.
Parameters
Name | Type | Description |
---|---|---|
time | number | the time used to predict the distance, in UNIX timestamp seconds. |
predictActiveLeg? | boolean | Whether to use the current aircraft state to predict the active leg. Defaults to false. |
Returns
undefined
| Readonly
<Predictions
<GeoPoint
>>
a Predictions object, or undefined
if no prediction is
available (for example, if the time will never be reached)
Defined in
src/sdk/utils/predictions/FlightPlanPredictionProvider.ts:206
getPredictionsForTrackedFacility
▸ getPredictionsForTrackedFacility(id
): undefined
| Readonly
<Predictions
<GeoPoint
>>
Returns predictions for an already tracked arbitrary facility
Note: The object reference returned by this method is not safe to keep around or mutate.
Parameters
Name | Type | Description |
---|---|---|
id | string | the tracking entry's unique ID |
Returns
undefined
| Readonly
<Predictions
<GeoPoint
>>
a Predictions object
Defined in
src/sdk/utils/predictions/FlightPlanPredictionProvider.ts:175
iteratePredictions
▸ iteratePredictions(startGlobalLegIndex?
): Generator
<undefined
| Predictions
<GeoPoint
>, void
, unknown
>
Returns a predictions generator starting at the provided leg index
Parameters
Name | Type | Description |
---|---|---|
startGlobalLegIndex? | number | the leg index at which to start producing predictions at (defaults to 0) |
Returns
Generator
<undefined
| Predictions
<GeoPoint
>, void
, unknown
>
Defined in
src/sdk/utils/predictions/FlightPlanPredictionProvider.ts:136
iteratePredictionsReverse
▸ iteratePredictionsReverse(startGlobalLegIndex?
): Generator
<undefined
| Predictions
<GeoPoint
>, void
, unknown
>
Returns a predictions generator starting at the provided leg index, going backwards
Parameters
Name | Type | Description |
---|---|---|
startGlobalLegIndex? | number | the leg index at which to start producing predictions at (defaults to plan.length - 1) |
Returns
Generator
<undefined
| Predictions
<GeoPoint
>, void
, unknown
>
Defined in
src/sdk/utils/predictions/FlightPlanPredictionProvider.ts:143
startTrackingFacility
▸ startTrackingFacility(id
, entry
): void
Starts tracking an arbitrary facility
Parameters
Name | Type | Description |
---|---|---|
id | string | a unique ID to retrieve predictions with |
entry | FacilityPredictionsTrackingEntry | the facility tracking entry object |
Returns
void
Defined in
src/sdk/utils/predictions/FlightPlanPredictionProvider.ts:183
stopTrackingFacility
▸ stopTrackingFacility(id
): boolean
Stops tracking an arbitrary facility
Parameters
Name | Type | Description |
---|---|---|
id | string | the tracking entry's unique ID |
Returns
boolean
whether any tracking entry was removed
Defined in
src/sdk/utils/predictions/FlightPlanPredictionProvider.ts:192