Skip to main content

Interface: TrafficContact

A traffic contact.

Properties

groundSpeed

Readonly groundSpeed: NumberUnitReadOnly<Speed, Unit<Speed>>

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

Defined in

src/sdk/instruments/Traffic.ts:43


groundTrack

Readonly groundTrack: number

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

Defined in

src/sdk/instruments/Traffic.ts:46


lastAltitude

Readonly lastAltitude: NumberUnitReadOnly<Distance, Unit<Distance>>

The altitude of this contact at time of last contact.

Defined in

src/sdk/instruments/Traffic.ts:37


lastContactTime

Readonly lastContactTime: number

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

Defined in

src/sdk/instruments/Traffic.ts:31


lastHeading

Readonly lastHeading: number

The heading of this contact at time of last contact.

Defined in

src/sdk/instruments/Traffic.ts:40


lastPosition

Readonly lastPosition: GeoPointReadOnly

The position of this contact at time of last contact.

Defined in

src/sdk/instruments/Traffic.ts:34


uid

Readonly uid: number

A unique ID number assigned to this contact.

Defined in

src/sdk/instruments/Traffic.ts:28


verticalSpeed

Readonly verticalSpeed: NumberUnitReadOnly<Speed, Unit<Speed>>

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

Defined in

src/sdk/instruments/Traffic.ts:49

Methods

predict

predict(simTime, positionOut, altitudeOut): void

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

NameTypeDescription
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, Unit<Distance>>A NumberUnit object to which to write the predicted altitude.

Returns

void

Defined in

src/sdk/instruments/Traffic.ts:59