Display types for units

Display units

All units are internally stored and transmitted using the SI unit (for relative units) or the BASE unit (for absolute units). They can, however, be displayed in a certain unit that we want to save in the serialization. An example is when we store the value of 248 kilometer, we want the deserialized field to also read as 248 kilometer, and not be reduced to 248000 meter. The following display unit categoriess have been defined:

0. Dimensionless

The Dimensionless unit does not have any display codes, except the default one, indicated with code number 0.

1. Acceleration

Code Name of display unit Unit
0 METER_PER_SECOND_2 (SI) m/s2
1 KM_PER_HOUR_2 km/h2
2 INCH_PER_SECOND_2 in/s2
3 FOOT_PER_SECOND_2 ft/s2
4 MILE_PER_HOUR_2 mi/h2
5 MILE_PER_HOUR_PER_SECOND mi/h/s
6 KNOT_PER_SECOND kt/s
7 GAL gal
8 STANDARD_GRAVITY g

2. AngleSolid

Code Name of display unit Unit
0 STERADIAN (SI) sr
1 SQUARE_DEGREE sq.deg

3. Angle

Code Name of display unit Unit
0 RADIAN (SI) rad
1 ARCMINUTE arcmin / '
2 ARCSECOND arcsec / "
3 CENTESIMAL_ARCMINUTE centesimal_arcmin
4 CENTESIMAL_ARCSECOND centesimal_arcsec
5 DEGREE deg
6 GRAD grad

4. Direction

Code Name of display unit Unit
0 NORTH_RADIAN (BASE) rad(N)
1 NORTH_DEGREE deg(N)
2 EAST_RADIAN rad(E)
3 EAST_DEGREE deg(E)

5. Area

Code Name of display unit Unit
0 SQUARE_METER (SI) m2
1 SQUARE_ATTOMETER am2
2 SQUARE_FEMTOMETER fm2
3 SQUARE_PICOMETER pm2
4 SQUARE_NANOMETER nm2
5 SQUARE_MICROMETER μm2
6 SQUARE_MILLIMETER mm2
7 SQUARE_CENTIMETER cm2
8 SQUARE_DECIMETER dm2
9 SQUARE_DEKAMETER dam2
10 SQUARE_HECTOMETER hm2
11 SQUARE_KILOMETER km2
12 SQUARE_MEGAMETER Mm2
13 SQUARE_INCH in2
14 SQUARE_FOOT ft2
15 SQUARE_YARD yd2
16 SQUARE_MILE mi2
17 SQUARE_NAUTICAL_MILE NM2
18 ACRE acre
19 ARE a
20 CENTIARE ca
21 HECTARE ha

6. Density

Code Name of display unit Unit
0 KG_PER_METER_3 (SI) kg/m3
1 GRAM_PER_CENTIMETER_3 g/cm3

7. ElectricalCharge

Code Name of display unit Unit
0 COULOMB C
1 PICOCOULOMB pC
2 NANOCOULOMB nC
3 MICROCOULOMB μC
4 MILLICOULOMB mC
5 ABCOULOMB abC
6 ATOMIC_UNIT au
7 EMU emu
8 ESU esu
9 FARADAY F
10 FRANKLIN Fr
11 STATCOULOMB statC
12 MILLIAMPERE_HOUR mAh
13 AMPERE_HOUR Ah
14 KILOAMPERE_HOUR kAh
15 MEGAAMPERE_HOUR MAh
16 MILLIAMPERE_SECOND mAs

8. ElectricalCurrent

Code Name of display unit Unit
0 AMPERE (SI) A
1 NANOAMPERE nA
2 MICROAMPERE μA
3 MILLIAMPERE mA
4 KILOAMPERE kA
5 MEGAAMPERE MA
6 ABAMPERE abA
7 STATAMPERE statA

9. ElectricalPotential

Code Name of display unit Unit
0 VOLT (SI) V
1 NANOVOLT nV
2 MICROVOLT μV
3 MILLIVOLT mV
4 KILOVOLT kV
5 MEGAVOLT MV
6 GIGAVOLT GV
7 ABVOLT abV
8 STATVOLT statV

10. ElectricalResistance

