Class: GNSSPublisher
Defined in: src/sdk/instruments/GNSS.ts:99
A publisher for global positioning and inertial data.
Extends
Constructors
Constructor
new GNSSPublisher(
bus
,pacer
):GNSSPublisher
Defined in: src/sdk/instruments/GNSS.ts:140
Create an GNSSPublisher
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
bus | EventBus | undefined | The EventBus to publish to |
pacer | undefined | PublishPacer <GNSSEvents > | undefined | An optional pacer to use to control the rate of publishing |
Returns
GNSSPublisher
Overrides
Properties
bus
protected
readonly
bus:EventBus
Defined in: src/sdk/instruments/BasePublishers.ts:10
Inherited from
pacer
protected
readonly
pacer:undefined
|PublishPacer
<GNSSEvents
>
Defined in: src/sdk/instruments/BasePublishers.ts:13
Inherited from
publishActive
protected
publishActive:boolean
Defined in: src/sdk/instruments/BasePublishers.ts:12
Inherited from
publisher
protected
readonly
publisher:Publisher
<GNSSEvents
>
Defined in: src/sdk/instruments/BasePublishers.ts:11
Inherited from
Methods
isPublishing()
isPublishing():
boolean
Defined in: src/sdk/instruments/BasePublishers.ts:45
Tells whether or not the publisher is currently active.
Returns
boolean
True if the publisher is active, false otherwise.
Inherited from
onUpdate()
onUpdate():
void
Defined in: src/sdk/instruments/GNSS.ts:208
A callback called when the publisher receives an update cycle.
Returns
void
Overrides
publish()
protected
publish<K
>(topic
,data
,sync
,isCached
):void
Defined in: src/sdk/instruments/BasePublishers.ts:63
Publish a message if publishing is acpive
Type Parameters
Type Parameter |
---|
K extends keyof GNSSEvents |
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
topic | K | undefined | The topic key to publish to. |
data | GNSSEvents [K ] | undefined | The data type for chosen topic. |
sync | boolean | false | Whether or not the event should be synced to other instruments. Defaults to false . |
isCached | boolean | true | Whether or not the event should be cached. Defaults to true . |
Returns
void
Inherited from
startPublish()
startPublish():
void
Defined in: src/sdk/instruments/GNSS.ts:194
Start publishing.
Returns
void
Overrides
stopPublish()
stopPublish():
void
Defined in: src/sdk/instruments/GNSS.ts:201
Stop publishing.
Returns
void
Overrides
getInstantaneousTrack()
static
getInstantaneousTrack(defaultTrack?
,groundSpeedThreshold?
):number
Defined in: src/sdk/instruments/GNSS.ts:331
Gets the airplane's instantaneous true ground track, in degrees.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
defaultTrack? | number | undefined | The default value to return if the airplane's ground speed is less than the threshold. If not defined, then the airplane's true heading (obtained from the PLANE HEADING DEGREES TRUE SimVar) will be used as the default value. |
groundSpeedThreshold? | number | 0 | The ground speed, in knots, at or below which the default value is returned instead of the ground track. |
Returns
number
The airplane's instantaneous true ground track, in degrees, or the default value if the airplane's ground speed is less than or equal to the specified threshold.