@zaes/sidc 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/LICENSE +21 -0
  3. package/README.md +24 -3
  4. package/THIRD-PARTY-NOTICES +217 -0
  5. package/dist/cjs/2525c/data2525c.js +1965 -0
  6. package/dist/cjs/2525c/index.js +178 -0
  7. package/dist/cjs/catalog/data2525e.js +2704 -0
  8. package/dist/cjs/catalog/dataApp6e.js +85 -0
  9. package/dist/cjs/catalog/index.js +137 -0
  10. package/dist/cjs/catalog/types.js +2 -0
  11. package/dist/cjs/genc.js +298 -0
  12. package/dist/cjs/index.js +49 -0
  13. package/dist/cjs/letter.js +116 -0
  14. package/dist/cjs/numeric.js +127 -0
  15. package/dist/cjs/tables.js +151 -0
  16. package/dist/esm/2525c/data2525c.js +1962 -0
  17. package/dist/esm/2525c/index.js +174 -0
  18. package/dist/esm/catalog/data2525e.js +2701 -0
  19. package/dist/esm/catalog/dataApp6e.js +82 -0
  20. package/dist/esm/catalog/index.js +130 -0
  21. package/dist/esm/catalog/types.js +1 -0
  22. package/dist/esm/genc.js +294 -0
  23. package/dist/esm/index.js +20 -0
  24. package/dist/esm/letter.js +112 -0
  25. package/dist/esm/numeric.js +123 -0
  26. package/dist/esm/package.json +3 -0
  27. package/dist/esm/tables.js +147 -0
  28. package/dist/types/2525c/data2525c.d.ts +10 -0
  29. package/dist/types/2525c/index.d.ts +22 -0
  30. package/dist/types/catalog/data2525e.d.ts +12 -0
  31. package/dist/types/catalog/dataApp6e.d.ts +15 -0
  32. package/dist/types/catalog/index.d.ts +31 -0
  33. package/dist/types/catalog/types.d.ts +46 -0
  34. package/dist/types/genc.d.ts +12 -0
  35. package/dist/types/index.d.ts +15 -0
  36. package/dist/types/letter.d.ts +51 -0
  37. package/dist/types/numeric.d.ts +66 -0
  38. package/dist/types/tables.d.ts +56 -0
  39. package/package.json +66 -6
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GRAPHIC_ORDERS_OF_BATTLE = exports.ORDERS_OF_BATTLE = exports.LETTER_STATUSES = exports.BATTLE_DIMENSIONS = exports.LETTER_IDENTITIES = exports.CODING_SCHEMES = void 0;
4
+ exports.parseLetterSidc = parseLetterSidc;
5
+ /** 2525C Table A-I, position 1, with the appendix each scheme is defined in. */
6
+ exports.CODING_SCHEMES = [
7
+ { value: 'S', name: 'Warfighting', appendix: 'A' },
8
+ { value: 'G', name: 'Tactical Graphics', appendix: 'B' },
9
+ { value: 'W', name: 'Meteorological and Oceanographic', appendix: 'C' },
10
+ { value: 'I', name: 'Signals Intelligence', appendix: 'D' },
11
+ { value: 'O', name: 'Stability Operations', appendix: 'E' },
12
+ { value: 'E', name: 'Emergency Management', appendix: 'G' },
13
+ ];
14
+ /** 2525C Table A-I, position 2, with whether it is the exercise form and its frame family. */
15
+ exports.LETTER_IDENTITIES = [
16
+ { value: 'P', name: 'Pending', exercise: false, group: 'Unknown' },
17
+ { value: 'U', name: 'Unknown', exercise: false, group: 'Unknown' },
18
+ { value: 'A', name: 'Assumed Friend', exercise: false, group: 'Friend' },
19
+ { value: 'F', name: 'Friend', exercise: false, group: 'Friend' },
20
+ { value: 'N', name: 'Neutral', exercise: false, group: 'Neutral' },
21
+ { value: 'S', name: 'Suspect', exercise: false, group: 'Hostile' },
22
+ { value: 'H', name: 'Hostile', exercise: false, group: 'Hostile' },
23
+ { value: 'G', name: 'Exercise Pending', exercise: true, group: 'Unknown' },
24
+ { value: 'W', name: 'Exercise Unknown', exercise: true, group: 'Unknown' },
25
+ { value: 'M', name: 'Exercise Assumed Friend', exercise: true, group: 'Friend' },
26
+ { value: 'D', name: 'Exercise Friend', exercise: true, group: 'Friend' },
27
+ { value: 'L', name: 'Exercise Neutral', exercise: true, group: 'Neutral' },
28
+ { value: 'J', name: 'Joker', exercise: true, group: 'Hostile' },
29
+ { value: 'K', name: 'Faker', exercise: true, group: 'Hostile' },
30
+ ];
31
+ /** 2525C Table A-I, position 3, for the warfighting scheme. */
32
+ exports.BATTLE_DIMENSIONS = [
33
+ { value: 'P', name: 'Space' },
34
+ { value: 'A', name: 'Air' },
35
+ { value: 'G', name: 'Ground' },
36
+ { value: 'S', name: 'Sea Surface' },
37
+ { value: 'U', name: 'Sea Subsurface' },
38
+ { value: 'F', name: 'SOF' },
39
+ { value: 'X', name: 'Other (no frame)' },
40
+ { value: 'Z', name: 'Unknown' },
41
+ ];
42
+ /** 2525C Table A-I, position 4. */
43
+ exports.LETTER_STATUSES = [
44
+ { value: 'A', name: 'Anticipated/Planned' },
45
+ { value: 'P', name: 'Present' },
46
+ { value: 'C', name: 'Present/Fully capable' },
47
+ { value: 'D', name: 'Present/Damaged' },
48
+ { value: 'X', name: 'Present/Destroyed' },
49
+ { value: 'F', name: 'Present/Full to capacity' },
50
+ ];
51
+ /** 2525C Table A-I, position 15. */
52
+ exports.ORDERS_OF_BATTLE = [
53
+ { value: 'A', name: 'Air OB' },
54
+ { value: 'E', name: 'Electronic OB' },
55
+ { value: 'C', name: 'Civilian OB' },
56
+ { value: 'G', name: 'Ground OB' },
57
+ { value: 'N', name: 'Maritime OB' },
58
+ { value: 'S', name: 'Strategic Force Related' },
59
+ ];
60
+ /** 2525C Table B-I, position 15 of a tactical graphic (coding scheme G). */
61
+ exports.GRAPHIC_ORDERS_OF_BATTLE = [{ value: 'X', name: 'Control Markings' }];
62
+ const LETTERS = /^[A-Z0-9*-]{15}$/;
63
+ const unused = (c) => c === '-' || c === '*';
64
+ /**
65
+ * Reads a 2525C letter SIDC. Values the tables don't define are listed in `problems`. A code given
66
+ * without its trailing unused positions (`SFGPUCI` for `SFGPUCI--------`, as some systems store
67
+ * them) is read with dashes filling them, and `problems` says so; at least scheme, identity, dimension
68
+ * and status (4 characters) are needed.
69
+ */
70
+ function parseLetterSidc(input) {
71
+ var _a;
72
+ let code = input.trim().toUpperCase();
73
+ const problems = [];
74
+ if (code.length >= 4 && code.length < 15 && /^[A-Z0-9*-]+$/.test(code)) {
75
+ problems.push({ position: code.length + 1, message: `${code.length} characters: positions ${code.length + 1}-15 read as unused (-)` });
76
+ code = code.padEnd(15, '-');
77
+ }
78
+ if (!LETTERS.test(code)) {
79
+ const why = code.length === 15 ? 'has 15 characters of A-Z, 0-9, - and *' : `has 15 characters, not ${code.length}`;
80
+ return { ok: false, problems: [{ position: 1, message: `a 2525C SIDC ${why}` }] };
81
+ }
82
+ const check = (position, value, table, what) => {
83
+ if (!unused(value) && !table.some((e) => e.value === value))
84
+ problems.push({ position, message: `${what} ${value} is not defined` });
85
+ };
86
+ const scheme = code[0];
87
+ check(1, scheme, exports.CODING_SCHEMES, 'coding scheme');
88
+ const metoc = scheme === 'W';
89
+ const identity = metoc ? undefined : exports.LETTER_IDENTITIES.find((e) => e.value === code[1]);
90
+ if (!metoc) {
91
+ check(2, code[1], exports.LETTER_IDENTITIES, 'standard identity');
92
+ if (scheme === 'S')
93
+ check(3, code[2], exports.BATTLE_DIMENSIONS, 'battle dimension');
94
+ check(4, code[3], exports.LETTER_STATUSES, 'status');
95
+ check(15, code[14], scheme === 'G' ? exports.GRAPHIC_ORDERS_OF_BATTLE : exports.ORDERS_OF_BATTLE, 'order of battle');
96
+ }
97
+ return {
98
+ ok: true,
99
+ problems,
100
+ sidc: {
101
+ kind: 'letter',
102
+ standard: '2525C',
103
+ code,
104
+ scheme,
105
+ standardIdentity: code[1],
106
+ standardIdentityGroup: identity === null || identity === void 0 ? void 0 : identity.group,
107
+ exercise: (_a = identity === null || identity === void 0 ? void 0 : identity.exercise) !== null && _a !== void 0 ? _a : false,
108
+ dimension: code[2],
109
+ status: code[3],
110
+ functionId: code.slice(4, 10),
111
+ modifier: code.slice(10, 12),
112
+ country: code.slice(12, 14),
113
+ orderOfBattle: code[14],
114
+ },
115
+ };
116
+ }
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseNumericSidc = parseNumericSidc;
4
+ exports.formatNumericSidc = formatNumericSidc;
5
+ /**
6
+ * The numeric SIDC of MIL-STD-2525D and 2525E (Appendix A, A.5): 20 positions in 2525D, 30 in
7
+ * 2525E. A 20-position code read as 2525E has an all-zero Set C.
8
+ *
9
+ * Set A 1–2 version · 3 context · 4 standard identity · 5–6 symbol set · 7 status ·
10
+ * 8 headquarters/task force/dummy · 9–10 amplifying descriptor
11
+ * Set B 11–16 entity, entity type, entity subtype · 17–18 sector 1 modifier · 19–20 sector 2 modifier
12
+ * Set C 21 sector 1 modifier identifier · 22 sector 2 modifier identifier · 23 frame shape ·
13
+ * 24–27 reserved · 28–30 country (GENC numeric)
14
+ */
15
+ const tables_js_1 = require("./tables.js");
16
+ const NUMERIC = /^[0-9A-F]+$/;
17
+ /**
18
+ * Reads a numeric SIDC. A code of the wrong length or with characters outside [0-9A-F] fails; a
19
+ * well-formed code with values the tables don't define parses, with each one listed in `problems`,
20
+ * so a caller can decide whether to draw it.
21
+ */
22
+ function parseNumericSidc(input) {
23
+ const code = input.trim().toUpperCase();
24
+ if (code.length !== 20 && code.length !== 30) {
25
+ return { ok: false, problems: [{ position: 1, message: `a numeric SIDC has 20 or 30 positions, not ${code.length}` }] };
26
+ }
27
+ if (!NUMERIC.test(code))
28
+ return { ok: false, problems: [{ position: firstBad(code) + 1, message: 'a numeric SIDC holds only 0-9 and A-F' }] };
29
+ const at = (from, to = from) => code.slice(from - 1, to);
30
+ const problems = [];
31
+ const check = (position, value, known, what) => {
32
+ if (!known)
33
+ problems.push({ position, message: `${what} ${value} is not defined` });
34
+ };
35
+ const version = at(1, 2);
36
+ const versionEntry = (0, tables_js_1.lookup)(tables_js_1.VERSIONS, version);
37
+ check(1, version, !!versionEntry, 'version');
38
+ const standard = versionEntry === null || versionEntry === void 0 ? void 0 : versionEntry.standard;
39
+ const context = at(3);
40
+ check(3, context, !!(0, tables_js_1.lookup)(tables_js_1.CONTEXTS, context), 'context');
41
+ const standardIdentity = at(4);
42
+ const identity = (0, tables_js_1.lookup)(tables_js_1.STANDARD_IDENTITIES, standardIdentity);
43
+ check(4, standardIdentity, !!identity, 'standard identity');
44
+ const symbolSet = at(5, 6);
45
+ // 2525D and APP-6 split signals intelligence by dimension (50-54); APP-6(E) adds 64 (Table A-4).
46
+ const legacySigint = [...tables_js_1.SYMBOL_SETS.filter((s) => s.value !== '50'), ...tables_js_1.SYMBOL_SETS_2525D_ONLY];
47
+ const sets = standard === '2525D' || standard === 'APP-6D' ? legacySigint : standard === 'APP-6E' ? [...legacySigint, ...tables_js_1.SYMBOL_SETS_APP6E_ONLY] : tables_js_1.SYMBOL_SETS;
48
+ check(5, symbolSet, !!(0, tables_js_1.lookup)(sets, symbolSet), 'symbol set');
49
+ const status = at(7);
50
+ check(7, status, !!(0, tables_js_1.lookup)(tables_js_1.STATUSES, status), 'status');
51
+ const hqTfDummy = at(8);
52
+ check(8, hqTfDummy, !!(0, tables_js_1.lookup)(tables_js_1.HQ_TF_DUMMY, hqTfDummy), 'headquarters/task force/dummy');
53
+ const flags = Number.parseInt(hqTfDummy, 16);
54
+ const amplifyingDescriptor = at(9, 10);
55
+ check(9, amplifyingDescriptor, !!(0, tables_js_1.lookup)(tables_js_1.AMPLIFYING_DESCRIPTORS, amplifyingDescriptor), 'amplifying descriptor');
56
+ const long = code.length === 30;
57
+ if (!long && (standard === '2525E' || standard === 'APP-6E')) {
58
+ problems.push({ position: 21, message: 'a 2525E code has 30 positions; read with an all-zero Set C' });
59
+ }
60
+ const frameShape = long ? at(23) : '0';
61
+ check(23, frameShape, !!(0, tables_js_1.lookup)(tables_js_1.FRAME_SHAPES, frameShape), 'frame shape');
62
+ if (long && at(24, 27) !== '0000')
63
+ problems.push({ position: 24, message: 'positions 24–27 are reserved and should be 0' });
64
+ return {
65
+ ok: true,
66
+ problems,
67
+ sidc: {
68
+ kind: 'numeric',
69
+ code,
70
+ standard,
71
+ version,
72
+ context,
73
+ standardIdentity,
74
+ standardIdentityGroup: identity === null || identity === void 0 ? void 0 : identity.group,
75
+ symbolSet,
76
+ status,
77
+ hqTfDummy,
78
+ feintDummy: (flags & 1) !== 0,
79
+ headquarters: (flags & 2) !== 0,
80
+ taskForce: (flags & 4) !== 0,
81
+ amplifyingDescriptor,
82
+ entityCode: at(11, 16),
83
+ sector1: at(17, 18),
84
+ sector2: at(19, 20),
85
+ sector1Identifier: long ? at(21) : '0',
86
+ sector2Identifier: long ? at(22) : '0',
87
+ frameShape,
88
+ country: long ? at(28, 30) : '000',
89
+ },
90
+ };
91
+ }
92
+ /**
93
+ * Writes a 30-position 2525E SIDC (version 15 unless given). Each field is padded to its width; a field
94
+ * longer than its width throws a RangeError naming it (cutting it would write another symbol's code).
95
+ */
96
+ function formatNumericSidc(fields) {
97
+ var _a;
98
+ const f = (value, width, name = '') => {
99
+ const v = value !== null && value !== void 0 ? value : '';
100
+ if (v.length > width)
101
+ throw new RangeError(`formatNumericSidc: ${name || 'a field'} "${v}" is longer than its ${width} positions`);
102
+ return v.padStart(width, '0');
103
+ };
104
+ return [
105
+ f((_a = fields.version) !== null && _a !== void 0 ? _a : '15', 2, 'version'),
106
+ f(fields.context, 1, 'context'),
107
+ f(fields.standardIdentity, 1, 'standardIdentity'),
108
+ f(fields.symbolSet, 2, 'symbolSet'),
109
+ f(fields.status, 1, 'status'),
110
+ f(fields.hqTfDummy, 1, 'hqTfDummy'),
111
+ f(fields.amplifyingDescriptor, 2, 'amplifyingDescriptor'),
112
+ f(fields.entityCode, 6, 'entityCode'),
113
+ f(fields.sector1, 2, 'sector1'),
114
+ f(fields.sector2, 2, 'sector2'),
115
+ f(fields.sector1Identifier, 1, 'sector1Identifier'),
116
+ f(fields.sector2Identifier, 1, 'sector2Identifier'),
117
+ f(fields.frameShape, 1, 'frameShape'),
118
+ '0000',
119
+ f(fields.country, 3, 'country'),
120
+ ].join('');
121
+ }
122
+ function firstBad(code) {
123
+ for (let i = 0; i < code.length; i++)
124
+ if (!NUMERIC.test(code[i]))
125
+ return i;
126
+ return 0;
127
+ }
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ /**
3
+ * The fixed code tables of the numeric SIDC, transcribed from MIL-STD-2525E Change 1, Appendix A.
4
+ * Each table names its source so a reviewer can check it against the standard line by line.
5
+ * The entity and modifier tables (A-XI onward) are generated, not typed here.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.FRAME_SHAPES = exports.AMPLIFYING_DESCRIPTORS = exports.HQ_TF_DUMMY = exports.STATUSES = exports.SYMBOL_SETS_APP6E_ONLY = exports.SYMBOL_SETS_2525D_ONLY = exports.SYMBOL_SETS = exports.STANDARD_IDENTITIES = exports.CONTEXTS = exports.VERSIONS = void 0;
9
+ exports.lookup = lookup;
10
+ /**
11
+ * Table A-I, Version. Value 10 is shared by 2525D and APP-6(D)(1), which the standard says carry
12
+ * the same versioning; `standard` gives the US one. 12, APP-6(D)(2), was withdrawn but codes
13
+ * carrying it may still exist. 17–3F are reserved.
14
+ */
15
+ exports.VERSIONS = [
16
+ { value: '10', name: 'MIL-STD-2525D / APP-06(D)(1)', standard: '2525D', released: 'June 2014' },
17
+ { value: '11', name: 'MIL-STD-2525D(1)', standard: '2525D', released: '2018-08-02' },
18
+ { value: '12', name: 'APP-06(D)(2)', standard: 'APP-6D', released: 'Withdrawn' },
19
+ { value: '13', name: 'MIL-STD-2525E', standard: '2525E', released: '2022-12-31' },
20
+ { value: '14', name: 'APP-06(E)(1)', standard: 'APP-6E', released: 'October 2023' },
21
+ { value: '15', name: 'MIL-STD-2525E(1)', standard: '2525E', released: '2025-03-02' },
22
+ { value: '16', name: 'APP-06(E)(2)', standard: 'APP-6E', released: '2025-10-14' },
23
+ ];
24
+ /** Table A-II, first position: the context. */
25
+ exports.CONTEXTS = [
26
+ { value: '0', name: 'Reality' },
27
+ { value: '1', name: 'Exercise' },
28
+ { value: '2', name: 'Simulation' },
29
+ { value: '3', name: 'Restricted Target – Reality' },
30
+ { value: '4', name: 'No-Strike Entity – Reality' },
31
+ { value: '5', name: 'Restricted Target – Exercise' },
32
+ { value: '6', name: 'No-Strike Entity – Exercise' },
33
+ { value: '7', name: 'Restricted Target – Simulation' },
34
+ { value: '8', name: 'No-Strike Entity – Simulation' },
35
+ ];
36
+ /** Table A-II, second position: the standard identity, with its Table A-III group. */
37
+ exports.STANDARD_IDENTITIES = [
38
+ { value: '0', name: 'Pending', group: 'Unknown' },
39
+ { value: '1', name: 'Unknown', group: 'Unknown' },
40
+ { value: '2', name: 'Assumed Friend', group: 'Friend' },
41
+ { value: '3', name: 'Friend', group: 'Friend' },
42
+ { value: '4', name: 'Neutral', group: 'Neutral' },
43
+ { value: '5', name: 'Suspect/Joker', group: 'Hostile' },
44
+ { value: '6', name: 'Hostile/Faker', group: 'Hostile' },
45
+ ];
46
+ /** Table A-IV, Symbol sets (2525E). 2525D's 51–54 are not here: E folded them into 50. */
47
+ exports.SYMBOL_SETS = [
48
+ { value: '00', name: 'Unknown' },
49
+ { value: '01', name: 'Air' },
50
+ { value: '02', name: 'Air Missile' },
51
+ { value: '05', name: 'Space' },
52
+ { value: '06', name: 'Space Missile' },
53
+ { value: '10', name: 'Land Unit' },
54
+ { value: '11', name: 'Land Civilian Unit/Organization' },
55
+ { value: '15', name: 'Land Equipment' },
56
+ { value: '20', name: 'Land Installation' },
57
+ { value: '25', name: 'Control Measures and Planning Symbols' },
58
+ { value: '27', name: 'Dismounted Individuals' },
59
+ { value: '30', name: 'Sea Surface' },
60
+ { value: '35', name: 'Sea Subsurface' },
61
+ { value: '36', name: 'Mine Warfare' },
62
+ { value: '40', name: 'Activities' },
63
+ { value: '45', name: 'Atmospheric' },
64
+ { value: '46', name: 'Oceanographic' },
65
+ { value: '47', name: 'Meteorological Space' },
66
+ { value: '50', name: 'Signals Intelligence' },
67
+ { value: '60', name: 'Cyberspace - Virtual' },
68
+ ];
69
+ /** 2525D's signals-intelligence sets (2525D Table A-III), accepted as 2525D input only. */
70
+ exports.SYMBOL_SETS_2525D_ONLY = [
71
+ { value: '50', name: 'Signals Intelligence – Space' },
72
+ { value: '51', name: 'Signals Intelligence – Air' },
73
+ { value: '52', name: 'Signals Intelligence – Land' },
74
+ { value: '53', name: 'Signals Intelligence – Surface' },
75
+ { value: '54', name: 'Signals Intelligence – Subsurface' },
76
+ ];
77
+ /**
78
+ * APP-6(E)'s own set (APP-6(E) Edition E Version 2, Table A-4), accepted as APP-6(E) input only. APP-6(E)
79
+ * also keeps the five signals-intelligence sets 50-54 of 2525D (above), where 2525E has the single set 50.
80
+ */
81
+ exports.SYMBOL_SETS_APP6E_ONLY = [{ value: '64', name: 'Cyberspace – Non Unit' }];
82
+ /** Table A-VI, Status. The same position may carry an operational condition instead (A.5.3.4.1). */
83
+ exports.STATUSES = [
84
+ { value: '0', name: 'Present' },
85
+ { value: '1', name: 'Planned/Anticipated/Suspect' },
86
+ { value: '2', name: 'Present/Fully capable' },
87
+ { value: '3', name: 'Present/Damaged' },
88
+ { value: '4', name: 'Present/Destroyed' },
89
+ { value: '5', name: 'Present/Full to capacity' },
90
+ ];
91
+ /** Table A-VII, Headquarters/task force/dummy: three flags, one digit. */
92
+ exports.HQ_TF_DUMMY = [
93
+ { value: '0', name: 'Unknown' },
94
+ { value: '1', name: 'Feint/Decoy/Dummy' },
95
+ { value: '2', name: 'Headquarters' },
96
+ { value: '3', name: 'Feint/Dummy Headquarters' },
97
+ { value: '4', name: 'Task Force' },
98
+ { value: '5', name: 'Feint/Dummy Task Force' },
99
+ { value: '6', name: 'Task Force Headquarters' },
100
+ { value: '7', name: 'Feint/Dummy Task Force Headquarters' },
101
+ ];
102
+ /** Table A-VIII, Amplifying descriptor (positions 9–10): echelon, mobility, towed array or leadership. */
103
+ exports.AMPLIFYING_DESCRIPTORS = [
104
+ { value: '00', name: 'Unknown', kind: 'none' },
105
+ { value: '11', name: 'Team/Crew', kind: 'echelon' },
106
+ { value: '12', name: 'Squad', kind: 'echelon' },
107
+ { value: '13', name: 'Section', kind: 'echelon' },
108
+ { value: '14', name: 'Platoon/Detachment', kind: 'echelon' },
109
+ { value: '15', name: 'Company/Battery/Troop', kind: 'echelon' },
110
+ { value: '16', name: 'Battalion/Squadron', kind: 'echelon' },
111
+ { value: '17', name: 'Regiment/Group', kind: 'echelon' },
112
+ { value: '18', name: 'Brigade', kind: 'echelon' },
113
+ { value: '21', name: 'Division', kind: 'echelon' },
114
+ { value: '22', name: 'Corps/MEF', kind: 'echelon' },
115
+ { value: '23', name: 'Army', kind: 'echelon' },
116
+ { value: '24', name: 'Army Group/Front', kind: 'echelon' },
117
+ { value: '25', name: 'Region/Theater', kind: 'echelon' },
118
+ { value: '26', name: 'Command', kind: 'echelon' },
119
+ { value: '31', name: 'Wheeled limited cross country', kind: 'mobility' },
120
+ { value: '32', name: 'Wheeled cross country', kind: 'mobility' },
121
+ { value: '33', name: 'Tracked', kind: 'mobility' },
122
+ { value: '34', name: 'Wheeled and tracked combination', kind: 'mobility' },
123
+ { value: '35', name: 'Towed', kind: 'mobility' },
124
+ { value: '36', name: 'Rail', kind: 'mobility' },
125
+ { value: '37', name: 'Pack animals', kind: 'mobility' },
126
+ { value: '41', name: 'Over-snow (prime mover)', kind: 'mobility' },
127
+ { value: '42', name: 'Sled', kind: 'mobility' },
128
+ { value: '51', name: 'Barge', kind: 'mobility' },
129
+ { value: '52', name: 'Amphibious', kind: 'mobility' },
130
+ { value: '61', name: 'Short towed array', kind: 'towedArray' },
131
+ { value: '62', name: 'Long towed array', kind: 'towedArray' },
132
+ { value: '71', name: 'Leader Individual', kind: 'leadership' },
133
+ ];
134
+ /** Table A-LX, Frame shape (position 23): overrides the frame the symbol set would draw. */
135
+ exports.FRAME_SHAPES = [
136
+ { value: '0', name: 'Unknown' },
137
+ { value: '1', name: 'Space' },
138
+ { value: '2', name: 'Air' },
139
+ { value: '3', name: 'Land Unit' },
140
+ { value: '4', name: 'Land Equipment' },
141
+ { value: '5', name: 'Land Installation' },
142
+ { value: '6', name: 'Dismounted Individuals' },
143
+ { value: '7', name: 'Sea Subsurface' },
144
+ { value: '8', name: 'Activity/Event' },
145
+ { value: '9', name: 'Cyberspace' },
146
+ { value: 'A', name: 'Sea Surface' },
147
+ ];
148
+ /** Looks a value up in one of the tables above. */
149
+ function lookup(table, value) {
150
+ return table.find((e) => e.value === value);
151
+ }