Class: RadioFrequencyFormatter
Defined in: src/sdk/graphics/text/RadioFrequencyFormatter.ts:6
A utility class for creating radio frequency formatters.
Constructors
Constructor
new RadioFrequencyFormatter():
RadioFrequencyFormatter
Returns
RadioFrequencyFormatter
Methods
createAdf()
static
createAdf(nanString
): (freqHz
) =>string
Defined in: src/sdk/graphics/text/RadioFrequencyFormatter.ts:45
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
Parameter | Type | Default value | Description |
---|---|---|---|
nanString | string | 'NaN' | The string to output for an input of NaN . Defaults to 'NaN' . |
Returns
A function which formats ADF radio frequencies in hertz.
(
freqHz
):string
Parameters
Parameter | Type |
---|---|
freqHz | number |
Returns
string
createCom()
static
createCom(spacing
,nanString
): (freqHz
) =>string
Defined in: src/sdk/graphics/text/RadioFrequencyFormatter.ts:27
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
Parameter | Type | Default value | Description |
---|---|---|---|
spacing | ComSpacing | undefined | The COM channel spacing mode to use. |
nanString | string | 'NaN' | The string to output for an input of NaN . Defaults to 'NaN' . |
Returns
A function which formats COM radio frequencies in hertz.
(
freqHz
):string
Parameters
Parameter | Type |
---|---|
freqHz | number |
Returns
string
createNav()
static
createNav(nanString
): (freqHz
) =>string
Defined in: src/sdk/graphics/text/RadioFrequencyFormatter.ts:13
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
Parameter | Type | Default value | Description |
---|---|---|---|
nanString | string | 'NaN' | The string to output for an input of NaN . Defaults to 'NaN' . |
Returns
A function which formats NAV radio frequencies in hertz.
(
freqHz
):string
Parameters
Parameter | Type |
---|---|
freqHz | number |
Returns
string