Units

From MagnetoWiki
Revision as of 22:11, 4 August 2014 by Houpt (talk | contribs)
Jump to navigation Jump to search

Units of measure of a dimensional quantity (e.g., length = a dimensional quanitity , unit of length = meter)


International System of Units (SI) from NIST Reference

The standard SI units are predefined in The International System of Units (NIST Special Publication 330).

Appendix B.8 of NIST Special NIST Guide for use of the SI (Publication 811) lists many non-SI conversion factors.

SI Base Units of the 7 Base Quantities:

Base quantity Name Symbol
length meter m
mass kilogram kg
time second s
electric current ampere A
thermodynamic temperature kelvin K
amount of substance mole mol
luminous intensity candela cd

Note an anomaly: the basic unit of mass (kg) has a prefix, so have to tolerate g as basic unit also.

Other quantities, called derived quantities, are defined in terms of the seven base quantities via a system of quantity equations.

A useful primer: McKnight, J.G. "Quantities, units, letter symbols, and abbreviations", J. Audio Eng. Soc. 24 (1976) 40-44

A classic text: P.W. Bridgeman, Dimensional Analysis, New Haven: Yale Univ. Press 1922

Software for encoding and converting units

Conversion of units of measurement (html paper) (Lisp)

by GS Novak Jr 1995. See software package at http://www.cs.utexas.edu/~novak/units.html

IEEE Transactions on Software Engineering, vol. 21, no. 8 (August 1995), pp. 651-661


A package for handling units of measure in Lisp

by R Cunis 1992

ACM SIGPLAN Lisp Pointers Homepage archive Volume V Issue 2, April-June 1992 Pages 21 - 25 PDF


Lisp Ontology of Physical Quantities

fixed size tables of C structs

Adrian Mariano: dimensional analysis of unit strings using fixed size tables of C structs.


Units of Measure in F#

"Floating point and signed integer values in F# can have associated units of measure, which are typically used to indicate length, volume, mass, and so on. By using quantities with units, you enable the compiler to verify that arithmetic relationships have the correct units, which helps prevent programming errors."


UniData Units

"The UDUNITS-2 package provides support for units of physical quantities. Its three main components are: 1) a C library for units of physical quantities; 2) a utility; for obtaining the definition of a unit and for converting numeric values between compatible units; and 3) an extensive database of units."


TCL libraries

Robert W. Techentin, summary of NIST Spec. Pbul 330 and 811 for use with TCL libraries:

"This library provides a conversion facility from a variety of scientific and engineering shorthand notations into floating point numbers. This allows application developers to easily convert values with different units into uniformly scaled numbers. The units conversion facility is also able to convert between compatible units. If, for example, a application is expecting a value in ohms (Resistance), and the user specifies units of milliwebers/femtocoulomb, the conversion routine will handle it appropriately. An error will be generated if an incorrect conversion is attempted.

Values are scaled from one set of units to another by dimensional analysis. Both the value units and the target units are reduced into primitive units and a scale factor. Units are checked for compatibility, and the scale factors are applied by multiplication and division. This technique is extremely flexible and quite robust.

New units and new unit abbreviations can be defined in terms of existing units and abbreviations. It is also possible to define a new primitive unit, although that will probably be unnecessary. New units will most commonly be defined to accommodate non-SI measurement systems, such as defining the unit inch as 2.54 cm."