Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/spatialillusions/milsymbol/llms.txt

Use this file to discover all available pages before exploring further.

A Symbol Identification Code (SIDC) is the string you pass to milsymbol that completely describes which military symbol to render — its affiliation, battle dimension, status, icon function, and modifiers. Every ms.Symbol call begins with an SIDC; milsymbol reads it to determine the frame shape, fill color, icon glyph, echelon badge, and every other visual property of the resulting symbol. Getting the SIDC right is therefore the most important step before any styling option is applied.

Two SIDC Formats

Milsymbol supports two fundamentally different SIDC encodings. The library auto-detects which one you are using by inspecting the first two characters: if they are numeric, the code is treated as a number-based SIDC; otherwise it is treated as a letter-based SIDC.
You never need to declare the format explicitly. Milsymbol checks isNaN(sidc.substr(0, 2)) internally and routes to the correct parser automatically. The numberSIDC property returned by getMetadata() tells you which path was taken.

Letter-Based SIDC (15 characters)

The letter-based format originated in MIL-STD-2525B/C and STANAG APP-6 B/D. It is a 15-character alphanumeric string. Positions are 1-indexed in the standard documents but 0-indexed in JavaScript string methods.
S F G - U C I - - - - D - - -
0 1 2 3 4 5 6 7 8 9 …  
Example: "SFG-UCI----D" The hyphens (-) and asterisks (*) are treated as wildcards — milsymbol normalises * to - internally, so both are equivalent.
PositionFieldExample valuesDescription
0Coding schemeS G W I O ESelects the symbol set (Warfighting, Tactical Graphics, METOC, SIGINT, Stability Operations, Emergency Management)
1Standard identity (affiliation)F H N U P A S J KFriendly, Hostile, Neutral, Unknown, Pending, Assumed Friend, Suspect, Joker, Faker — see table below
2Battle dimensionP A G S U F Z XSpace, Air, Ground, Sea Surface, Subsurface, Special Operations Forces, Unknown, Other
3StatusP A C D X FPresent, Anticipated, Fully Capable, Damaged, Destroyed, Full to Capacity — see table below
4–9Function IDUCI--- ------6-character code identifying the specific icon within the battle dimension
10–11Symbol modifier 1 & 2-- AE MOEchelon, mobility, headquarters, task force, feint/dummy indicators
12–13Country code-- US GBISO-like two-letter country code
14Order of battle- A E CAir, Electronic, Cyber order-of-battle type

Number-Based SIDC (20–30 digits)

The number-based format was introduced in MIL-STD-2525D/E and STANAG APP-6 D/E. It uses a numeric string that is conventionally zero-padded to 30 digits (though trailing zeros can be omitted in practice). This format encodes the same information as the letter format but uses a structured numeric scheme with explicit version and symbol-set fields. Example: "130310001412110000000000000000"
13 0 3 10 0 0 14 1211000000 0 0 0 …
│  │ │ │  │ │  │  └──────────── Function ID (10 digits, positions 10–19)
│  │ │ │  │ │  └─────────────── Echelon/Mobility (2 digits, positions 8–9)
│  │ │ │  │ └────────────────── HQ/Task Force/Dummy (1 digit, position 7)
│  │ │ │  └──────────────────── Status (1 digit, position 6)
│  │ │ └─────────────────────── Symbol Set (2 digits, positions 4–5)
│  │ └───────────────────────── Standard Identity 2 / Affiliation (position 3)
│  └─────────────────────────── Standard Identity 1 / Context (position 2)
└────────────────────────────── Version (2 digits, positions 0–1)
Digit positionsFieldKey valuesDescription
0–1Version1012 = 2525D/APP-6D, 1314 = 2525E/APP-6EDetermines which edition rules to apply
2Context (Standard Identity 1)0 = Reality, 1 = Exercise, 2 = SimulationBroad context category
3Affiliation (Standard Identity 2)0/1 = Unknown, 2/3 = Friend, 4 = Neutral, 5/6 = HostileSymbol affiliation; drives frame shape and fill color
4–5Symbol Set00 = Unknown/Sea, 01 = Air, 02 = Air Missile, 05 = Space Air, 06 = Space Air, 10 = Land Unit, 11 = Land Civilian Unit, 12 = Land Equipment, 15 = Land Equipment (SIGINT/alt), 20 = Installation, 25 = Control Measure, 27 = Land Dismounted Individual, 30 = Sea Surface, 35 = Subsurface, 36 = Mine Warfare, 39 = Subsurface, 40 = Activity, 50 = Space, 51 = Space, 52 = SIGINT, 53 = Sea, 54 = Subsurface, 60 = CyberspaceSelects the category of symbol
6Status0 = Present, 1 = Anticipated, 25 = condition bar (FullyCapable/Damaged/Destroyed/FullToCapacity)Drives dash patterns and condition bars
7HQ / Task Force / Dummy0 = none, see standard for valuesAdds staff, task force bracket, or feint/dummy diagonal
8–9Echelon / Mobility1126 = echelons, 3162 = mobility, 7172 = leadershipCombined echelon and mobility amplifier
10–19Function ID10-digit numeric codeIdentifies the specific icon within the symbol set
20–21Modifier 1 & 21-digit eachAdditional sector modifiers
22Frame shape override (2525E)0 = use symbol set defaultOverrides frame geometry in edition E
23–29Reserved / padding0000000Zero-padded; reserved for future use

