Difference between revisions of "Units"

From MagnetoWiki
Jump to navigation Jump to search
Line 25: Line 25:
  
 
A useful primer: McKnight, J.G. "Quantities, units, letter symbols, and abbreviations", [http://www.aes.org/e-lib/browse.cfm?elib=2641 J. Audio Eng. Soc. 24 (1976) 40-44]
 
A useful primer: McKnight, J.G. "Quantities, units, letter symbols, and abbreviations", [http://www.aes.org/e-lib/browse.cfm?elib=2641 J. Audio Eng. Soc. 24 (1976) 40-44]
 +
 +
A classic text: [https://archive.org/details/dimensionalanaly00bridrich P.W. Bridgeman, Dimensional Analysis, New Haven: Yale Univ. Press 1922]
  
 
==Software for encoding and converting units==
 
==Software for encoding and converting units==
Line 34: Line 36:
  
 
[http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=403789&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D403789  IEEE Transactions on Software Engineering, vol. 21, no. 8 (August 1995), pp. 651-661]
 
[http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=403789&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D403789  IEEE Transactions on Software Engineering, vol. 21, no. 8 (August 1995), pp. 651-661]
 +
  
 
===[http://dl.acm.org/citation.cfm?id=1039994&dl=ACM&coll=DL&CFID=397936388&CFTOKEN=24902188 A package for handling units of measure in Lisp]===   
 
===[http://dl.acm.org/citation.cfm?id=1039994&dl=ACM&coll=DL&CFID=397936388&CFTOKEN=24902188 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 [http://3e8.org/pub/scheme/doc/lisp-pointers/v5i2/p21-cunis.pdf PDF]
+
by R Cunis 1992  
 +
 
 +
ACM SIGPLAN Lisp Pointers Homepage archive Volume V Issue 2, April-June 1992  Pages 21 - 25 [http://3e8.org/pub/scheme/doc/lisp-pointers/v5i2/p21-cunis.pdf PDF]
  
  
 
===[http://www-ksl.stanford.edu/knowledge-sharing/ontologies/html/physical-quantities/physical-quantities.lisp.html Lisp Ontology of Physical Quantities]===
 
===[http://www-ksl.stanford.edu/knowledge-sharing/ontologies/html/physical-quantities/physical-quantities.lisp.html Lisp Ontology of Physical Quantities]===
 +
  
 
===[http://www.gnu.org/software/units/  fixed size tables of C structs]===
 
===[http://www.gnu.org/software/units/  fixed size tables of C structs]===
  
 
Adrian Mariano: dimensional analysis of unit strings using fixed size tables of C structs.
 
Adrian Mariano: dimensional analysis of unit strings using fixed size tables of C structs.
 +
  
 
===[http://msdn.microsoft.com/en-us/library/dd233243.aspx Units of Measure in F#]===
 
===[http://msdn.microsoft.com/en-us/library/dd233243.aspx Units of Measure in F#]===
Line 50: Line 57:
 
"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."
 
"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."
  
===[http://www.unidata.ucar.edu/software/udunits/udunits-2/udunits2.html UniData Units]===
+
 
 +
===[http://www.unidata.ucar.edu/software/udunits/udunits-2/udunits2.html 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."
 
"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."
  

Revision as of 22:11, 4 August 2014

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."