Code Name of display unit Unit
0 OHM (SI) Ω
1 NANOOHM
2 MICROOHM μΩ
3 MILLIOHM
4 KILOOHM
5 MEGAOHM
6 GIGAOHM
7 ABOHM abΩ
8 STATOHM statΩ

11. Energy

Code Name of display unit Unit
0 JOULE (SI) J
1 PICOJOULE pJ
2 NANOJOULE mJ
3 MICROJOULE μJ
4 MILLIJOULE mJ
5 KILOJOULE kJ
6 MEGAJOULE MJ
7 GIGAJOULE GJ
8 TERAJOULE TJ
9 PETAJOULE PJ
10 ELECTRONVOLT eV
11 MICROELECTRONVOLT μeV
12 MILLIELECTRONVOLT meV
13 KILOELECTRONVOLT keV
14 MEGAELECTRONVOLT MeV
15 GIGAELECTRONVOLT GeV
16 TERAELECTRONVOLT TeV
17 PETAELECTRONVOLT PeV
18 EXAELECTRONVOLT EeV
19 WATT_HOUR Wh
20 FEMTOWATT_HOUR fWh
21 PICOWATT_HOUR pWh
22 NANOWATT_HOUR mWh
23 MICROWATT_HOUR μWh
24 MILLIWATT_HOUR mWh
25 KILOWATT_HOUR kWh
26 MEGAWATT_HOUR MWh
27 GIGAWATT_HOUR GWh
28 TERAWATT_HOUR TWh
29 PETAWATT_HOUR PWh
30 CALORIE cal
31 KILOCALORIE kcal
32 CALORIE_IT cal(IT)
33 INCH_POUND_FORCE in lbf
34 FOOT_POUND_FORCE ft lbf
35 ERG erg
36 BTU_ISO BTU(ISO)
37 BTU_IT BTU(IT)
38 STHENE_METER sth.m

12. FlowMass

Code Name of display unit Unit
0 KG_PER_SECOND (SI) kg/s
1 POUND_PER_SECOND lb/s

13. FlowVolume

Code Name of display unit Unit
0 CUBIC_METER_PER_SECOND (SI) m3/s
1 CUBIC_METER_PER_MINUTE m3/min
2 CUBIC_METER_PER_HOUR m3/h
3 CUBIC_METER_PER_DAY m3/day
4 CUBIC_INCH_PER_SECOND in3/s
5 CUBIC_INCH_PER_MINUTE in3/min
6 CUBIC_FEET_PER_SECOND ft3/s
7 CUBIC_FEET_PER_MINUTE ft3/min
8 GALLON_PER_SECOND gal/s
9 GALLON_PER_MINUTE gal/min
10 GALLON_PER_HOUR gal/h
11 GALLON_PER_DAY gal/day
12 LITER_PER_SECOND l/s
13 LITER_PER_MINUTE l/min
14 LITER_PER_HOUR l/h
15 LITER_PER_DAY l/day

14. Force

Code Name of display unit Unit
0 NEWTON (SI) N
1 KILOGRAM_FORCE kgf
2 OUNCE_FORCE ozf
3 POUND_FORCE lbf
4 TON_FORCE tnf
5 DYNE dyne
6 STHENE sth

15. Frequency

Code Name of display unit Unit
0 HERTZ (SI) Hz
1 KILOHERTZ kHz
2 MEGAHERTZ MHz
3 GIGAHERTZ GHz
4 TERAHERTZ THz
5 PER_SECOND 1/s
6 PER_ATTOSECOND 1/as
7 PER_FEMTOSECOND 1/fs
8 PER_PICOSECOND 1/ps
9 PER_NANOSECOND 1/ns
10 PER_MICROSECOND 1/μs
11 PER_MILLISECOND 1/ms
12 PER_MINUTE 1/min
13 PER_HOUR 1/hr
14 PER_DAY 1/day
15 PER_WEEK 1/wk
16 RPM rpm

16. Length

