Skip to main content

Class: NavSourceFormatter

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Graphics/Text/NavSourceFormatter.ts:11

Utility class for creating nav source name formatters.

Constructors

Constructor

new NavSourceFormatter(): NavSourceFormatter

Returns

NavSourceFormatter

Methods

create()

static create(showGpsIndex, showNavIndex): (sourceName) => string

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Graphics/Text/NavSourceFormatter.ts:18

Creates a function which generates formatted nav source names.

Parameters

ParameterTypeDescription
showGpsIndexbooleanWhether to show the index for GPS-type nav sources.
showNavIndexbooleanWhether to show the index for NAV-type nav sources.

Returns

A function which generates formatted nav source names.

(sourceName): string

Parameters
ParameterType
sourceNameG3XTouchNavSourceName
Returns

string


createForBearingPointerSetting()

static createForBearingPointerSetting(showNavIndex): (bearingPointerSource) => string

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Graphics/Text/NavSourceFormatter.ts:100

Creates a function which generates formatted nav source names for nav sources.

Parameters

ParameterTypeDescription
showNavIndexbooleanWhether to show the index for NAV-type nav sources.

Returns

A function which generates formatted nav source names for nav sources.

(bearingPointerSource): string

Parameters
ParameterType
bearingPointerSourcePfdBearingPointerSource
Returns

string


createForIndicator()

static createForIndicator(showGpsIndex, showNavIndex, showNavType): (indicator) => string

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Graphics/Text/NavSourceFormatter.ts:61

Creates a function which generates formatted nav source names for nav indicators.

Parameters

ParameterTypeDescription
showGpsIndexbooleanWhether to show the index for GPS-type nav sources.
showNavIndexbooleanWhether to show the index for NAV-type nav sources.
showNavTypebooleanWhether to show the navaid type (VOR vs LOC) for NAV-type nav sources. If false, 'VLOC' will be used as the name for all NAV-type sources.

Returns

A function which generates formatted nav source names for nav indicators.

(indicator): string

Parameters
ParameterType
indicatorG3XTouchNavIndicator
Returns

string


createForSource()

static createForSource(showGpsIndex, showNavIndex): (source) => string

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Graphics/Text/NavSourceFormatter.ts:42

Creates a function which generates formatted nav source names for nav sources.

Parameters

ParameterTypeDescription
showGpsIndexbooleanWhether to show the index for GPS-type nav sources.
showNavIndexbooleanWhether to show the index for NAV-type nav sources.

Returns

A function which generates formatted nav source names for nav sources.

(source): string

Parameters
ParameterType
sourceNavReferenceSource<G3XTouchNavSourceName>
Returns

string