Class: GPSSatellite
Defined in: src/sdk/instruments/GPSSat.ts:1894
A tracked GPS satellite.
Constructors
Constructor
new GPSSatellite(
prn
,sbasGroup
,ephemeris
,timingOptions
):GPSSatellite
Defined in: src/sdk/instruments/GPSSat.ts:1951
Creates an instance of a GPSSatellite.
Parameters
Parameter | Type | Description |
---|---|---|
prn | number | The GPS PRN number for this satellite. |
sbasGroup | undefined | string | Whether or not this satellite is a SBAS satellite. |
ephemeris | undefined | GPSEphemeris | The ephemeris data to use for position calculation. |
timingOptions | Readonly <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:1901
The current satellite position, in zenith angle radians and hour angle radians.
positionCartesian
readonly
positionCartesian:Vec3Subject
Defined in: src/sdk/instruments/GPSSat.ts:1904
The current satellite position, in cartesian coordinates.
prn
readonly
prn:number
Defined in: src/sdk/instruments/GPSSat.ts:1952
The GPS PRN number for this satellite.
sbasGroup
readonly
sbasGroup:undefined
|string
Defined in: src/sdk/instruments/GPSSat.ts:1953
Whether or not this satellite is a SBAS satellite.
signalStrength
readonly
signalStrength:Subject
<number
>
Defined in: src/sdk/instruments/GPSSat.ts:1907
The current satellite signal strength.
state
readonly
state:Subject
<GPSSatelliteState
>
Defined in: src/sdk/instruments/GPSSat.ts:1898
The current satellite state.
Accessors
areDiffCorrectionsDownloaded
Get Signature
get areDiffCorrectionsDownloaded():
boolean
Defined in: src/sdk/instruments/GPSSat.ts:1935
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:1918
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:1928
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:2065
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(
altitude
):void
Defined in: src/sdk/instruments/GPSSat.ts:2096
Calculates the current signal strength.
Parameters
Parameter | Type | Description |
---|---|---|
altitude | number | The current plane altitude in meters. |
Returns
void
computeSatellitePositions()
computeSatellitePositions(
simTime
):void
Defined in: src/sdk/instruments/GPSSat.ts:1962
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: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
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.
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
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.
setTracked()
setTracked(
tracked
):void
Defined in: src/sdk/instruments/GPSSat.ts:2134
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:2444
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:2420
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:2162
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.
calcHorizonAngle()
static
calcHorizonAngle(altitude
):number
Defined in: src/sdk/instruments/GPSSat.ts:2110
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.