Code Name of display unit Unit
0 METER (SI) m
1 ATTOMETER am
2 FEMTOMETER fm
3 PICOMETER pm
4 NANOMETER nm
5 MICROMETER μm
6 MILLIMETER mm
7 CENTIMETER cm
8 DECIMETER dm
9 DEKAMETER dam
10 HECTOMETER hm
11 KILOMETER km
12 MEGAMETER Mm
13 INCH in
14 FOOT ft
15 YARD yd
16 MILE mi
17 NAUTICAL_MILE NM
18 ASTRONOMICAL_UNIT au
19 PARSEC pc
20 LIGHTYEAR ly
21 ANGSTROM Å

17. Position

Code Name of display unit Unit
0 METER (BASE) m
1 ATTOMETER am
2 FEMTOMETER fm
3 PICOMETER pm
4 NANOMETER nm
5 MICROMETER μm
6 MILLIMETER mm
7 CENTIMETER cm
8 DECIMETER dm
9 DEKAMETER dam
10 HECTOMETER hm
11 KILOMETER km
12 MEGAMETER Mm
13 INCH in
14 FOOT ft
15 YARD yd
16 MILE mi
17 NAUTICAL_MILE NM
18 ASTRONOMICAL_UNIT au
19 PARSEC pc
20 LIGHT_YEAR ly
21 ANGSTROM Å

18. LinearDensity

Code Name of display unit Unit
0 PER_METER (SI) 1/m
1 PER_ATTOMETER 1/am
2 PER_FEMTOMETER 1/fm
3 PER_PICOMETER 1/pm
4 PER_NANOMETER 1/nm
5 PER_MICROMETER 1/μm
6 PER_MILLIMETER 1/mm
7 PER_CENTIMETER 1/cm
8 PER_DECIMETER 1/dm
9 PER_DEKAMETER 1/dam
10 PER_HECTOMETER 1/hm
11 PER_KILOMETER 1/km
12 PER_MEGAMETER 1/Mm
13 PER_INCH 1/in
14 PER_FOOT 1/ft
15 PER_YARD 1/yd
16 PER_MILE 1/mi
17 PER_NAUTICAL_MILE 1/NM
18 PER_ASTRONOMICAL_UNIT 1/au
19 PER_PARSEC 1/pc
20 PER_LIGHT_YEAR 1/ly
21 PER_ANGSTROM 1/Å

19. Mass

Code Name of display unit Unit
0 KILOGRAM (SI) kg
1 FEMTOGRAM fg
2 PICOGRAM pg
3 NANOGRAM mg
4 MICROGRAM μg
5 MILLIGRAM mg
6 GRAM kg
7 MEGAGRAM Mg
8 GIGAGRAM Gg
9 TERAGRAM Tg
10 PETAGRAM Pg
11 MICROELECTRONVOLT μeV
12 MILLIELECTRONVOLT meV
13 KILOELECTRONVOLT keV
14 MEGAELECTRONVOLT MeV
15 GIGAELECTRONVOLT GeV
16 TERAELECTRONVOLT TeV
17 PETAELECTRONVOLT PeV
18 EXAELECTRONVOLT EeV
19 OUNCE oz
20 POUND lb
21 DALTON Da
22 TON_LONG ton (long)
23 TON_SHORT ton (short)
24 TONNE tonne

20. Power

Code Name of display unit Unit
0 WATT (SI) W
1 FEMTOWATT fW
2 PICOWATT pW
3 NANOWATT mW
4 MICROWATT μW
5 MILLIWATT mW
6 KILOWATT kW
7 MEGAWATT MW
8 GIGAWATT GW
9 TERAWATT TW
10 PETAWATT PW
11 ERG_PER_SECOND erg/s
12 FOOT_POUND_FORCE_PER_SECOND ft.lbf/s
13 FOOT_POUND_FORCE_PER_MINUTE ft.lbf/min
14 FOOT_POUND_FORCE_PER_HOUR ft.lbf/h
15 HORSEPOWER_METRIC hp / PS
16 STHENE_METER_PER_SECOND sth/s

21. Pressure

