Skip to main content

Interface: TrafficContact

Defined in: src/sdk/instruments/Traffic.ts:27

A traffic contact.

Properties​

groundSpeed​

readonly groundSpeed: NumberUnitReadOnly<Speed>

Defined in: src/sdk/instruments/Traffic.ts:47

The most recent calculated ground speed of this contact. Equal to NaN if not yet been calculated.


groundTrack​

readonly groundTrack: number

Defined in: src/sdk/instruments/Traffic.ts:50

The most recent calculated ground track of this contact. Equal to NaN if not yet been calculated.


lastAltitude​

readonly lastAltitude: NumberUnitReadOnly<Distance>

Defined in: src/sdk/instruments/Traffic.ts:41

The altitude of this contact at time of last contact.


lastContactTime​

readonly lastContactTime: number

Defined in: src/sdk/instruments/Traffic.ts:35

The last time of contact, in sim time, as a Javascript timestamp.


lastHeading​

readonly lastHeading: number

Defined in: src/sdk/instruments/Traffic.ts:44

The heading of this contact at time of last contact, in degrees.


lastPosition​

readonly lastPosition: GeoPointReadOnly

Defined in: src/sdk/instruments/Traffic.ts:38

The position of this contact at time of last contact.


name​

readonly name: string

Defined in: src/sdk/instruments/Traffic.ts:32

The name/callsign of this contact.


uid​

readonly uid: number

Defined in: src/sdk/instruments/Traffic.ts:29

A unique ID number assigned to this contact.


verticalSpeed​

readonly verticalSpeed: NumberUnitReadOnly<Speed>

Defined in: src/sdk/instruments/Traffic.ts:53

The most recent calculated vertical speed of this contact. Equal to NaN if not yet been calculated.

Methods​

predict()​

predict(simTime, positionOut, altitudeOut): void

Defined in: src/sdk/instruments/Traffic.ts:63

Calculates the predicted position and altitude of this contact at a specified time based on the most recent available data and stores the results in the supplied objects. If insufficient data are available to calculate the prediction, the results will be equal to NaN.

Parameters​

ParameterTypeDescription
simTimenumberThe sim time for which to calculate the prediction, as a UNIX millisecond timestamp.
positionOutGeoPointA GeoPoint object to which to write the predicted position.
altitudeOutNumberUnit<Distance>A NumberUnit object to which to write the predicted altitude.

Returns​

void