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
| Parameter | Type | Description |
|---|---|---|
data | SatelliteData | The data object used to hold the state of this satellite. |
Returns
GPSSatellite
Properties
position
readonlyposition:Vec2Subject
Defined in: src/sdk/instruments/GPSSat.ts:2092
The current satellite position, in zenith angle radians and hour angle radians.
positionCartesian
readonlypositionCartesian:Vec3Subject
Defined in: src/sdk/instruments/GPSSat.ts:2095
The current satellite position, in cartesian coordinates.
prn
readonlyprn:number
Defined in: src/sdk/instruments/GPSSat.ts:2083
The GPS PRN number for this satellite.
sbasGroup
readonlysbasGroup: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
readonlysignalStrength:Subject<number>
Defined in: src/sdk/instruments/GPSSat.ts:2098
The current satellite signal strength.
state
readonlystate: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
| Parameter | Type | Description |
|---|---|---|
ppos | GeoPoint | The current plane position. |
altitude | number | The 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
| Parameter | Type | Description |
|---|---|---|
invMaxZenithAngle | number | The 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
| Parameter | Type | Description |
|---|---|---|
simTime | number | The 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
| Parameter | Type | Description |
|---|---|---|
simTime | number | The current simulation time, as a Javascript timestamp. |
state? | GPSSatelliteState | The state to which to update this satellite. Defaults to this satellite's current state. |
areDiffCorrectionsDownloaded? | boolean | Whether 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
| Parameter | Type | Description |
|---|---|---|
simTime | number | The 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
| Parameter | Type | Description |
|---|---|---|
tracked | boolean | Whether 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
| Parameter | Type | Description |
|---|---|---|
apply | boolean | Whether 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
| Parameter | Type | Description |
|---|---|---|
inUse | boolean | Whether 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
| Parameter | Type | Description |
|---|---|---|
simTime | number | The current simulation time, as a Javascript timestamp. |
deltaTime | number | The amount of sim time that has elapsed since the last update, in milliseconds. |
distanceFromLastKnownPos | number | The distance, in great-arc radians, from the airplane's current actual position to its last known position. |
forceAcquireAndUse | boolean | Whether 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
| Parameter | Type | Description |
|---|---|---|
data | SatelliteData | The 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()
staticcalcHorizonAngle(altitude):number
Defined in: src/sdk/instruments/GPSSat.ts:2288
Calculates the horizon zenith angle.
Parameters
| Parameter | Type | Description |
|---|---|---|
altitude | number | The altitude, in meters. |
Returns
number
The calculated horizon zenith angle based on the current altitude.