API reference / @zaes/sidc/2525c
@zaes/sidc/2525c
@zaes/sidc/2525c — MIL-STD-2525C letter codes as 2525D codes (2525E for the few that need it). A separate entry, so a host that reads only numeric codes does not carry the crosswalk.
A letter code names its symbol with the coding scheme, battle dimension and function ID (positions 1, 3 and 5–10), which the crosswalk turns into a 2525D symbol set, entity and sector modifiers (and version). The positions a letter code fills per use are converted by 2525C Appendix A Tables A-I and A-II: standard identity (2), status (4), symbol modifier (11–12: headquarters, task force, feint/dummy, echelon, mobility, towed array, installation) and country (13–14, ISO 3166-1 two-letter, written as the GENC numeric code in positions 28–30). Order of battle (15) has no 2525D field and is dropped.
Type Aliases
Convert2525CResult
ts
type Convert2525CResult =
| {
matched?: string;
note?: string;
ok: true;
problems: readonly Problem[];
sidc: string;
}
| {
ok: false;
problems: readonly Problem[];
};Union Members
Type Literal
ts
{
matched?: string;
note?: string;
ok: true;
problems: readonly Problem[];
sidc: string;
}matched?
ts
readonly matched?: string;The function ID the crosswalk matched, when the code's own was not listed and a parent's was.
note?
ts
readonly note?: string;Where the crosswalk says 2525C and 2525D draw or name the symbol differently.
ok
ts
readonly ok: true;problems
ts
readonly problems: readonly Problem[];sidc
ts
readonly sidc: string;The 30-position code: 2525D (version 10 or 11), or 2525E (15) where the symbol needs its common modifiers.
Type Literal
ts
{
ok: false;
problems: readonly Problem[];
}Variables
C_TO_D
ts
const C_TO_D: Readonly<Record<string, readonly [string, string, string, string, string, string]>>;1951 symbols.
Functions
convert2525C()
ts
function convert2525C(input): Convert2525CResult;Converts a 2525C letter code to a 30-position 2525D (or 2525E) code. A function ID the crosswalk does not list is converted as its nearest listed parent, with a problem; values the tables don't define are problems too, and only a code with no listed parent at all fails.
Parameters
input
string