Skip to content

API reference / @zaes/tactical-graphics / AltitudeUnit

Enumeration: AltitudeUnit ​

Defined in: tacticalgraphics/core/config.ts:100

The unit an altitude is entered and displayed in.

A host-level choice, not a per-symbol one. A picture where one zone is in feet and the next in meters is a picture nobody can read across, so one setting covers the map and every altitude on it compares.

The value is interpreted in this unit, never converted into it: 1500 entered under Feet is 1500 feet, and the same 1500 under Meters is 1500 meters. So this is a decision to make once, at start-up, beside the palette — changing it later reinterprets every altitude already entered rather than restating it.

Why this is only two members ​

FM 1-02.2 gives field X four kinds of value, and they are not four units:

  1. an altitude "in feet or meters in relation to a reference datum" — 1500MSL, 1500FT AGL
  2. a flight level — FL150
  3. a depth for a submerged object, in feet below sea level
  4. a height of equipment or structures on the ground

Only the first half of (1) is a unit. MSL and AGL are a reference datum — what the number is measured from — which is an independent axis: any datum can be quoted in either unit, so folding them in here would produce an enum whose members cannot be combined and a value that cannot say "meters above ground".

A flight level is neither. FL150 is 15,000 ft of pressure altitude against the standard 1013.25 hPa datum, so it is deliberately not a true height above anything — two aircraft at FL150 are separated from each other, not placed. The number is different too: 150, not 15000. It is its own encoding, not this quantity in another unit.

So the datum belongs on the graphic, not here: two zones on one map can honestly be one AGL and one MSL, which a host-level setting could never express. It is AltitudeDatum, carried on TacticalGraphicProperties.altitudeDatum. formatAltitude also passes a non-numeric string through untouched, so a bag written before that field existed still renders 'FL150' and '1500MSL' as doctrine writes them.

Enumeration Members ​

Enumeration MemberValueDefined in
feet"Feet"tacticalgraphics/core/config.ts:102
meters"Meters"tacticalgraphics/core/config.ts:101

Released under the MIT License.