Module dimensioned::unit_systems::ucum
[−]
[src]
The Unified Code for Units of Measure (UCUM)
This is an attempt to define a unit system for The Unified Code for Units of Measure. It does not perfectly match the specification in the ways mentioned below.
The UCUM specification uses NIST values from 1980 for experimentally determined constants. For some of these, we use the 2014 values instead, which can be found here.
There are a few classifications of units that UCUM defines but that it does not make sense to define here, and so we do not. They are as follows:
Units defined in terms of characters that we can't use. For example, the symbol for minutes as measure of angle is given by a single quote, '.
Units that require conversions that involve more than multiplication. These include some temperature units (such as degrees Celcius) and logrithmic units (such as decibels).
Conflicts:
While the UCUM specification aims to minimize conflicts, there are still some. Units that may
conflict are indicated by the UCUM spec by square brackets. When there is a conflict, for the unit
in square brackets, we name it with a trailing underscore. For example, the speed of light
conflicts with coulomb, so we use C_
for the speed of light.
A note on derived units:
Mass is involved in a great many units. As the SI unit of mass is the kilogram, there are many
units defined in terms of tffhe kilogram. To create a derived unit in dimensioned, it must have a
value of 1.0. Since UCUM uses the gram and not the kilogram as a base unit, that leads to many
common derived units being off by a factor of 1000. As a result, you will see many derived units
with prefixes, such as MilliNewton
and KiloFarad
. The constants for the more common units (N
and F
for the two mentioned) are still defined, but if you need to refer to their types (such as
in function signatures), this is something to bear in mind.
Following, we list all of the base units, derived units, and constants that are defined in this unit system.
Base Units
Constant | Unit | Print Token | Dimensionn |
---|---|---|---|
M | Meter | m | Length |
S | Second | s | Time |
G | Gram | g | Mass |
RAD | Radian | rad | |
K | Kelvin | K | Temperature |
C | Coulomb | C | Charge |
CD | Candela | cd | LuminousIntensity |
Derived Units
Constant | Unit | Unit Definition | Dimension |
---|---|---|---|
SR | Steradian | Radian * Radian | |
HZ | Hertz | Unitless / Second | Frequency |
MILLIN | MilliNewton | Gram * Meter / Second / Second | Force |
MILLIPA | MilliPascal | MilliNewton / Meter / Meter | Pressure |
MILLIJ | MilliJoule | MilliNewton * Meter | Energy |
MILLIW | MilliWatt | MilliJoule / Second | Power |
A | Ampere | Coulomb / Second | Current |
MILLIV | MilliVolt | MilliJoule / Coulomb | ElectricPotential |
KILOF | KiloFarad | Coulomb / MilliVolt | Capacitance |
MILLIOHM | MilliOhm | MilliVolt / Ampere | Resistance |
KILOSIE | KiloSiemens | Unitless / MilliOhm | Conductance |
MILLIWB | MilliWeber | MilliVolt * Second | MagneticFlux |
MILLIT | MilliTesla | MilliWeber / Meter / Meter | |
MILLIH | MilliHenry | MilliWeber / Ampere | Inductance |
LM | Lumen | Candela * Steradian | |
LX | Lux | Lumen / Meter / Meter | |
BQ | Becquerel | Unitless / Second | |
GY | Gray | MilliJoule / Gram | |
SV | Sievert | MilliJoule / Gram | |
S2 | Second2 | Second * Second | |
S3 | Second3 | Second2 * Second | |
M2 | Meter2 | Meter * Meter | Area |
M3 | Meter3 | Meter2 * Meter | Volume |
PM | PerMeter | Unitless / Meter | ReciprocalLength |
MPS | MeterPerSecond | Meter / Second | Velocity |
MPS2 | MeterPerSecond2 | Meter / Second2 | Acceleration |
MPS3 | MeterPerSecond3 | Meter / Second3 | Jerk |
M2PS | Meter2PerSecond | Meter2 / Second | |
M2PS2 | Meter2PerSecond2 | Meter2 / Second2 | |
APM | AmperePerMeter | Ampere / Meter | |
CPM2 | CandelaPerMeter2 | Candela / Meter2 | |
CPG | CoulombPerGram | Coulomb / Gram | |
GPM | GramPerMeter | Gram / Meter | |
GPM4S | GramPerMeter4Second | Gram / Meter3 / Meter / Second | |
MILLIJS | MilliJouleSecond | MilliJoule * Second | |
MILLIJPK | MilliJoulePerKelvin | MilliJoule / Kelvin | |
KILOFPM | KiloFaradPerMeter | KiloFarad / Meter | |
MILLINPA2 | MilliNewtonPerAmpere2 | MilliNewton / Ampere / Ampere | |
M3PGS2 | Meter3PerGramSecond2 | Meter3 / Gram / Second2 | |
MILLIPS | MilliPascalSecond | MilliPascal * Second | |
M3PSG | Meter3PerSecondGram | Meter3 / Second / Gram |
Constants
Name | Constant | Value | Unit | Dimension |
---|---|---|---|---|
Centimeter | CM | CENTI * M | Meter | Length |
Astronomic unit | ASU | 149597.870691e6 * M | Meter | Length |
Parsec | PRS | 3.085678e16 * M | Meter | Length |
Light-year | LY | C_ * ANN_J | Meter | Length |
International inch | IN_I | 2.54 * CM | Meter | Length |
International foot | FT_I | 12.0 * IN_I | Meter | Length |
International yard | YD_I | 3.0 * FT_I | Meter | Length |
International mile | MI_I | 5280.0 * FT_I | Meter | Length |
International fathom | FTH_I | 6.0 * FT_I | Meter | Length |
International nautical mile | NMI_I | 1852.0 * M | Meter | Length |
International mil | MIL_I | 1.0e-3 * IN_I | Meter | Length |
International hand | HD_I | 4.0 * IN_I | Meter | Length |
US foot | FT_US | 1200.0 / 3937.0 * M | Meter | Length |
US yard | YD_US | 3.0 * FT_US | Meter | Length |
US inch | IN_US | FT_US / 12.0 | Meter | Length |
US rod | RD_US | 16.5 * FT_US | Meter | Length |
US Gunter's chain | CH_US | 4.0 * RD_US | Meter | Length |
US Gunter's chain | LK_US | CH_US / 100.0 | Meter | Length |
US Ramden's chain | RCH_US | 100.0 * FT_US | Meter | Length |
US Link for Ramden's chain | RLK_US | RCH_US / 100.0 | Meter | Length |
US fathom | FTH_US | 6.0 * FT_US | Meter | Length |
US furlong | FUR_US | 40.0 * RD_US | Meter | Length |
US mile | MI_US | 8.0 * FUR_US | Meter | Length |
US mil | MIL_US | 1.0e-3 * IN_US | Meter | Length |
British inch | IN_BR | 2.539998 * CM | Meter | Length |
British foot | FT_BR | 12.0 * IN_BR | Meter | Length |
British rod | RD_BR | 16.5 * FT_BR | Meter | Length |
British Gunter's chain | CH_BR | 4.0 * RD_BR | Meter | Length |
British link for Gunter's chain | LK_BR | CH_BR / 100.0 | Meter | Length |
British fathom | FTH_BR | 6.0 * FT_BR | Meter | Length |
British pace | PC_BR | 2.5 * FT_BR | Meter | Length |
British yard | YD_BR | 3.0 * FT_BR | Meter | Length |
British mile | MI_BR | 5280.0 * FT_BR | Meter | Length |
British nautical mile | NMI_BR | 6080.0 * FT_BR | Meter | Length |
Line | LNE | IN_I / 12.0 | Meter | Length |
Point | PNT | LNE / 6.0 | Meter | Length |
Pica | PCA | 12.0 * PNT | Meter | Length |
Printer's point | PNT_PR | 0.013837 * IN_I | Meter | Length |
Printer's pica | PCA_PR | 12.0 * PNT_PR | Meter | Length |
Pied | PIED | 32.48 * CM | Meter | Length |
Pounce | POUNCE | PIED / 12.0 | Meter | Length |
Ligne | LIGNE | POUNCE / 12.0 | Meter | Length |
Didot | DIDOT | LIGNE / 6.0 | Meter | Length |
Cicero | CICERO | 12.0 * DIDOT | Meter | Length |
Charrière | CH | 1.0 / 3.0 * MILLI * M | Meter | Length |
Ångström | AO | 0.1 * NANO * M | Meter | Length |
Smoot | SMOOT | 67.0 * IN_I | Meter | Length |
Minute | MIN | 60.0 * S | Second | Time |
Hour | HR | 60.0 * MIN | Second | Time |
Day | D | 24.0 * HR | Second | Time |
Tropical year | ANN_T | 365.24219 * D | Second | Time |
Mean Julian year | ANN_J | 365.25 * D | Second | Time |
Mean Gregorian year | ANN_G | 365.2425 * D | Second | Time |
year | ANN | ANN_J | Second | Time |
week | WK | 7.0 * D | Second | Time |
Synodal month | MO_S | 29.53059 * D | Second | Time |
Mean Julian month | MO_J | ANN_J / 12.0 | Second | Time |
Mean Gregorian month | MO_G | ANN_G / 12.0 | Second | Time |
Month | MO | MO_J | Second | Time |
Svedberg unit | S_ | 1.0e-13 * S | Second | Time |
Kilogram | KG | KILO * G | Gram | Mass |
Tonne | TNE | 1.0e3 * KG | Gram | Mass |
Unified atomic mass unit | AMU | 1.6605402e-24 * G | Gram | Mass |
Electron mass | M_E | 9.10938356e-31 * KG | Gram | Mass |
Proton mass | M_P | 1.6726231e-24 * G | Gram | Mass |
Grain | GR | 64.79891 * MILLI * G | Gram | Mass |
Avoirdupois pound | LB_AV | 7000.0 * GR | Gram | Mass |
Avoirdupois ounce | OZ_AV | LB_AV / 16.0 | Gram | Mass |
Avoirdupois dram | DR_AV | OZ_AV / 16.0 | Gram | Mass |
Avoirdupois short hundredweight | SCWT_AV | 100.0 * LB_AV | Gram | Mass |
Avoirdupois long hundredweight | LCWT_AV | 112.0 * LB_AV | Gram | Mass |
Avoirdupois short ton | STON_AV | 20.0 * SCWT_AV | Gram | Mass |
Avoirdupois long ton | LTON_AV | 20.0 * LCWT_AV | Gram | Mass |
Avoirdupois stone | STONE_AV | 14.0 * LB_AV | Gram | Mass |
Troy pennyweight | PWT_TR | 24.0 * GR | Gram | Mass |
Troy ounce | OZ_TR | 20.0 * PWT_TR | Gram | Mass |
Troy pound | LB_TR | 12.0 * OZ_TR | Gram | Mass |
Apothecary scruple | SC_AP | 20.0 * GR | Gram | Mass |
Apothecary dram | DR_AP | 3.0 * SC_AP | Gram | Mass |
Apothecary ounce | OZ_AP | 8.0 * DR_AP | Gram | Mass |
Apothecary pound | LB_AP | 12.0 * OZ_AP | Gram | Mass |
Apothecary ounce | OZ_M | 28.0 * G | Gram | Mass |
Metric carat | CAR_M | 0.2 * G | Gram | Mass |
Gon, grade | GON | 0.9 * DEG | Radian | |
Degree | DEG | 2.0 * consts::PI / 360.0 * RAD | Radian | |
Circle | CIRC | 2.0 * consts::PI * RAD | Radian | |
Degree Rankine | DEGR | 5.0 / 9.0 * K | Kelvin | Temperature |
Elementary charge | E | 1.6021766208e-19 * C | Coulomb | Charge |
Sphere | SPH | 4.0 * consts::PI * SR | Steradian | |
Katal | KAT | MOL / S | Hertz | Frequency |
Unit | U | MICRO * MOL / MIN | Hertz | Frequency |
Newton | N | KILO * MILLIN | MilliNewton | Force |
Gram force | GF | G * G_ | MilliNewton | Force |
Pound force | LBF_AV | LB_AV * G_ | MilliNewton | Force |
Dyne | DYN | G * CM / S2 | MilliNewton | Force |
Pascal | PA | KILO * MILLIPA | MilliPascal | Pressure |
Bar | BAR | 1.0e5 * PA | MilliPascal | Pressure |
Standard atmosphere | ATM | 101325.0 * PA | MilliPascal | Pressure |
Meter of water column | MH20 | 9.80665 * KILO * PA | MilliPascal | Pressure |
Meter of mercury column | MHG | 133.3220 * KILO * PA | MilliPascal | Pressure |
Technical atmosphere | ATT | KILO * GF / CM / CM | MilliPascal | Pressure |
Pound per square inch | PSI | LBF_AV / IN_I / IN_I | MilliPascal | Pressure |
Joule | J | KILO * MILLIJ | MilliJoule | Energy |
Electronvolt | EV | E * V | MilliJoule | Energy |
Erg | ERG | DYN * CM | MilliJoule | Energy |
Calorie at 15 °C | CAL_15 | 4.18580 * J | MilliJoule | Energy |
Calorie at 20 °C | CAL_20 | 4.18190 * J | MilliJoule | Energy |
Mean calorie | CAL_M | 4.19002 * J | MilliJoule | Energy |
International table calorie | CAL_IT | 4.1868 * J | MilliJoule | Energy |
Thermochemical calorie | CAL_TH | 4.184 * J | MilliJoule | Energy |
Calorie | CAL | CAL_TH | MilliJoule | Energy |
Nutrition label calorie | CAL_ | KILO * CAL | MilliJoule | Energy |
British thermal unit at 39 °F | BTU_39 | 1.05967 * KILO * J | MilliJoule | Energy |
British thermal unit at 59 °F | BTU_59 | 1.05480 * KILO * J | MilliJoule | Energy |
British thermal unit at 60 °F | BTU_60 | 1.05468 * KILO * J | MilliJoule | Energy |
Mean British thermal unit | BTU_M | 1.05587 * KILO * J | MilliJoule | Energy |
International table British thermal unit | BTU_IT | 1.05505585262 * KILO * J | MilliJoule | Energy |
Thermochemical British thermal unit | BTU_TH | 1.054350 * KILO * J | MilliJoule | Energy |
British thermal unit | BTU | BTU_TH | MilliJoule | Energy |
Watt | W | KILO * MILLIW | MilliWatt | Power |
Horsepower | HP | 550.0 * FT_I * LBF_AV / S | MilliWatt | Power |
Biot | BI | 10.0 * A | Ampere | Current |
Gilbert | GB | OE * CM | Ampere | Current |
Volt | V | KILO * MILLIV | MilliVolt | ElectricPotential |
Farad | F | MILLI * KILOF | KiloFarad | Capacitance |
Ohm | OHM | KILO * MILLIOHM | MilliOhm | Resistance |
Siemens | SIE | MILLI * KILOSIE | KiloSiemens | Conductance |
Mho | MHO | MILLI * SIE | KiloSiemens | Conductance |
Weber | WB | KILO * MILLIWB | MilliWeber | MagneticFlux |
Maxwell | MX | 1.0e-8 * WB | MilliWeber | MagneticFlux |
Tesla | T | KILO * MILLIT | MilliTesla | |
Gauss | GS | 1.0e-4 * T | MilliTesla | |
Henry | H | KILO * MILLIH | MilliHenry | Inductance |
Phot | PHT | 1.0e-4 * LX | Lux | |
Curie | CI | 3.7e10 * BQ | Becquerel | |
Are | AR | 100.0 * M2 | Meter2 | Area |
International square inch | SIN_I | IN_I * IN_I | Meter2 | Area |
International square foot | SFT_I | FT_I * FT_I | Meter2 | Area |
International square yard | SYD_I | YD_I * YD_I | Meter2 | Area |
International circular mil | CML_I | consts::PI / 4.0 * MIL_I * MIL_I | Meter2 | Area |
US acre | ACR_US | 160.0 * RD_US * RD_US | Meter2 | Area |
US square rod | SRD_US | RD_US * RD_US | Meter2 | Area |
US square mile | SMI_US | MI_US * MI_US | Meter2 | Area |
Section | SCT | MI_US * MI_US | Meter2 | Area |
Township | TWP | 36.0 * SCT | Meter2 | Area |
British acre | ACR_BR | 4840.0 * YD_BR * YD_BR | Meter2 | Area |
Barn | BRN | 100.0 * FEMTO * M * FEMTO * M | Meter2 | Area |
Liter | L | 0.1 * 0.1 * 0.1 * M3 | Meter3 | Volume |
International cubic inch | CIN_I | IN_I * IN_I * IN_I | Meter3 | Volume |
International cubic foot | CFT_I | FT_I * FT_I * FT_I | Meter3 | Volume |
International cubic yard | CYD_I | YD_I * YD_I * YD_I | Meter3 | Volume |
International board foot | BF_I | 144.0 * CIN_I | Meter3 | Volume |
International cord | CR_I | 128.0 * CFT_I | Meter3 | Volume |
Queen Anne's wine gallon | GAL_US | 231.0 * IN_I * IN_I * IN_I | Meter3 | Volume |
US barrel | BBL_US | 42.0 * GAL_US | Meter3 | Volume |
US quart | QT_US | GAL_US / 4.0 | Meter3 | Volume |
US pint | PT_US | QT_US / 2.0 | Meter3 | Volume |
US gill | GIL_US | PT_US / 4.0 | Meter3 | Volume |
US fluid Ounce | FOZ_US | GIL_US / 4.0 | Meter3 | Volume |
US fluid Dram | FDR_US | FOZ_US / 8.0 | Meter3 | Volume |
US minim | MIN_US | FDR_US / 60.0 | Meter3 | Volume |
US cord | CRD_US | CR_I | Meter3 | Volume |
US bushel | BU_US | 2150.42 * IN_I * IN_I * IN_I | Meter3 | Volume |
Historical winchester gallon | GAL_WI | BU_US / 8.0 | Meter3 | Volume |
US peck | PK_US | BU_US / 4.0 | Meter3 | Volume |
US dry quart | DQT_US | PK_US / 8.0 | Meter3 | Volume |
US dry pint | DPT_US | DQT_US / 2.0 | Meter3 | Volume |
US tablespoon | TBS_US | FOZ_US / 2.0 | Meter3 | Volume |
US teaspoon | TSP_US | TBS_US / 3.0 | Meter3 | Volume |
US cup | CUP_US | 16.0 * TBS_US | Meter3 | Volume |
Metric fluid ounce | FOZ_M | 30.0 * MILLI * L | Meter3 | Volume |
Metric cup | CUP_M | 240.0 * MILLI * L | Meter3 | Volume |
Metric teaspoon | TSP_M | 5.0 * MILLI * L | Meter3 | Volume |
Metric tablespoon | TBS_M | 15.0 * MILLI * L | Meter3 | Volume |
British gallon | GAL_BR | 4.54609 * L | Meter3 | Volume |
British peck | PK_BR | 2.0 * GAL_BR | Meter3 | Volume |
British bushel | BU_BR | 4.0 * PK_BR | Meter3 | Volume |
British quart | QT_BR | GAL_BR / 4.0 | Meter3 | Volume |
British pint | PT_BR | QT_BR / 2.0 | Meter3 | Volume |
British gill | GIL_BR | PT_BR / 4.0 | Meter3 | Volume |
British fluid ounce | FOZ_BR | GIL_BR / 5.0 | Meter3 | Volume |
British fluid dram | FDR_BR | FOZ_BR / 8.0 | Meter3 | Volume |
British minim | MIN_BR | FDR_BR / 60.0 | Meter3 | Volume |
Drop | DRP | MILLI * L / 20.0 | Meter3 | Volume |
Stere | STR | 1.0 * M3 | Meter3 | Volume |
Kayser | KY | 1.0 / CM | PerMeter | ReciprocalLength |
Diopter | DIOP | 1.0 / M | PerMeter | ReciprocalLength |
Mesh | MESH_I | 1.0 / IN_I | PerMeter | ReciprocalLength |
Speed of light in a vacuum | C_ | 299792458.0 * MPS | MeterPerSecond | Velocity |
International knot | KN_I | NMI_I / HR | MeterPerSecond | Velocity |
British knot | KN_BR | NMI_BR / HR | MeterPerSecond | Velocity |
Standard acceleration of free fall | G_ | 9.80665 * M / S2 | MeterPerSecond2 | Acceleration |
Gal | GL | CM / S2 | MeterPerSecond2 | Acceleration |
Stokes | ST | CM * CM / S | Meter2PerSecond | |
Radiation absorbed dose | RAD_ | 100.0 * ERG / G | Meter2PerSecond2 | |
Radiation equivalent man | REM_ | RAD_ | Meter2PerSecond2 | |
Oersted | OE | 250.0 / consts::PI * A / M | AmperePerMeter | |
Stilb | SB | CD / CM / CM | CandelaPerMeter2 | |
Lambert | LMB | SB / consts::PI | CandelaPerMeter2 | |
Roentgen | ROE | 2.58e-4 * C / KG | CoulombPerGram | |
Tex | TEX | 1.0 * G / (KILO * M) | GramPerMeter | |
Denier | DEN | TEX / 9.0 | GramPerMeter | |
Peripheral vascular resistance unit | PRU | MHG * S / L | GramPerMeter4Second | |
Planck constant | H_ | 6.6260755e-34 * J * S | MilliJouleSecond | |
Boltzmann constant | K_ | 1.380658e-23 * J / K | MilliJoulePerKelvin | |
Permittivity of vacuum | EPS_0 | 8.854187817e-12 * F / M | KiloFaradPerMeter | |
Permeability of vacuum | MU_0 | 4.0e-7 * consts::PI * N / A / A | MilliNewtonPerAmpere2 | |
Newtonian constant of gravitation | GC | 6.67259e-11 * M3 / KG / S2 | Meter3PerGramSecond2 | |
Poise | P | DYN * S / CM / CM | MilliPascalSecond | |
Metabolic equivalent | MET | 3.5 * MILLI * L / MIN / KG | Meter3PerSecondGram |
Reexports
pub use self::f64consts::*; |
Modules
f32consts |
Constants defined for $System of value type $t |
f64consts |
Constants defined for $System of value type $t |
Structs
UCUM |
The $System unit system |