Code Name of display unit Unit
0 PASCAL (SI) Pa
1 HECTOPASCAL hPa
2 KILOPASCAL kPa
3 ATMOSPHERE_STANDARD atm
4 ATMOSPHERE_TECHNICAL at
5 MILLIBAR mbar
6 BAR bar
7 BARYE Ba
8 MILLIMETER_MERCURY mmHg
9 CENTIMETER_MERCURY cmHg
10 INCH_MERCURY inHg
11 FOOT_MERCURY ftHg
12 KGF_PER_SQUARE_MM kgf/mm2
13 PIEZE pz
14 POUND_PER_SQUARE_INCH lb/in2
15 POUND_PER_SQUARE_FOOT lb/ft2
16 TORR torr

22. Speed

Code Name of display unit Unit
0 METER_PER_SECOND (SI) m/s
1 METER_PER_HOUR m/h
2 KM_PER_SECOND km/s
3 KM_PER_HOUR km/h
4 INCH_PER_SECOND in/s
5 INCH_PER_MINUTE in/min
6 INCH_PER_HOUR in/h
7 FOOT_PER_SECOND ft/s
8 FOOT_PER_MINUTE ft/min
9 FOOT_PER_HOUR ft/h
10 MILE_PER_SECOND mi/s
11 MILE_PER_MINUTE mi/min
12 MILE_PER_HOUR mi/h
13 KNOT kt

23. Temperature

Code Name of display unit Unit
0 KELVIN (SI) K
1 DEGREE_CELSIUS °C
2 DEGREE_FAHRENHEIT °F
3 DEGREE_RANKINE °R
4 DEGREE_REAUMUR °Ré

24. AbsoluteTemperature

Code Name of display unit Unit
0 KELVIN (BASE) K
1 DEGREE_CELSIUS °C
2 DEGREE_FAHRENHEIT °F
3 DEGREE_RANKINE °R
4 DEGREE_REAUMUR °Ré

25. Duration

Code Name of display unit Unit
0 SECOND (SI) s
1 ATTOSECOND as
2 FEMTOSECOND fs
3 PICOSECOND ps
4 NANOSECOND ns
5 MICROSECOND μs
6 MILLISECOND ms
7 MINUTE min
8 HOUR hr
9 DAY day
10 WEEK wk

26. Time

Code Name of display unit Unit
0 BASE_SECOND s
1 BASE_MICROSECOND μs
2 BASE_MILLISECOND ms
3 BASE_MINUTE min
4 BASE_HOUR hr
5 BASE_DAY day
6 BASE_WEEK wk
7 EPOCH_SECOND (since 1-1-70 UTC) s (POSIX)
8 EPOCH_MICROSECOND (since 1-1-1970 UTC) μs (POSIX)
9 EPOCH_MILLISECOND (since 1-1-1970 UTC) ms (POSIX)
10 EPOCH_MINUTE (since 1-1-1970 UTC) min (POSIX)
11 EPOCH_HOUR (since 1-1-1970 UTC) hr (POSIX)
12 EPOCH_DAY (since 1-1-1970 UTC) day (POSIX)
13 EPOCH_WEEK (since 1-1-1970 UTC) wk (POSIX)
14 YEAR1_SECOND (since 1-1-0001 UTC) s(1-1-0001)
15 J2000_SECOND (since 1-1-2000 UTC, 12:00) s(1-1-2000)

27. Torque

Code Name of display unit Unit
0 NEWTON_METER (SI) Nm
1 POUND_FOOT lb.ft
2 POUND_INCH lb.in
3 METER_KILOGRAM_FORCE m.kgf

28. Volume

Code Name of display unit Unit
0 CUBIC_METER (SI) m3
1 CUBIC_ATTOMETER am3
2 CUBIC_FEMTOMETER fm3
3 CUBIC_PICOMETER pm3
4 CUBIC_NANOMETER nm3
5 CUBIC_MICROMETER μm3
6 CUBIC_MILLIMETER mm3
7 CUBIC_CENTIMETER cm3
8 CUBIC_DECIMETER dm3
9 CUBIC_DEKAMETER dam3
10 CUBIC_HECTOMETER hm3
11 CUBIC_KILOMETER km3
12 CUBIC_MEGAMETER Mm3
13 CUBIC_INCH in3
14 CUBIC_FOOT ft3
15 CUBIC_YARD yd3
16 CUBIC_MILE mi3
17 LITER l
18 GALLON_IMP gal (imp)
19 GALLON_US_FLUID gal (US)
20 OUNCE_IMP_FLUID oz (imp)
21 OUNCE_US_FLUID oz (US)
22 PINT_IMP pt (imp)
23 PINT_US_FLUID pt (US)
24 QUART_IMP qt (imp)
25 QUART_US_FLUID qt (US)
26 CUBIC_PARSEC pc3
27 CUBIC_LIGHT_YEAR ly3

