Skip to content

Amplifiers ​

Amplifiers are given by their Table VI field letter and placed where the standard's figure for the symbol's frame puts them: land units by Figure E-3, equipment E-4, installations E-5, air and space D-3 and C-2, sea surface G-2, subsurface H-3, dismounted individuals F-2, activities I-2, cyberspace K-2.

ts
renderSymbol('130310000012110000000000000000', {
    amplifiers: {T: '1-66', M: '2BCT', H: 'REINF', W: '141200ZNOV26', Q: 45},
});

Which fields a symbol takes ​

Not every symbol has a place for every field: a land unit has no T1 or W1, and a point control measure takes only what its Appendix L template shows. amplifierFields says what a symbol takes, so an editor offers those and nothing else:

ts
import {amplifierFields, validateAmplifier} from '@zaes/military-symbols';

for (const f of amplifierFields('130310000012110000000000000000')) {
    // f.field 'F', f.kind 'text', f.title 'Reinforced or reduced', f.maxLength 1,
    // f.values [{value: '+', label: '+ reinforced'}, ...], f.format for patterned fields
}
validateAmplifier('F', '34'); // 'F (Reinforced or reduced) is one of +, -, ±'
validateAmplifier('W', '141200ZNOV2026'); // undefined: a valid date-time group

kind is text (written beside the symbol), graphic (Q, AJ) or map (AH, AI, AK, below). values is Table VI's list where it gives one (F, J, K, L, AD, AQ, AR) and the GENC countries for AS; format describes a patterned field (date-time groups, altitude, speed, IFF mode, the engagement bar). AMPLIFIER_SPECS holds the same for every field.

renderSymbol reports in problems a field the symbol has no place for (it is not drawn) and a value Table VI does not allow (it is drawn as given). RenderedSymbol.fields lists the fields the drawing placed.

Text fields ​

Text fields are written in columns either side of the frame, five rows to the octagon's height; fields that share a row are joined. A value longer than Table VI allows is cut, with a problem saying so (AMPLIFIER_MAX_LENGTH holds the limits).

  • AS, the country, defaults to the GENC trigraph of positions 28–30 of the code. Pass countryFromCode: false to leave it off.
  • C sits over air and space frames, AA inside the frame.
  • AO, the engagement bar, draws on top of everything in the symbol's own fill (5.3.7.15).
  • textColor, textHalo, textHaloColor and font style them.

Graphic fields ​

Field
Qdirection of movement (5.3.7.9), degreesan angled arrow from a land frame's base (a headquarters staff's foot), from the centre otherwise
AJspeed leader (5.3.7.13.3){direction, length}, its length in pixels, which the host keeps current

Fields measured on the ground ​

Three fields are distances on the ground, so renderSymbol does not draw them; the map entries draw them in map units, under the symbol, however it is drawn:

FieldShapes
AHarea of uncertainty (5.3.7.13.1)ellipse, box, or a line of bearing with its error lines
AIdead reckoning trailer (5.3.7.13.2)a dotted line from the last reported position, or the farthest-on circle
AKpairing line (5.3.7.13.4)a line to a position the host keeps current
ts
const track = {
    name: '130301000011010000000000000000',
    amplifiers: {
        AH: {shape: 'ellipse', semiMajor: 900, semiMinor: 400, orientation: 30},   // metres
        AI: {shape: 'line', from: [-116.70, 35.20]},
        AK: {to: [-116.55, 35.31], dotted: true},
    },
};

Lines are 2 px and dotted lines 2 px dots with 4 px gaps, black unless color is given.

Released under the MIT License; the drawings derive from Apache-2.0 work.