Class: RadioFrequencyFormatter
A utility class for creating radio frequency formatters.
Constructors
constructor
• new RadioFrequencyFormatter(): RadioFrequencyFormatter
Returns
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
Name | Type | Default value | Description |
---|---|---|---|
nanString | string | '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
Name | Type |
---|---|
freqHz | number |
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
Name | 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
fn
A function which formats COM radio frequencies in hertz.
▸ (freqHz
): string
Parameters
Name | Type |
---|---|
freqHz | number |
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
Name | Type | Default value | Description |
---|---|---|---|
nanString | string | '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
Name | Type |
---|---|
freqHz | number |
Returns
string
Defined in
src/sdk/graphics/text/RadioFrequencyFormatter.ts:13