Skip to main content

Class: GPSSatComputer

Defined in: src/sdk/instruments/GPSSat.ts:351

An instrument that computes GPS satellite information.

Implements​

Constructors​

Constructor​

new GPSSatComputer(index, bus, ephemerisFile, sbasFile, updateInterval, enabledSBASGroups, syncRole, options?): GPSSatComputer

Defined in: src/sdk/instruments/GPSSat.ts:500

Creates an instance of GPSSatComputer.

Parameters​

ParameterTypeDefault valueDescription
indexnumberundefinedThe index of this computer.
busEventBusundefinedAn instance of the event bus.
ephemerisFilestringundefinedThe HTTP path to the ephemeris file to use for computations.
sbasFilestringundefinedThe HTTP path to the SBAS definitions file.
updateIntervalnumberundefinedThe interval in milliseconds to update the satellite positions.
enabledSBASGroupsundefined | SubscribableSet<string> | Iterable<string>undefinedThe names of the SBAS satellite groups for which signal reception is enabled. If the computer's sync role is replica, then this parameter is ignored and the computer will sync enabled SBAS groups from the primary instance.
syncRole"none" | "primary" | "replica"'none'This computer's sync role. A primary computer will broadcast sync events through the event bus that allow corresponding replica computers to sync their state with the primary. A computer with a sync role of none neither broadcasts sync events nor receives them; it maintains its own independent state. Defaults to none.
options?Readonly<GPSSatComputerOptions>undefinedOptions with which to configure the computer.

Returns​

GPSSatComputer

Properties​

index​

readonly index: number

Defined in: src/sdk/instruments/GPSSat.ts:501

The index of this computer.


nominalChannelCount​

readonly nominalChannelCount: null | number

Defined in: src/sdk/instruments/GPSSat.ts:421

The nominal total number of receiver channels supported by this computer, or null if this computer supports an unlimited number of channels.


syncRole​

readonly syncRole: "none" | "primary" | "replica" = 'none'

Defined in: src/sdk/instruments/GPSSat.ts:507

This computer's sync role. A primary computer will broadcast sync events through the event bus that allow corresponding replica computers to sync their state with the primary. A computer with a sync role of none neither broadcasts sync events nor receives them; it maintains its own independent state. Defaults to none.

Accessors​

hdop​

Get Signature​

get hdop(): number

Defined in: src/sdk/instruments/GPSSat.ts:470

Gets this system's current horizontal dilution of precision value (HDOP), or -1 if this system has not acquired a position solution.

Returns​

number

This system's current horizontal dilution of precision value (HDOP), or -1 if this system has not acquired a position solution.


pdop​

Get Signature​

get pdop(): number

Defined in: src/sdk/instruments/GPSSat.ts:460

Gets this system's current position dilution of precision value (PDOP), or -1 if this system has not acquired a position solution.

Returns​

number

This system's current position dilution of precision value (PDOP), or -1 if this system has not acquired a position solution.


sats​

Get Signature​

get sats(): readonly GPSSatellite[]

Defined in: src/sdk/instruments/GPSSat.ts:434

Gets the current satellites that are being tracked by this computer.

Returns​

readonly GPSSatellite[]

The collection of current satellites.


sbasState​

Get Signature​

get sbasState(): GPSSystemSBASState

Defined in: src/sdk/instruments/GPSSat.ts:450

Gets the current GPS system SBAS state.

Returns​

GPSSystemSBASState

The current GPS system SBAS state.


state​

Get Signature​

get state(): GPSSystemState

Defined in: src/sdk/instruments/GPSSat.ts:442

Gets the current GPS system state.

Returns​

GPSSystemState

The current GPS system state.


vdop​

Get Signature​

get vdop(): number

Defined in: src/sdk/instruments/GPSSat.ts:480

Gets this system's current vertical dilution of precision value (VDOP), or -1 if this system has not acquired a position solution.

Returns​

number

This system's current vertical dilution of precision value (VDOP), or -1 if this system has not acquired a position solution.

Methods​

acquireAndUseSatellites()​

acquireAndUseSatellites(): void

Defined in: src/sdk/instruments/GPSSat.ts:797

Instantly chooses the optimal satellites to track for all receiver channels, then acquires and downloads all data (ephemeris, almanac, and differential corrections) from tracked satellites with sufficient signal strength. If this system is not initialized, the operation will be delayed until just after initialization, unless reset() is called in the interim.

Has no effect if this system is a replica.

Returns​

void


calcHorizonAngle()​

calcHorizonAngle(): number

Defined in: src/sdk/instruments/GPSSat.ts:733

Calculates the horizon zenith angle.

Returns​

number

The calculated horizon zenith angle based on the current altitude.


downloadAlamanac()​

downloadAlamanac(simTime): void

Defined in: src/sdk/instruments/GPSSat.ts:767

Forces this computer to immediately download a complete alamanac.

Parameters​

ParameterTypeDescription
simTimenumberThe simulation time at which the almanac is considered to have been downloaded, as a Javascript timestamp. Defaults to the current simulation time.

Returns​

void


eraseAlamanac()​

eraseAlamanac(): void

Defined in: src/sdk/instruments/GPSSat.ts:775

Erases this computer's downloaded almanac and any partial download progress.

Returns​

void


eraseCachedEphemeris()​

eraseCachedEphemeris(): void

Defined in: src/sdk/instruments/GPSSat.ts:783

Erases this computer's cached ephemeris data for all satellites.

Returns​

void


eraseLastKnownPosition()​

eraseLastKnownPosition(): void

Defined in: src/sdk/instruments/GPSSat.ts:748

Erases this computer's last known position.

Returns​

void


init()​

init(): void

Defined in: src/sdk/instruments/GPSSat.ts:586

Initializes this instrument.

Returns​

void

Implementation of​

Instrument.init


isAlmanacValid()​

isAlmanacValid(simTime): boolean

Defined in: src/sdk/instruments/GPSSat.ts:758

Checks whether this computer's downloaded almanac data is valid at a given simulation time.

Parameters​

ParameterTypeDescription
simTimenumberThe simulation time at which to check for almanac validity, as a Javascript timestamp. Defaults to the current simulation time.

Returns​

boolean

Whether this computer's downloaded almanac data is valid at the specified simulation time.


onUpdate()​

onUpdate(): void

Defined in: src/sdk/instruments/GPSSat.ts:852

Updates this instrument.

Returns​

void

Implementation of​

Instrument.onUpdate


reset()​

reset(): void

Defined in: src/sdk/instruments/GPSSat.ts:816

Resets the GPSSatComputer system. This will set the state of the system to GPSSystemState.Searching, unassign all receiver channels, and set the state of every satellite to GPSSatelliteState.None.

If this system is not initialized, this method has no effect other than to cancel any pending operations triggered by previous calls to acquireAndUseSatellites().

Returns​

void


syncLastKnownPosition()​

syncLastKnownPosition(pos): void

Defined in: src/sdk/instruments/GPSSat.ts:741

Syncs this computer's last known position with a given value.

Parameters​

ParameterTypeDescription
posLatLonInterfaceThe position with which to sync the last known position. Defaults to the airplane's current position.

Returns​

void