Affiliation Values

Affiliation drives the frame shape (diamond = hostile, rectangle = friendly, etc.) and the fill color.
CharacterAffiliation shownNotes
FFriendStandard friendly rectangle frame
AFriendAssumed Friend (dashed frame)
DFriendExercise Friend
MFriendExercise Assumed Friend
HHostileFilled diamond frame
SHostileSuspect (dashed frame)
JFriend (rendered)Joker — displayed as Friend shape
KFriend (rendered)Faker — displayed as Friend shape
NNeutralFilled square frame
LNeutralExercise Neutral
PUnknownPending (dashed frame)
UUnknownUnknown
GUnknownExercise Unknown
WUnknownExercise Unknown (pending)
OUnknownUnknown

Status / Condition Values

Status controls whether the symbol frame is dashed (anticipated/pending) or has a colored condition bar at the bottom.
Status valueLetter codeNumber codeMeaning
PresentP (position 3)0 (position 6)Symbol is present, no modifier
Anticipated/PlannedA1Dashed frame (anticipated dash array)
Fully CapableC2Condition bar
DamagedD3Condition bar
DestroyedX4Condition bar
Full to CapacityF5Condition bar

Context Values

Context indicates whether the symbol belongs to a real operation, an exercise, or a simulation. Exercise symbols receive a stylized “X” modifier in their rendering.
ContextLetter codesNumber code (position 2)
RealityF H N U P S J K O A (non-exercise affiliations)0
ExerciseG W D L M J K (exercise affiliations)1
Simulation2

Echelon Values

Echelon amplifiers indicate the unit size. The full set defined in milsymbol is:
Team/Crew  →  Squad  →  Section  →  Platoon/detachment
Company/battery/troop  →  Battalion/squadron  →  Regiment/group
Brigade  →  Division  →  Corps/MEF  →  Army
Army Group/front  →  Region/Theater  →  Command
In letter-based SIDCs, echelon is encoded in position 11 (modifier 2). In number-based SIDCs it occupies positions 8–9 with two-digit codes 11 through 26.
Number codeLetter codeEchelon
11ATeam/Crew
12BSquad
13CSection
14DPlatoon/detachment
15ECompany/battery/troop
16FBattalion/squadron
17GRegiment/group
18HBrigade
21IDivision
22JCorps/MEF
23KArmy
24LArmy Group/front
25MRegion/Theater
26NCommand

Common SIDC Examples

// Friendly Ground Unit (Infantry, Platoon)
const infantry = new ms.Symbol("SFGPUCI---E", { size: 40 });

// Hostile Air (Fixed-Wing, Present)
const hostileAir = new ms.Symbol("SHAPF-----", { size: 40 });

// Neutral Sea Surface vessel
const neutral = new ms.Symbol("SNSP------", { size: 40 });

// Tactical graphic (control measure)
const graphic = new ms.Symbol("G-G-GPPK--", { size: 40 });

Detecting the Format Programmatically

After constructing a symbol, call getMetadata() to inspect which format was used:
const sym = new ms.Symbol("130310001412110000000000000000");
const meta = sym.getMetadata();

console.log(meta.numberSIDC);   // true  — number-based SIDC
console.log(meta.affiliation);  // "Friend"
console.log(meta.echelon);      // "Platoon/detachment"
console.log(meta.functionid);   // "1412110000"
const sym2 = new ms.Symbol("SFG-UCI----D");
const meta2 = sym2.getMetadata();

console.log(meta2.numberSIDC);  // false — letter-based SIDC
console.log(meta2.affiliation); // "Friend"
console.log(meta2.dimension);   // "Ground"
The functionid field in the returned metadata always holds the icon-identifying portion of the SIDC regardless of format, making it useful for display or lookup purposes.

Passing SIDC to the Symbol Constructor

The SIDC can be provided as the first positional argument or as the sidc property inside an options object:
// As a positional string
const sym = new ms.Symbol("SFG-UCI----D", { size: 35 });

// Inside an options object
const sym2 = new ms.Symbol({ sidc: "SFG-UCI----D", size: 35 });

// Updated later with setOptions()
sym.setOptions({ sidc: "SHG-UCI----D" }); // Switch to hostile
See Symbol Constructor for the full list of options that can accompany the SIDC.

Build docs developers (and LLMs) love