Cot Type Mapper
Maps CoT type strings (e.g. "a-f-G-U-C") to integer enum values matching the CotType enum in atak.proto, and back.
Forward-compatibility contract
When a CoT type string is not in the known mapping — either because it's new (a v2.1 peer added a type the v2 receiver doesn't know) or because it's legitimately niche — typeToEnum returns COTTYPE_OTHER (0) and the caller populates cot_type_str (field 23) with the full original string. On the wire, the combination cot_type_id = 0 + cot_type_str = "…" is the canonical way to carry unknown types without losing information: the reconstructed CoT XML uses cot_type_str directly, so <event type="…"> comes back byte-identical regardless of whether the receiver's enum knows the value.
Receivers that want to detect the downgrade should check cot_type_id == COTTYPE_OTHER && cot_type_str.isNotEmpty().
Properties
Sentinel for an unknown / unset how. The builder defaults this to m-g on emit.
Sentinel for an unknown / unmapped CoT type. The raw string then travels in cot_type_str.
Functions
Map a CotHow enum int back to its canonical how string.
Whether a known CoT type is in the Air battle dimension (the 3rd CoT atom is A, as in a-n-A-C-F).
Whether a CoT type string is in the Air battle dimension (3rd --atom equals "A", e.g. "a-f-A-M-H").
Map a CoT type string (e.g. "a-f-G-U-C") to its CotType enum int.
Map a CotType enum int back to its canonical CoT type string.