Skip to main content

Class: GPSSatellite

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

A tracked GPS satellite.

Constructors

Constructor

new GPSSatellite(data): GPSSatellite

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

Creates a new instance of GPSSatellite.

Parameters

ParameterTypeDescription
dataSatelliteDataThe data object used to hold the state of this satellite.

Returns

GPSSatellite

Properties

position

readonly position: Vec2Subject

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

The current satellite position, in zenith angle radians and hour angle radians.


positionCartesian

readonly positionCartesian: Vec3Subject

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

The current satellite position, in cartesian coordinates.


prn

readonly prn: number

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

The GPS PRN number for this satellite.


sbasGroup

readonly sbasGroup: string | undefined

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

The SBAS group to which this satellite belongs, or undefined if this satellite is not an SBAS satellite.


signalStrength

readonly signalStrength: Subject<number>

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

The current satellite signal strength.


state

readonly state: Subject<GPSSatelliteState>

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

The current satellite state.

Accessors

areDiffCorrectionsDownloaded

Get Signature

get areDiffCorrectionsDownloaded(): boolean

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

Whether SBAS differential correction data have been downloaded from this satellite.

Returns

boolean


lastEphemerisTime

Get Signature

get lastEphemerisTime(): number | undefined

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

The most recent simulation time at which this satellite's ephemeris was downloaded, as a Javascript timestamp, or undefined if this satellite's ephemeris has not yet been downloaded.

Returns

number | undefined


lastUnreachableTime

Get Signature

get lastUnreachableTime(): number | undefined

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

The most recent simulation time at which this satellite was confirmed to be unreachable, as a Javascript timestamp, or undefined if this satellite has not been confirmed to be unreachable.

Returns

number | undefined

Methods

applyProjection()

applyProjection(ppos, altitude): void

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

Applies a projection to the satellite cartesian coordinates to convert to zenith and hour angles.

Parameters

ParameterTypeDescription
pposGeoPointThe current plane position.
altitudenumberThe current plane altitude in meters.

Returns

void


calculateSignalStrength()

calculateSignalStrength(invMaxZenithAngle): void

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

Calculates the current signal strength.

Parameters

ParameterTypeDescription
invMaxZenithAnglenumberThe inverse of the maximum zenith angle at which a satellite can still have line of sight, in radians.

Returns

void


computeSatellitePositions()

computeSatellitePositions(simTime): void

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

Computes the current satellite positions given the loaded ephemeris data.

Parameters

ParameterTypeDescription
simTimenumberThe current simulator time, in milliseconds UNIX epoch

Returns

void


eraseCachedEphemeris()

eraseCachedEphemeris(): void

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

Erases this satellite's cached ephemeris data.

Returns

void


forceUpdateState()

forceUpdateState(simTime, state?, areDiffCorrectionsDownloaded?): boolean

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

Forces an update of this satellite's state to a specific value.

Parameters

ParameterTypeDescription
simTimenumberThe current simulation time, as a Javascript timestamp.
state?GPSSatelliteStateThe state to which to update this satellite. Defaults to this satellite's current state.
areDiffCorrectionsDownloaded?booleanWhether to force differential corrections to be downloaded. Defaults to the satellite's current differential corrections download state.

Returns

boolean

Whether this satellite's state changed as a result of the update.

Deprecated

Do not use.


isCachedEphemerisValid()

isCachedEphemerisValid(simTime): boolean

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

Checks whether this satellite's cached ephemeris data is valid at a given simulation time.

Parameters

ParameterTypeDescription
simTimenumberThe simulation time at which to check for ephemeris validity, as a Javascript timestamp.

Returns

boolean

Whether this satellite's cached ephemeris data is valid at the specified simulation time.


resetState()

resetState(): void

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

Resets this satellite to be untracked and sets this satellite's state to GPSSatelliteState.None.

Returns

void


setTracked()

setTracked(tracked): void

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

Sets whether this satellite is being tracked by a receiver channel.

Parameters

ParameterTypeDescription
trackedbooleanWhether this satellite is being tracked by a receiver channel.

Returns

void


updateDiffCorrectionsApplied()

updateDiffCorrectionsApplied(apply): boolean

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

Updates whether differential corrections are applied to this satellite's ranging data when they are used to calculate a position solution.

Parameters

ParameterTypeDescription
applybooleanWhether differential corrections are applied.

Returns

boolean

Whether this satellite's state changed as a result of the update.


updateInUse()

updateInUse(inUse): boolean

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

Updates whether this satellite is being used to calculate a position solution.

Parameters

ParameterTypeDescription
inUsebooleanWhether the satellite is being used to calculate a position solution.

Returns

boolean

Whether this satellite's state changed as a result of the update.


updateState()

updateState(simTime, deltaTime, distanceFromLastKnownPos, forceAcquireAndUse): boolean

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

Updates the state of the satellite.

Parameters

ParameterTypeDescription
simTimenumberThe current simulation time, as a Javascript timestamp.
deltaTimenumberThe amount of sim time that has elapsed since the last update, in milliseconds.
distanceFromLastKnownPosnumberThe distance, in great-arc radians, from the airplane's current actual position to its last known position.
forceAcquireAndUsebooleanWhether to force this satellite to the highest possible use state (GPSSatelliteState.DataCollected) if signal strength is sufficient.

Returns

boolean

Whether this satellite's state changed as a result of the update.


updateStateFromData()

updateStateFromData(data): boolean

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

Updates this satellite's state to be equal to that defined by a given satellite data object.

Parameters

ParameterTypeDescription
dataSatelliteDataThe data object describing the state from which to update this satellite.

Returns

boolean

Whether this satellite's state changed as a result of the update.


calcHorizonAngle()

static calcHorizonAngle(altitude): number

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

Calculates the horizon zenith angle.

Parameters

ParameterTypeDescription
altitudenumberThe altitude, in meters.

Returns

number

The calculated horizon zenith angle based on the current altitude.