Skip to main content

Class: NavSourceFormatter

Utility class for creating nav source name formatters.

Constructors

constructor

new NavSourceFormatter(): NavSourceFormatter

Returns

NavSourceFormatter

Methods

create

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

Creates a function which generates formatted nav source names.

Parameters

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

Returns

fn

A function which generates formatted nav source names.

▸ (sourceName): string

Parameters
NameType
sourceNameG3XTouchNavSourceName
Returns

string

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Graphics/Text/NavSourceFormatter.ts:18


createForBearingPointerSetting

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

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

Parameters

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

Returns

fn

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

▸ (bearingPointerSource): string

Parameters
NameType
bearingPointerSourcePfdBearingPointerSource
Returns

string

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Graphics/Text/NavSourceFormatter.ts:100


createForIndicator

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

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

Parameters

NameTypeDescription
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

fn

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

▸ (indicator): string

Parameters
NameType
indicatorG3XTouchNavIndicator
Returns

string

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Graphics/Text/NavSourceFormatter.ts:61


createForSource

createForSource(showGpsIndex, showNavIndex): (source: NavReferenceSource<G3XTouchNavSourceName>) => string

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

Parameters

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

Returns

fn

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

▸ (source): string

Parameters
NameType
sourceNavReferenceSource<G3XTouchNavSourceName>
Returns

string

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Graphics/Text/NavSourceFormatter.ts:42