100. Money

Money is in essence dimensionless. The following currencies are supported, according to ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217)

CODE ABBREV. NAME
784 AED United Arab Emirates dirham
971 AFN Afghan afghani
008 ALL Albanian lek
051 AMD Armenian dram
532 ANG Netherlands Antillean guilder
973 AOA Angolan kwanza
032 ARS Argentine peso
036 AUD Australian dollar
533 AWG Aruban florin
944 AZN Azerbaijani manat
977 BAM Bosnia and Herzegovina convertible mark
052 BBD Barbados dollar
050 BDT Bangladeshi taka
975 BGN Bulgarian lev
048 BHD Bahraini dinar
108 BIF Burundian franc
060 BMD Bermudian dollar
096 BND Brunei dollar
068 BOB Boliviano
984 BOV Bolivian Mvdol (funds code)
986 BRL Brazilian real
044 BSD Bahamian dollar
064 BTN Bhutanese ngultrum
072 BWP Botswana pula
933 BYN New Belarusian ruble
974 BYR Belarusian ruble
084 BZD Belize dollar
124 CAD Canadian dollar
976 CDF Congolese franc
947 CHE WIR Euro (complementary currency)
756 CHF Swiss franc
948 CHW WIR Franc (complementary currency)
990 CLF Unidad de Fomento (funds code)
152 CLP Chilean peso
156 CNY Chinese yuan
170 COP Colombian peso
970 COU Unidad de Valor Real (UVR) (funds code)
188 CRC Costa Rican colon
931 CUC Cuban convertible peso
192 CUP Cuban peso
132 CVE Cape Verde escudo
203 CZK Czech koruna
262 DJF Djiboutian franc
208 DKK Danish krone
214 DOP Dominican peso
012 DZD Algerian dinar
818 EGP Egyptian pound
232 ERN Eritrean nakfa
230 ETB Ethiopian birr
978 EUR Euro
242 FJD Fiji dollar
238 FKP Falkland Islands pound
826 GBP Pound sterling
981 GEL Georgian lari
936 GHS Ghanaian cedi
292 GIP Gibraltar pound
270 GMD Gambian dalasi
324 GNF Guinean franc
320 GTQ Guatemalan quetzal
328 GYD Guyanese dollar
344 HKD Hong Kong dollar
340 HNL Honduran lempira
191 HRK Croatian kuna
332 HTG Haitian gourde
348 HUF Hungarian forint
360 IDR Indonesian rupiah
376 ILS Israeli new shekel
356 INR Indian rupee
368 IQD Iraqi dinar
364 IRR Iranian rial
352 ISK Icelandic króna
388 JMD Jamaican dollar
400 JOD Jordanian dinar
392 JPY Japanese yen
404 KES Kenyan shilling
417 KGS Kyrgyzstani som
116 KHR Cambodian riel
174 KMF Comoro franc
408 KPW North Korean won
410 KRW South Korean won
414 KWD Kuwaiti dinar
136 KYD Cayman Islands dollar
398 KZT Kazakhstani tenge
418 LAK Lao kip
422 LBP Lebanese pound
144 LKR Sri Lankan rupee
430 LRD Liberian dollar
426 LSL Lesotho loti
434 LYD Libyan dinar
504 MAD Moroccan dirham
498 MDL Moldovan leu
969 MGA Malagasy ariary
807 MKD Macedonian denar
104 MMK Myanmar kyat
496 MNT Mongolian tögrög
446 MOP Macanese pataca
478 MRO Mauritanian ouguiya
480 MUR Mauritian rupee
462 MVR Maldivian rufiyaa
454 MWK Malawian kwacha
484 MXN Mexican peso
979 MXV Mexican Unidad de Inversion (UDI) (funds code)
458 MYR Malaysian ringgit
943 MZN Mozambican metical
516 NAD Namibian dollar
566 NGN Nigerian naira
558 NIO Nicaraguan córdoba
578 NOK Norwegian krone
524 NPR Nepalese rupee
554 NZD New Zealand dollar
512 OMR Omani rial
590 PAB Panamanian balboa
604 PEN Peruvian Sol
598 PGK Papua New Guinean kina
608 PHP Philippine peso
586 PKR Pakistani rupee
985 PLN Polish zloty
600 PYG Paraguayan guaraní
634 QAR Qatari riyal
946 RON Romanian leu
941 RSD Serbian dinar
643 RUB Russian ruble
646 RWF Rwandan franc
682 SAR Saudi riyal
090 SBD Solomon Islands dollar
690 SCR Seychelles rupee
938 SDG Sudanese pound
752 SEK Swedish krona/kronor
702 SGD Singapore dollar
654 SHP Saint Helena pound
694 SLL Sierra Leonean leone
706 SOS Somali shilling
968 SRD Surinamese dollar
728 SSP South Sudanese pound
678 STD São Tomé and Príncipe dobra
222 SVC Salvadoran colón
760 SYP Syrian pound
748 SZL Swazi lilangeni
764 THB Thai baht
972 TJS Tajikistani somoni
934 TMT Turkmenistani manat
788 TND Tunisian dinar
776 TOP Tongan pa?anga
949 TRY Turkish lira
780 TTD Trinidad and Tobago dollar
901 TWD New Taiwan dollar
834 TZS Tanzanian shilling
980 UAH Ukrainian hryvnia
800 UGX Ugandan shilling
840 USD United States dollar
997 USN United States dollar (next day) (funds code)
940 UYI Uruguay Peso en Unidades Indexadas (URUIURUI) (funds code)
858 UYU Uruguayan peso
860 UZS Uzbekistan som
937 VEF Venezuelan bolívar
704 VND Vietnamese dong
548 VUV Vanuatu vatu
882 WST Samoan tala
950 XAF CFA franc BEAC
961 XAG Silver (one troy ounce)
959 XAU Gold (one troy ounce)
955 XBA European Composite Unit (EURCO) (bond market unit)
956 XBB European Monetary Unit (E.M.U.-6) (bond market unit)
957 XBC European Unit of Account 9 (E.U.A.-9) (bond market unit)
958 XBD European Unit of Account 17 (E.U.A.-17) (bond market unit)
951 XCD East Caribbean dollar
960 XDR Special drawing rights
952 XOF CFA franc BCEAO
964 XPD Palladium (one troy ounce)
953 XPF CFP franc (franc Pacifique)
962 XPT Platinum (one troy ounce)
994 XSU SUCRE
963 XTS Code reserved for testing purposes
965 XUA ADB Unit of Account
999 XXX No currency
886 YER Yemeni rial
710 ZAR South African rand
967 ZMW Zambian kwacha
932 ZWL Zimbabwean dollar A/10
1000 XBT Bitcoin

101. MoneyPerArea

For MoneyPerArea (code 101), it is suggested to send three bytes: two for the Money, followed by an Area constant. As an example, if we want to send the price of land as € 2500 per hectare, transmitted as a double (code 26), this would be coded as (€ has code 978 = #03D2):

|26|101|0x03|0xD2|21|0x40|0xA3|0x88|0x00|0x00|0x00|0x00|0x00|

102. MoneyPerEnergy

For MoneyPerEnergy, it is suggested to send three bytes: two for the Money, followed by an Energy display constant.

103. MoneyPerLength

For MoneyPerLength, it is suggested to send three bytes: two for the Money, followed by a Length display constant.

104. MoneyPerMass

For MoneyPerMass, it is suggested to send three bytes: two for the Money, followed by a Mass display constant.

105. MoneyPerDuration

For MoneyPerDuration, it is suggested to send three bytes: two for the Money, followed by a Duration display constant.

106. MoneyPerVolume

For MoneyPerVolume, it is suggested to send three bytes: two for the Money, followed by a Volume display constant.