Class: GPSSatComputer
An instrument that computes GPS satellite information.
Implements
Constructors
constructor
• new GPSSatComputer(index
, bus
, ephemerisFile
, sbasFile
, updateInterval
, enabledSBASGroups
, syncRole?
, options?
): GPSSatComputer
Creates an instance of GPSSatComputer.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
index | number | undefined | The index of this computer. |
bus | EventBus | undefined | An instance of the event bus. |
ephemerisFile | string | undefined | The HTTP path to the ephemeris file to use for computations. |
sbasFile | string | undefined | The HTTP path to the SBAS definitions file. |
updateInterval | number | undefined | The interval in milliseconds to update the satellite positions. |
enabledSBASGroups | undefined | SubscribableSet <string > | Iterable <string > | undefined | The 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 > | undefined | Options with which to configure the computer. |
Returns
Defined in
src/sdk/instruments/GPSSat.ts:500
Properties
index
• Readonly
index: number
The index of this computer.
Defined in
src/sdk/instruments/GPSSat.ts:501
nominalChannelCount
• Readonly
nominalChannelCount: null
| number
The nominal total number of receiver channels supported by this computer, or null
if this computer supports an
unlimited number of channels.
Defined in
src/sdk/instruments/GPSSat.ts:421
syncRole
• Readonly
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
.
Defined in
src/sdk/instruments/GPSSat.ts:507
Accessors
hdop
• get
hdop(): number
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.
Defined in
src/sdk/instruments/GPSSat.ts:470
pdop
• get
pdop(): number
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.
Defined in
src/sdk/instruments/GPSSat.ts:460
sats
• get
sats(): readonly GPSSatellite
[]
Gets the current satellites that are being tracked by this computer.
Returns
readonly GPSSatellite
[]
The collection of current satellites.
Defined in
src/sdk/instruments/GPSSat.ts:434
sbasState
• get
sbasState(): GPSSystemSBASState
Gets the current GPS system SBAS state.
Returns
The current GPS system SBAS state.
Defined in
src/sdk/instruments/GPSSat.ts:450
state
• get
state(): GPSSystemState
Gets the current GPS system state.
Returns
The current GPS system state.
Defined in
src/sdk/instruments/GPSSat.ts:442
vdop
• get
vdop(): number
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.
Defined in
src/sdk/instruments/GPSSat.ts:480
Methods
acquireAndUseSatellites
▸ acquireAndUseSatellites(): void
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
Defined in
src/sdk/instruments/GPSSat.ts:797
calcHorizonAngle
▸ calcHorizonAngle(): number
Calculates the horizon zenith angle.
Returns
number
The calculated horizon zenith angle based on the current altitude.
Defined in
src/sdk/instruments/GPSSat.ts:733
downloadAlamanac
▸ downloadAlamanac(simTime?
): void
Forces this computer to immediately download a complete alamanac.
Parameters
Name | Type | Description |
---|---|---|
simTime | number | The simulation time at which the almanac is considered to have been downloaded, as a Javascript timestamp. Defaults to the current simulation time. |
Returns
void
Defined in
src/sdk/instruments/GPSSat.ts:767
eraseAlamanac
▸ eraseAlamanac(): void
Erases this computer's downloaded almanac and any partial download progress.
Returns
void
Defined in
src/sdk/instruments/GPSSat.ts:775
eraseCachedEphemeris
▸ eraseCachedEphemeris(): void
Erases this computer's cached ephemeris data for all satellites.
Returns
void
Defined in
src/sdk/instruments/GPSSat.ts:783
eraseLastKnownPosition
▸ eraseLastKnownPosition(): void
Erases this computer's last known position.
Returns
void
Defined in
src/sdk/instruments/GPSSat.ts:748
init
▸ init(): void
Initializes this instrument.
Returns
void
Implementation of
Defined in
src/sdk/instruments/GPSSat.ts:586
isAlmanacValid
▸ isAlmanacValid(simTime?
): boolean
Checks whether this computer's downloaded almanac data is valid at a given simulation time.
Parameters
Name | Type | Description |
---|---|---|
simTime | number | The 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.
Defined in
src/sdk/instruments/GPSSat.ts:758
onUpdate
▸ onUpdate(): void
Updates this instrument.
Returns
void
Implementation of
Defined in
src/sdk/instruments/GPSSat.ts:852
reset
▸ reset(): void
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
Defined in
src/sdk/instruments/GPSSat.ts:816
syncLastKnownPosition
▸ syncLastKnownPosition(pos?
): void
Syncs this computer's last known position with a given value.
Parameters
Name | Type | Description |
---|---|---|
pos | LatLonInterface | The position with which to sync the last known position. Defaults to the airplane's current position. |
Returns
void
Defined in
src/sdk/instruments/GPSSat.ts:741