Unit of measurement identifier from unit database.
All number tag values can be annotated with an optional unit. In addition, it is required to annotate each numeric
point with the
unit tag. In both cases, the unit must be an identifier defined by the standard unit database.
As a general principle, all the data associated with a given site should exclusively use either the SI metric system or the US customary system. Mixing unit systems within one site will cause serious headaches.
The unit database used by Project Haystack is managed by the Fantom open source community as part of the sys::Unit API. This database was originally based on the oBIX specification, but has since been expanded to allow multiple aliases to be used for each unit.
Each unit of measurement has a full name and zero or more symbols which are used as aliases for that unit. For example "square_meter" is the full name and the symbol alias is "m²". Some units might have multiple symbols, for example "hour" has the symbols "hr" and "h". Some units like "day" have no symbols.
All unit identifiers are limited to the following characters:
- any Unicode char over 128
- ASCII letters
- division sign
- percent sign
- dollar sign
By convention the symbol is the preferred notation. If there are multiple symbols, then the last symbol defined by the database is the preferred one.
square_meter, m² square_foot, ft²
australian_dollar, AUD british_pound, GBP, £ canadian_dollar, CAD chinese_yuan, CNY, 元 euro, EUR, € us_dollar, USD, $
kilopascal, kPa pounds_per_square_inch, psi inches_of_water, inH₂O inches_of_mercury, inHg
fahrenheit, °F celsius, °C
fahrenheit_degrees, Δ°F celsius_degrees, Δ°C
millisecond, ms second, sec minute, min hour, hr, h day week, wk julian_month, mo year, yr
liters_per_second, L/s cubic_feet_per_minute, cfm