Skip to main content

Class: GPSSatellite

A tracked GPS satellite.

Constructors

constructor

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

Creates an instance of a GPSSatellite.

Parameters

NameTypeDescription
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

Defined in

src/sdk/instruments/GPSSat.ts:1951

Properties

position

Readonly position: Vec2Subject

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

Defined in

src/sdk/instruments/GPSSat.ts:1901


positionCartesian

Readonly positionCartesian: Vec3Subject

The current satellite position, in cartesian coordinates.

Defined in

src/sdk/instruments/GPSSat.ts:1904


prn

Readonly prn: number

The GPS PRN number for this satellite.

Defined in

src/sdk/instruments/GPSSat.ts:1952


sbasGroup

Readonly sbasGroup: undefined | string

Whether or not this satellite is a SBAS satellite.

Defined in

src/sdk/instruments/GPSSat.ts:1953


signalStrength

Readonly signalStrength: Subject<number>

The current satellite signal strength.

Defined in

src/sdk/instruments/GPSSat.ts:1907


state

Readonly state: Subject<GPSSatelliteState>

The current satellite state.

Defined in

src/sdk/instruments/GPSSat.ts:1898

Accessors

areDiffCorrectionsDownloaded

get areDiffCorrectionsDownloaded(): boolean

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

Returns

boolean

Defined in

src/sdk/instruments/GPSSat.ts:1935


lastEphemerisTime

get lastEphemerisTime(): undefined | number

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

Defined in

src/sdk/instruments/GPSSat.ts:1918


lastUnreachableTime

get lastUnreachableTime(): undefined | number

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

Defined in

src/sdk/instruments/GPSSat.ts:1928

Methods

applyProjection

applyProjection(ppos, altitude): void

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

Parameters

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

Returns

void

Defined in

src/sdk/instruments/GPSSat.ts:2065


calculateSignalStrength

calculateSignalStrength(altitude): void

Calculates the current signal strength.

Parameters

NameTypeDescription
altitudenumberThe current plane altitude in meters.

Returns

void

Defined in

src/sdk/instruments/GPSSat.ts:2096


computeSatellitePositions

computeSatellitePositions(simTime): void

Computes the current satellite positions given the loaded ephemeris data.

Parameters

NameTypeDescription
simTimenumberThe current simulator time, in milliseconds UNIX epoch

Returns

void

Defined in

src/sdk/instruments/GPSSat.ts:1962


eraseCachedEphemeris

eraseCachedEphemeris(): void

Erases this satellite's cached ephemeris data.

Returns

void

Defined in

src/sdk/instruments/GPSSat.ts:2126


forceUpdateState

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

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

Parameters

NameTypeDescription
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.

Defined in

src/sdk/instruments/GPSSat.ts:2382


isCachedEphemerisValid

isCachedEphemerisValid(simTime): boolean

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

Parameters

NameTypeDescription
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.

Defined in

src/sdk/instruments/GPSSat.ts:2119


setTracked

setTracked(tracked): void

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

Parameters

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

Returns

void

Defined in

src/sdk/instruments/GPSSat.ts:2134


updateDiffCorrectionsApplied

updateDiffCorrectionsApplied(apply): boolean

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

Parameters

NameTypeDescription
applybooleanWhether differential corrections are applied.

Returns

boolean

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

Defined in

src/sdk/instruments/GPSSat.ts:2444


updateInUse

updateInUse(inUse): boolean

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

Parameters

NameTypeDescription
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.

Defined in

src/sdk/instruments/GPSSat.ts:2420


updateState

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

Updates the state of the satellite.

Parameters

NameTypeDescription
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.

Defined in

src/sdk/instruments/GPSSat.ts:2162


calcHorizonAngle

calcHorizonAngle(altitude): number

Calculates the horizon zenith angle.

Parameters

NameTypeDescription
altitudenumberThe altitude, in meters.

Returns

number

The calculated horizon zenith angle based on the current altitude.

Defined in

src/sdk/instruments/GPSSat.ts:2110