Skip to main content

Class: RadioFrequencyFormatter

A utility class for creating radio frequency formatters.

Constructors

constructor

new RadioFrequencyFormatter(): RadioFrequencyFormatter

Returns

RadioFrequencyFormatter

Methods

createAdf

createAdf(nanString?): (freqHz: number) => string

Creates a function which formats ADF radio frequencies in hertz. The formatted string created by the function displays the frequency in kilohertz to one decimal place.

Parameters

NameTypeDefault valueDescription
nanStringstring'NaN'The string to output for an input of NaN. Defaults to 'NaN'.

Returns

fn

A function which formats ADF radio frequencies in hertz.

▸ (freqHz): string

Parameters
NameType
freqHznumber
Returns

string

Defined in

src/sdk/graphics/text/RadioFrequencyFormatter.ts:45


createCom

createCom(spacing, nanString?): (freqHz: number) => string

Creates a function which formats COM radio frequencies in hertz. The formatted string created by the function displays the frequency in megahertz to either two decimal places (with the third decimal place truncated) for 25 kHz spacing, or three decimal places for 8.33 kHz spacing.

Parameters

NameTypeDefault valueDescription
spacingComSpacingundefinedThe COM channel spacing mode to use.
nanStringstring'NaN'The string to output for an input of NaN. Defaults to 'NaN'.

Returns

fn

A function which formats COM radio frequencies in hertz.

▸ (freqHz): string

Parameters
NameType
freqHznumber
Returns

string

Defined in

src/sdk/graphics/text/RadioFrequencyFormatter.ts:27


createNav

createNav(nanString?): (freqHz: number) => string

Creates a function which formats NAV radio frequencies in hertz. The formatted string created by the function displays the frequency in megahertz to two decimal places.

Parameters

NameTypeDefault valueDescription
nanStringstring'NaN'The string to output for an input of NaN. Defaults to 'NaN'.

Returns

fn

A function which formats NAV radio frequencies in hertz.

▸ (freqHz): string

Parameters
NameType
freqHznumber
Returns

string

Defined in

src/sdk/graphics/text/RadioFrequencyFormatter.ts:13