Skip to main content

Class: GPSSatellite

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

A tracked GPS satellite.

Constructors

Constructor

new GPSSatellite(prn, sbasGroup, ephemeris, timingOptions): GPSSatellite

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

Creates an instance of a GPSSatellite.

Parameters

ParameterTypeDescription
prnnumberThe GPS PRN number for this satellite.
sbasGroupundefined | stringWhether or not this satellite is a SBAS satellite.
ephemerisundefined | GPSEphemerisThe ephemeris data to use for position calculation.
timingOptionsReadonly<Required<GPSSatelliteTimingOptions>>Options with which to configure the timing of this satellite's state changes.

Returns

GPSSatellite

Properties

position

readonly position: Vec2Subject

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

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


positionCartesian

readonly positionCartesian: Vec3Subject

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

The current satellite position, in cartesian coordinates.


prn

readonly prn: number

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

The GPS PRN number for this satellite.


sbasGroup

readonly sbasGroup: undefined | string

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

Whether or not this satellite is a SBAS satellite.


signalStrength

readonly signalStrength: Subject<number>

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

The current satellite signal strength.


state

readonly state: Subject<GPSSatelliteState>

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

The current satellite state.

Accessors

areDiffCorrectionsDownloaded

Get Signature

get areDiffCorrectionsDownloaded(): boolean

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

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

Returns

boolean


lastEphemerisTime

Get Signature

get lastEphemerisTime(): undefined | number

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

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

undefined | number


lastUnreachableTime

Get Signature

get lastUnreachableTime(): undefined | number

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

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

undefined | number

Methods

applyProjection()

applyProjection(ppos, altitude): void

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

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:2097

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:1963

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:2126

Erases this satellite's cached ephemeris data.

Returns

void


forceUpdateState()

forceUpdateState(simTime, state, areDiffCorrectionsDownloaded): boolean

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

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

Parameters

ParameterTypeDescription
simTimenumberThe current simulation time, as a Javascript timestamp.
stateGPSSatelliteStateThe state to which to update this satellite. Defaults to this satellite's current state.
areDiffCorrectionsDownloadedbooleanWhether 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.


isCachedEphemerisValid()

isCachedEphemerisValid(simTime): boolean

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

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.


setTracked()

setTracked(tracked): void

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

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:2444

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:2420

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:2162

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.


calcHorizonAngle()

static calcHorizonAngle(altitude): number

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

Calculates the horizon zenith angle.

Parameters

ParameterTypeDescription
altitudenumberThe altitude, in meters.

Returns

number

The calculated horizon zenith angle based on the current altitude.