Skip to main content

Class: NavDataBarFieldFodModelFactory

Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldTypeModelFactories.ts:727

Creates data models for Fuel Over Destination navigation data bar fields.

The models calculate fuel over destination using the fuel data retrieved from the event bus topics fuel_usable_total and fuel_flow_total (defined in EngineEvents), the ground speed retrieved from the topic ground_speed (defined in GNSSEvents), and the LNAV data retrieved from the topics lnav_is_tracking (defined in LNavEvents) and lnavdata_destination_distance (defined in LNavDataEvents).

Extends

Constructors

Constructor

new NavDataBarFieldFodModelFactory(bus, lnavIndex, fuelUnit): NavDataBarFieldFodModelFactory

Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldTypeModelFactories.ts:737

Creates a new instance of NavDataBarFieldFodModelFactory.

Parameters

ParameterTypeDefault valueDescription
busEventBusundefinedThe event bus.
lnavIndexnumber | Subscribable<number>0The index of the LNAV from which to source data. Defaults to 0.
fuelUnitUnit<Weight>UnitType.GALLON_FUELThe unit with which to interpret fuel values retrieved from the event bus. The unit should define the weight equivalent of one U.S. gallon of fuel. Defaults to UnitType.GALLON_FUEL.

Returns

NavDataBarFieldFodModelFactory

Overrides

EventBusNavDataBarFieldTypeModelFactory.constructor

Properties

fuelUnit

protected readonly fuelUnit: Unit<Weight> = UnitType.GALLON_FUEL

Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldTypeModelFactories.ts:740

The unit with which to interpret fuel values retrieved from the event bus. The unit should define the weight equivalent of one U.S. gallon of fuel. Defaults to UnitType.GALLON_FUEL.


protected readonly lnavIndex: number | Subscribable<number> = 0

Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldTypeModelFactories.ts:739

The index of the LNAV from which to source data. Defaults to 0.


sub

protected readonly sub: EventSubscriber<GNSSEvents & LNavEvents & LNavDataEvents & BaseNonIndexedEngineEvents & BaseEngineIndexedEngineEvents & IndexedEngineEvents>

Defined in: src/garminsdk/components/navdatabar/EventBusNavDataBarFieldTypeModelFactory.ts:12

Inherited from

EventBusNavDataBarFieldTypeModelFactory.sub

Methods

create()

create(gpsValidity): NavDataBarFieldModel<NumberUnitInterface<Weight, Unit<Weight>>>

Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldTypeModelFactories.ts:746

Creates a navigation data bar field data model for this factory's data field type.

Parameters

ParameterTypeDescription
gpsValiditySubscribable<NavDataFieldGpsValidity>The subscribable that provides the validity of the GPS data for the models.

Returns

NavDataBarFieldModel<NumberUnitInterface<Weight, Unit<Weight>>>

A navigation data bar field data model for this factory's data field type.

Overrides

EventBusNavDataBarFieldTypeModelFactory.create