home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e032 / 3.ddi / FILES / MISCELLA.PAK / UNITS.M < prev    next >
Encoding:
Text File  |  1992-07-29  |  20.5 KB  |  708 lines

  1.  
  2. (* :Title: Units *)
  3.  
  4. (* :Author: Stephen Wolfram *)
  5.  
  6. (* :Summary: Unit conversions *)
  7.  
  8. (* :Package Version: 1.2 *)
  9.  
  10. (* :Copyright: *)
  11.  
  12. (* :Context: Miscellaneous`Units` *)
  13.  
  14. (* :History: 
  15.     Version 1.1 by Stephen Wolfram (Wolfram Research), February, 1987.
  16.     Revised by ECM (Wolfram Research), November, 1990. *)
  17.  
  18. (* :Keywords: *)
  19.  
  20. (* :Source: 
  21.     CRC Handbook of Chemistry and Physics, 69th Edition, 1988-1989,
  22.     Kaye & Laby, Allen, World Almanac, etc. *)
  23.     
  24.  
  25. (* :Warning: Makes use of system symbol Second. *)
  26.  
  27. (* :Mathematica Version: 2.0 *)
  28.  
  29. (* :Limitation: In most cases, a unit must be entered with the metric
  30.         prefix separated from the root by a space (i.e., kilometer is
  31.         expressed as Kilo Meter).
  32.         The exception is any unit fundamental to one of the supported
  33.         systems of measurement (i.e., kilogram is the fundamental unit
  34.         of length in the MKS system and may be expressed as either
  35.         Kilogram or Kilo Gram). *)
  36.  
  37. (* :Discussion: *)
  38.  
  39. BeginPackage["Miscellaneous`Units`","Miscellaneous`SIUnits`"]
  40.  
  41. Convert::usage = 
  42.     "Convert[old, new] converts old to a form involving the combination
  43.     of units new."
  44.  
  45. ConvertTemperature::usage =
  46.     "ConvertTemperature[temp, old, new] converts temp from the old scale
  47.     to the new scale."
  48.  
  49. SI::usage = "SI[expr] converts expr to SI units (International System)."
  50.  
  51. MKS::usage = "MKS[expr] converts expr to MKS units (meter/kilogram/second)."
  52.  
  53. CGS::usage = "CGS[expr] converts expr to CGS units (centimeter/gram/second)."
  54.  
  55.  
  56. (** non-SI fundamental units usage **)
  57.  
  58. Bit::usage = "Bit is the fundamental unit of information."
  59.  
  60. (** CGS units usage **)
  61.  
  62. Centimeter::usage = "Centimeter is the fundamental CGS unit of length."
  63.  
  64. Gram::usage = "Gram is the fundamental CGS unit of mass."
  65.  
  66. (** SI prefixes usage **)
  67.  
  68. Map[(Evaluate[#[[1]]]::"usage" =
  69.     StringJoin[ToString[#[[1]]], " is the SI unit prefix denoting 10^", 
  70.         ToString[#[[2]]],"."])&,
  71.     Transpose[{
  72.     {Exa,Peta,Tera,Giga,Mega,Kilo,Hecto,Deca,Deci,Centi,Milli,
  73.     Micro,Nano,Pico,Femto,Atto},
  74.     {18,15,12,9,6,3,2,1,-1,-2,-3,-6,-9,-12,-15,-18}    
  75.     }]
  76. ]
  77.  
  78. (** supplementary SI units usage **)
  79.  
  80. Radian::usage = "Radian is a dimensionless measure of plane angle."
  81. Steradian::usage = "Steradian is a dimensionless measure of solid angle."
  82.  
  83. (** other usage messages **)
  84.  
  85. Map[(Evaluate[#]::"usage" =
  86.     StringJoin[ToString[#], " is a unit multiplier."])&,
  87.     {Percent,Gross,Dozen,BakersDozen,
  88.     ArcMinute,ArcSecond,RightAngle,Quadrant,Grade}
  89.     ]
  90.  
  91. $NewMessage[ Degree, "usage"]
  92. Degree::usage = StringJoin[ Degree::usage, "   It is also used as a unit multiplier."]
  93.  
  94. $NewMessage[ Circle, "usage"]
  95. Circle::usage = StringJoin[ Circle::usage, "   It is also used as a unit multiplier."]
  96.  
  97. AU::usage = "AU or AstronomicalUnit is a unit of length."
  98. Map[(Evaluate[#]::"usage" =
  99.     StringJoin[ToString[#], " is a unit of length."])&,
  100.     {Angstrom,XUnit,Fermi,Micron,LightYear,Parsec,AstronomicalUnit,Didot,
  101.     DidotPoint,Cicero,Inch,Mil,Caliber,Hand,Span,Cubit,Ell,Pica,
  102.     Foot,Feet,Rope,Fathom,Cable,StatuteMile,NauticalMile,
  103.     Skein,Stadion,AstronomicalUnit,Yard,Bolt,Furlong,Stadium,
  104.     Pole,Perch,SurveyMile,Mile,League,Link,Rod,Chain}
  105.     ]
  106.  
  107. $NewMessage[ Point, "usage"]
  108. Point::usage = StringJoin[ Point::usage, "   It is also used as a unit of length."]
  109.  
  110. Map[(Evaluate[#]::"usage" =
  111.     StringJoin[ToString[#], " is a unit of area."])&,
  112.     {Barn,Hectare,Acre,Are,Rood,Section,Township}
  113.     ]
  114. Gallon::usage = "Gallon is a US volume unit."
  115. UKGallon::usage = "Imperial Gallon is a British volume unit."
  116. Map[(Evaluate[#]::"usage" =
  117.     StringJoin[ToString[#], " is a unit of volume."])&,
  118.     {Stere,Barrel,Cord,RegisterTon,BoardFoot,Liter,UKPint,WineBottle,
  119.     Firkin,Jeroboam,Bucket,Puncheon,Butt,Hogshead,Tun,Pint,Cup,
  120.     FluidOunce,Minim,Shot,Jigger,Pony,FluidDram,Tablespoon,Teaspoon,
  121.     Gill,Noggin,Quart,Fifth,Magnum,Bushel,Seam,Bag,Omer,Ephah}
  122.     ]
  123.  
  124. $NewMessage[ Last, "usage"]
  125. Last::usage = StringJoin[ Last::usage, "   It is also used as a unit of volume."]
  126.  
  127. $NewMessage[ Drop, "usage"]
  128. Drop::usage = StringJoin[ Drop::usage, "   It is also used as a unit of volume."]
  129.  
  130. Kayser::usage = "Kayser is a unit of inverse length."
  131. Diopter::usage = "Diopter is a unit of inverse length."
  132. Map[(Evaluate[#]::"usage" =
  133.     StringJoin[ToString[#], " is a unit of time."])&,
  134.     {Minute,Hour,Day,Week,Fortnight,Year,Month,Decade,Century,Millenium,
  135.     TropicalYear,SiderealYear,SiderealSecond}
  136.     ]
  137. Knot::usage = "Knot is a unit of speed."
  138. Gravity::usage = "Gravity is a measure of acceleration due to gravity."
  139. Gal::usage = "Gal is the derived CGS measure of acceleration due to gravity." 
  140. AMU::usage = "AMU or AtomicMassUnit is a unit of mass."
  141. Map[(Evaluate[#]::"usage" =
  142.     StringJoin[ToString[#], " is a unit of mass."])&,
  143.     {Quintal,SolarMass,AssayTon,Grain,Carat,Shekel,Obolos,Drachma,Libra,
  144.     TroyOunce,Pennyweight,Tonne,MetricTon,AtomicMassUnit,Dalton,
  145.     Pound,AvoirdupoisPound,Pondus,Stone,Wey,Bale,Ton,Cental,ShortTon,
  146.     NetHundredweight,ShortHundredweight,Hundredweight,GrossHundredweight,
  147.     Mina,Talent,Ounce,AvoirdupoisOunce,Slug,Geepound}
  148.     ]
  149. Dyne::usage = "Dyne is the derived CGS unit of force."
  150. Map[(Evaluate[#]::"usage" = 
  151.     StringJoin[ToString[#], " is a unit of force."])&,
  152.     {Poundal,TonForce,PoundForce,PoundWeight,KilogramForce,
  153.     KilogramWeight,GramWeight}
  154.     ]
  155. Map[(Evaluate[#]::"usage" =
  156.     StringJoin[ToString[#], " is a unit of pressure."])&,
  157.     {Atmosphere,InchMercury,Barye,Bar,Torr,MillimeterMercury}
  158.     ]
  159. Erg::usage = "Erg is the derived CGS unit of energy."
  160. BTU::usage = "BTU or BritishThermalUnit is a unit of energy."
  161. Map[(Evaluate[#]::"usage" =
  162.     StringJoin[ToString[#], " is a unit of energy."])&,
  163.     {ElectronVolt,Calorie,Rydberg,BritishThermalUnit,Therm}
  164.     ]
  165. HorsePower::usage = "HorsePower is a unit of power."
  166. ChevalVapeur::usage = "ChevalVapeur is a unit of power."
  167. Map[(Evaluate[#]::"usage" =
  168.     StringJoin[ToString[#], " is a unit of temperature."])&,
  169.     {Centigrade,Celsius,Fahrenheit,Rankine}
  170.     ]
  171. Poise::usage = "Poise is the derived CGS unit of absolute viscosity."
  172. Reyn::usage = "Reyn is a unit of absolute viscosity."
  173. Stokes::usage = "Stokes is the derived CGS unit of kinematic viscosity."
  174. Rhes::usage = "Rhes is a unit of viscosity."
  175. Talbot::usage = "Talbot is a unit of luminous energy (quantity of light)."
  176. Lumerg::usage = "Lumerg is a unit of luminous energy (quantity of light)."
  177. Phot::usage = "Phot is the derived CGS unit of illumination (illuminance)."
  178. FootCandle::usage = "FootCandle is a unit of illumination (illuminance)."
  179. Hefner::usage = "Hefner is a unit of luminous intensity."
  180. Candle::usage = "Candle is a unit of luminous intensity."
  181. Stilb::usage = 
  182.     "Stilb is the derived CGS unit of luminance (photometric brightness)."
  183. Nit::usage = "Nit is a unit of luminance (photometric brightness)."
  184. Lambert::usage = "Lambert is a unit of luminance (photometric brightness)."
  185. Apostilb::usage = "Apostilb is a unit of luminance (photometric brightness)."
  186. Rutherford::usage = "Rutherford is a unit of radioactivity."
  187. Curie::usage = "Curie is a unit of radioactivity."
  188. Rad::usage = "Rad is a unit of absorbed dose of radiation."
  189. Rontgen::usage = "Rontgen is a unit of exposure to X or gamma radiation."
  190. Roentgen::usage = "Roentgen is a unit of exposure to X or gamma radiation."
  191. Map[(Evaluate[#]::"usage" = StringJoin[ToString[#],
  192.     " is a unit of electric current."])&,
  193.     {Abampere,Statampere,Gilbert,Biot}
  194.     ]
  195. Map[(Evaluate[#]::"usage" = StringJoin[ToString[#],
  196.     " is a unit of electric resistance."])&,{Abohm,Statohm}
  197.     ]
  198. Map[(Evaluate[#]::"usage" = StringJoin[ToString[#],
  199.     " is a unit of electric conductance."])&,{Mho,Abmho}
  200.     ]
  201. Map[(Evaluate[#]::"usage" = StringJoin[ToString[#],
  202.     " is a unit of electric charge."])&,{Abcoulomb,Statcoulomb}
  203.     ]
  204. Map[(Evaluate[#]::"usage" = StringJoin[ToString[#],
  205.     " is a unit of electric capacitance."])&,{Abfarad,Statfarad}
  206.     ]
  207. Map[(Evaluate[#]::"usage" = StringJoin[ToString[#],
  208.     " is a unit of inductance."])&, {Abhenry,Stathenry}
  209.     ]
  210. Map[(Evaluate[#]::"usage" = StringJoin[ToString[#],
  211.     " is a unit of electric potential difference."])&,{Abvolt,Statvolt}
  212.     ]
  213. Gauss::usage = "Gauss is the derived CGS unit of magnetic flux density."
  214.  
  215. $NewMessage[ Gamma, "usage"]
  216. Gamma::usage = StringJoin[ Gamma::usage, "   It is also used as a unit of magnetic flux density."]
  217.  
  218. Oersted::usage = "Oersted is the derived CGS unit of magnetic intensity."
  219. Maxwell::usage = "Maxwell is the derived CGS unit of magnetic flux."
  220. BohrMagneton::usage = "BohrMagneton is a unit of magnetic moment."
  221. NuclearMagneton::usage = "NuclearMagneton is a unit of magnetic moment."
  222. Map[(Evaluate[#]::"usage" = StringJoin[ToString[#],
  223.     " is a unit of information."])&,{Nibble,Baud}
  224.     ]
  225. $NewMessage[ Byte, "usage"]
  226. Byte::usage = StringJoin[ Byte::usage, "   It is also used as a unit of information."]
  227.  
  228. (* ************************************************************** *)
  229.  
  230. Begin["`Private`"]
  231.  
  232.  
  233. (* unit conversion *)
  234.  
  235. Convert[old_, new_] :=
  236.     Module[{t},
  237.         t = SI [ old/new ]  ;
  238.         t = t //. $ToFundamental ;
  239.         t = N[t];
  240.         If[!NumberQ[t],
  241.             Message[Convert::incomp, old, new];
  242.             Return[old],
  243.             If[Apply[Or,
  244.                 Map[Position[new,#]!={}&,
  245.                     {Centigrade,Celsius,Kelvin,
  246.                         Fahrenheit,Rankine}]],
  247.                 Message[Convert::temp]
  248.             ];
  249.             Return[t new]
  250.         ]
  251.     ]
  252.  
  253. Convert::incomp = "Incompatible units in `1` and `2`."
  254. Convert::temp =
  255.     "Warning: Convert[old,new] converts units of temperature.  
  256.     ConvertTemperature[temp,old,new] converts absolute temperature." 
  257.  
  258. SI[expr_] := expr //. $SIPrefixes //. $ToSI
  259. MKS := SI
  260. CGS[expr_] := MKS[expr] //. $ToCGS
  261.  
  262.  
  263. (* temperature conversion *)
  264.  
  265. ConvertTemperature[x_, target_, target_] = x
  266.  
  267. ConvertTemperature[x_, Celsius, target_] := 
  268.     ConvertTemperature[273.15+x, Kelvin, target]
  269.  
  270. ConvertTemperature[x_, Centigrade, target_] :=  
  271.     ConvertTemperature[x, Celsius, target]
  272.  
  273. ConvertTemperature[x_, Fahrenheit, target_] := 
  274.     ConvertTemperature[(x-32) 5/9 + 273.15, Kelvin, target]
  275.  
  276. ConvertTemperature[x_, Rankine, target_] := 
  277.     ConvertTemperature[x 5/9, Kelvin, target]
  278.  
  279. ConvertTemperature[x_, Kelvin, Celsius] := x-273.15
  280.  
  281. ConvertTemperature[x_, Kelvin, Centigrade] := x-273.15
  282.  
  283. ConvertTemperature[x_, Kelvin, Fahrenheit] := (x-273.15) 9/5 + 32
  284.  
  285. ConvertTemperature[x_, Kelvin, Rankine] := x 9/5
  286.  
  287.  
  288. (* *************************************************************** *)
  289.  
  290. (** fundamental SI unit symbols **)
  291.  
  292. Map[(Evaluate[#[[1]]]::"symbol" = #[[2]])&,
  293.     {{Meter,"m"},{Kilogram,"kg"},{Second,"s"},{Ampere,"A"},{Kelvin,"K"},
  294.      {Mole,"mol"},{Candela,"cd"}}
  295.      ]
  296.  
  297. (** derived SI unit symbols **)
  298.  
  299. Map[(Evaluate[#[[1]]]::"symbol" = #[[2]])&,
  300.     {{Radian,"rad"},{Steradian,"sr"},{Newton,"N"},{Pascal,"Pa"},{Joule,"J"},
  301.     {Watt,"W"},{Coulomb,"C"},{Volt,"V"},{Ohm,"Omega"},{Siemens,"S"},
  302.     {Farad,"F"},{Weber,"Wb"},{Henry,"H"},{Tesla,"T"},{Henry,"H"},
  303.     {Lumen,"lm"},{Lux,"lx"},{Hertz,"Hz"},{Becquerel,"Bq"},{Gray,"Gy"}}
  304.     ]
  305.  
  306. (** non-SI fundamental units symbols **)
  307.  
  308. Bit::symbol = "bit"
  309.  
  310. (** fundamental CGS and derived CGS unit symbols **) 
  311.  
  312. Map[(Evaluate[#[[1]]]::"symbol" = #[[2]])&,
  313.     {{Centimeter,"cm"},{Gram,"g"},{Gal,"gal"},{Dyne,"dyn"},{Erg,"erg"},
  314.     {Poise,"P"},{Stokes,"St"},{Phot,"ph"},{Stilb,"sb"},{Gauss,"G"},
  315.     {Oersted,"Oe"},{Maxwell,"Mx"}}
  316.     ]
  317.  
  318. (** SI prefix symbols **)
  319.  
  320. Map[(Evaluate[#[[1]]]::"symbol" = #[[2]])&,
  321.     {{Exa,"E"},{Peta,"P"},{Tera,"T"},{Giga,"G"},{Mega,"M"},{Kilo,"k"},
  322.      {Hecto,"h"},{Deca,"da"},{Deci,"d"},{Centi,"c"},{Milli,"m"},
  323.      {Micro,"mu"},{Nano,"n"},{Pico,"p"},{Femto,"f"},{Atto,"a"}}
  324.      ]
  325.  
  326. (** supplementary SI unit symbols **)
  327.  
  328. Radian::symbol = "rad"
  329. Steradian::symbol = "sr"
  330.  
  331. (** some ToSI unit symbols **)
  332.  
  333. Map[(Evaluate[#[[1]]]::"symbol" = #[[2]])&,
  334.     {{Inch,"in"},{Foot,"ft"},{Yard,"yd"},{Mile,"mi"},{NauticalMile,"nm"},
  335.      {AstronomicalUnit,"AU"},{LightYear,"ly"},{Parsec,"pc"},
  336.      {Barn,"b"},{Hectare,"ha"},
  337.      {Stere,"st"},{Liter,"l"},{Gallon,"gal"},{UKGallon,"impgal"},
  338.      {Pint,"pt"},{UKPint,"ipt"},{Barrel,"bbl"},
  339.      {Minute,"min"},{Hour,"h"},{Day,"d"},{Year,"yr"},
  340.      {Gravity,"g"},{Curie,"Ci"},{Roentgen,"R"},{Rontgen,"R"},{Rad,"rad"},
  341.      {Gram,"g"},{Pound,"lb"},{Hundredweight,"cwt"},{Ounce,"oz"},
  342.      {Atmosphere,"atm"},{Tonne,"t"},{Bar,"bar"},{BTU,"Btu"},
  343.      {BritishThermalUnit,"Btu"},
  344.      {Poundal,"pdl"},{PoundForce,"lbf"},
  345.      {ElectronVolt,"eV"}}
  346.      ]
  347.  
  348. (* ************************************************************** *)
  349.  
  350. $SIPrefixes =
  351.     Dispatch[{
  352.     Exa -> 10^18,
  353.     Peta -> 10^15,
  354.     Tera -> 10^12,
  355.     Giga -> 10^9,
  356.     Mega -> 10^6,
  357.     Kilo -> 10^3,
  358.     Hecto -> 100,
  359.     Deca -> 10,
  360.     Deci -> 10^-1,
  361.     Centi -> 10^-2,
  362.     Milli -> 10^-3,
  363.     Micro -> 10^-6,
  364.     Nano -> 10^-9,
  365.     Pico -> 10^-12,
  366.     Femto -> 10^-15,
  367.     Atto -> 10^-18
  368.     }]        
  369.  
  370. $ToFundamental =    (* conversions to fundamental SI units *)
  371.     Dispatch[{
  372.         Radian -> 1,
  373.         Steradian -> Radian^2,
  374.         Newton -> Meter Kilogram Second^-2,
  375.         Pascal -> Newton/Meter^2,
  376.         Joule -> Newton Meter,
  377.         Watt -> Joule/Second,
  378.         Coulomb -> Ampere Second,
  379.         Volt -> Watt/Ampere,
  380.     Ohm -> Volt/Ampere,
  381.         Siemens -> Ampere/Volt,
  382.         Farad -> Coulomb/Volt,
  383.         Weber -> Volt Second,
  384.         Henry -> Ohm Second,
  385.         Tesla -> Weber/Meter^2,
  386.         Lumen -> Candela Steradian,  
  387.         Lux -> Lumen/Meter^2,
  388.         Hertz -> Second^-1,
  389.     Becquerel -> 1/Second,
  390.     Gray -> Joule/Kilogram
  391.     }]
  392.  
  393. $ToSI =        (* conversions to basic SI units *)
  394.     Dispatch[{
  395. (* multipliers *)
  396.         Percent -> 1/100,
  397.         Gross -> 144,
  398.         Dozen -> 12,
  399.         BakersDozen -> 13,
  400.         Degree -> Pi/180 Radian,
  401.         Circle -> 2 Pi Radian,
  402.     (* ArcMinute *)
  403.         ArcMinute -> Degree/60,
  404.         ArcSecond -> ArcMinute/60,
  405.     (* RightAngle *)
  406.         RightAngle -> Pi/2 Radian,
  407.         Quadrant -> RightAngle,
  408.         Grade -> RightAngle/100,
  409. (* length *)
  410.         Centimeter -> 0.01 Meter,
  411.         Angstrom -> 10^-10 Meter,
  412.         XUnit -> 0.1002*10^-12 Meter,
  413.         Fermi -> 10^-15 Meter,
  414.         Micron -> 10^-6 Meter,
  415.         NauticalMile -> 1.852*10^3 Meter,
  416.         LightYear -> 9.4605*10^15 Meter,
  417.         Parsec -> 30857*10^12 Meter,
  418.     (* AstronomicalUnit *)
  419.         AstronomicalUnit -> 0.149579*10^12 Meter, 
  420.         AU -> AstronomicalUnit,
  421.     (* Didot *)
  422.         Didot -> Meter/2660,
  423.         DidotPoint -> Didot,
  424.         Cicero -> 12 Didot,
  425.     (* Inch *)
  426.         Inch -> 2.54*10^-2 Meter,
  427.         Mil -> Inch/1000,
  428.         Caliber -> Inch/100,
  429.         Hand -> 4 Inch,
  430.         Link -> 7.92 Inch,
  431.         Span -> 9 Inch,
  432.         Cubit -> 18 Inch, 
  433.         Ell -> 45 Inch,
  434.     (* Point *)
  435.         Point -> 0.013837 Inch,
  436.         Pica -> 12 Point,
  437.     (* Foot *)
  438.         Foot -> 30.48*10^-2 Meter,
  439.         Feet -> Foot,
  440.         Fathom -> 6 Foot,
  441.         Rope -> 20 Foot,
  442.         Chain -> 66 Foot,
  443.         Cable -> 720 Foot,
  444.         Skein -> 360 Foot,
  445.         Stadion -> 622 Foot,
  446.     (* Yard *)
  447.         Yard -> 0.9144 Meter,
  448.         Bolt -> 40 Yard,
  449.         Furlong -> 220 Yard,
  450.         Stadium -> 202 Yard,
  451.     (* Rod *)
  452.         Rod -> 5.5 Yard,
  453.         Pole -> Rod,
  454.         Perch -> Rod,
  455.         SurveyMile -> 320 Rod,
  456.     (* Mile *)
  457.         Mile -> 1.609344*10^3 Meter,
  458.         StatuteMile -> Mile,
  459.         League -> 3 Mile,
  460. (* area *)
  461.         Barn -> 1*10^-28 Meter^2,
  462.     (* Hectare *)
  463.         Hectare -> 1*10^4 Meter^2,
  464.     (* Acre *)
  465.         Acre -> 0.404686 Hectare,
  466.         Are -> 0.025 Acre,
  467.         Rood -> Acre/4,
  468.     (* Section *)
  469.         Section -> Mile^2,
  470.         Township -> 36 Section,
  471. (* volume *)
  472.         Stere -> Meter^3,
  473.         Barrel -> 0.1590 Meter^3,
  474.         Drop -> 0.03*10^-6 Meter^3,
  475.         Cord -> 128 Foot^3,
  476.         RegisterTon -> 100 Foot^3,
  477.         BoardFoot -> 144 Inch^3,
  478.     (* Liter *)
  479.         Liter -> 10^-3 Meter^3,
  480.         UKPint -> 0.568261 Liter,
  481.         WineBottle -> 0.7576778 Liter,
  482.         Last -> 2909.414 Liter,
  483.     (* UKGallon *)
  484.         UKGallon -> 4.54609 Liter,
  485.         Firkin -> 9 UKGallon,
  486.     (* Gallon *)
  487.         Gallon -> 3.78541 Liter,
  488.         Jeroboam -> 0.8 Gallon,
  489.         Bucket -> 4 Gallon,
  490.         Puncheon -> 84 Gallon,
  491.     (* Butt *)
  492.         Butt -> 126 Gallon,
  493.     (* Hogshead *)
  494.         Hogshead -> Butt/2,
  495.         Tun -> 4 Hogshead,
  496.     (* Pint *)
  497.         Pint ->0.473176 Liter,
  498.         Cup -> Pint/2,
  499.     (* FluidOunce *)
  500.         FluidOunce -> 1/16 Pint,
  501.         Minim -> FluidOunce/480,
  502.         Shot -> FluidOunce,
  503.         Jigger -> 1.5 Shot,
  504.         Pony -> 0.5 Jigger,
  505.     (* FluidDram *)
  506.         FluidDram -> 1/8 FluidOunce,
  507.         Tablespoon -> 4 FluidDram,
  508.         Teaspoon -> Tablespoon/3,
  509.     (* Gill *)
  510.         Gill -> 1/4 Pint,
  511.         Noggin -> Gill,
  512.     (* Quart *)
  513.         Quart -> 1/4 Gallon,
  514.         Fifth -> 0.8 Quart,
  515.         Magnum -> 2 Quart,
  516.     (* Peck *)
  517.         Peck -> 8.810 Liter,
  518.     (* Bushel *)
  519.         Bushel -> 4 Peck,
  520.         Seam -> 8 Bushel,
  521.         Bag -> 3 Bushel,
  522.     (* Omer *)
  523.         Omer -> 0.45 Peck,
  524.         Ephah -> 10 Omer,
  525. (* inverse length *)
  526.         Kayser -> 100 Meter^-1,
  527.         Diopter -> Meter^-1,
  528. (* time *)
  529.         Minute -> 60 Second,
  530.         Hour -> 60 Minute,
  531.         Day -> 24 Hour,
  532.         Week -> 7 Day,
  533.         Fortnight -> 2 Week,
  534.         Year -> 365 Day,
  535.         Month -> Year/12,
  536.         Decade -> 10 Year,
  537.         Century -> 100 Year,
  538.         Millenium -> 1000 Year,
  539.         TropicalYear -> 365.24219 Day,
  540.         SiderealYear -> 365.25636 Day,
  541.         SiderealSecond -> 0.9972696 Second,
  542. (* speed *)
  543.         Knot -> NauticalMile/Hour,
  544. (* acceleration *)
  545.         Gravity -> 9.80665 Meter/Second^2,
  546.         Gal -> 10^-2 Meter/Second^2,
  547. (* mass *)
  548.     (* Gram *)
  549.         Gram -> Kilogram/1000,
  550.         Quintal -> 100000 Gram,
  551.         SolarMass -> 1.989*10^33 Gram,
  552.         AssayTon -> 29.167 Gram,
  553.         Grain -> 64.799*10^-3 Gram,
  554.         Carat -> 0.2 Gram,
  555.         Shekel -> 14.1 Gram,
  556.         Obolos -> 715.38*10^-3 Gram,
  557.         Drachma -> 4.2923 Gram,
  558.         Libra -> 325.971 Gram,
  559.         TroyOunce -> 31.103 Gram,
  560.         Pennyweight -> 1.555 Gram,
  561.     (* Tonne *)
  562.         Tonne -> 10^6 Gram,
  563.         MetricTon -> Tonne,
  564.     (* AMU *)
  565.         AMU -> 1.6605402*10^-24 Gram,
  566.         AtomicMassUnit -> AMU,
  567.         Dalton -> AMU,
  568.     (* Pound *)
  569.         Pound -> 0.45359237 Kilogram,
  570.         AvoirdupoisPound -> Pound,
  571.         Pondus -> 0.71864 Pound,
  572.         Stone -> 14 Pound,
  573.         Wey -> 252 Pound,
  574.         Bale -> 500 Pound,
  575.         Ton -> 2240 Pound,
  576.         Cental -> 100 Pound,
  577.         ShortTon -> 2000 Pound,
  578.         NetHundredweight -> 100 Pound,
  579.         ShortHundredweight -> 100 Pound,
  580.     (* Hundredweight *)
  581.         Hundredweight -> 112 Pound,
  582.         GrossHundredweight -> Hundredweight,
  583.     (* Mina *)
  584.         Mina -> 0.9463 Pound,
  585.         Talent -> 60 Mina,
  586.     (* Ounce *)
  587.         Ounce -> 28.350 Gram,
  588.         AvoirdupoisOunce -> Ounce,
  589.     (* Slug *)
  590.         Slug -> 14.5939 Kilogram,
  591.         Geepound -> Slug,
  592. (* force *)
  593.         Dyne -> 10^-5 Newton,
  594.         Poundal -> 0.138255 Newton,
  595.         TonForce -> 9.96402*10^3 Newton,
  596.     (* PoundForce *)
  597.         PoundForce -> 4.44822 Newton,
  598.         PoundWeight -> PoundForce,
  599.     (* KilogramForce *)
  600.         KilogramForce -> 9.80665 Newton,
  601.         KilogramWeight -> KilogramForce,
  602.         GramWeight -> KilogramWeight/1000,
  603. (* pressure *)
  604.     (* Pascal *)
  605.         Atmosphere -> 0.101325*10^6 Pascal,
  606.         InchMercury -> 3.38639*10^3 Pascal,
  607.         Barye -> Pascal/10,
  608.         Bar -> 10^5 Pascal,
  609.     (* Torr *)
  610.         Torr -> 0.13322*10^3 Pascal,
  611.         MillimeterMercury -> Torr,
  612. (* energy *)
  613.         ElectronVolt -> 0.160217733*10^-18 Joule,
  614.         Calorie -> 4.1868 Joule,
  615.     (* Erg *)
  616.         Erg -> 10^-7 Joule,
  617.         Rydberg -> 2.1799*10^-11 Erg,
  618.     (* BTU *)
  619.         BTU -> 1.05506*10^3 Joule,
  620.         BritishThermalUnit -> BTU,
  621.         Therm -> 10^5 BTU,
  622. (* power *)
  623.         HorsePower -> 0.745700*10^3 Watt,
  624.         ChevalVapeur -> 0.735499*10^3 Watt,
  625. (* temperature *)
  626.         Centigrade -> Kelvin,
  627.         Celsius -> Centigrade,
  628.         Fahrenheit -> 5/9 Kelvin,
  629.         Rankine -> Fahrenheit,
  630. (* viscosity *)
  631.         Stokes -> 10^-4 Meter^2/Second,
  632.     (* Poise *)
  633.         Poise -> 0.1 Pascal Second,
  634.         Reyn -> 6.89476*10^4 Poise,
  635.         Rhes -> Poise^-1,    
  636. (* light *)
  637.         Stilb -> 10^4 Candela/Meter^2,
  638.         Nit -> Candela/Meter^2,
  639.         Hefner -> 0.92 Candela,
  640.         Candle -> Candela,
  641.         Phot -> 10^4 Lux,
  642.         FootCandle -> Lux Meter^2/Foot^2,
  643.     (* Lambert *)
  644.         Lambert -> (10^4/Pi) Lumen/Meter^2,
  645.         Apostilb -> 10^-4 Lambert,
  646.     (* Talbot *)
  647.         Talbot -> Lumen Second,
  648.         Lumerg -> Talbot,   
  649. (* radioactivity *)
  650.         Rutherford -> 10^6/Second,
  651.         Rad -> 0.01 Gray,
  652.         Curie -> 37*10^9 Becquerel,
  653.         Rontgen -> 0.258*10^-3 Coulomb/Kilogram,
  654.         Roentgen -> Rontgen,
  655. (* electric *)
  656.     (* Ampere *)
  657.         Amp -> Ampere,
  658.         Abampere -> 10 Ampere,
  659.         Statampere -> 3.335635*10^-10 Ampere,
  660.         Gilbert -> 0.79577472 Ampere,
  661.         Biot -> 10 Ampere,
  662.     (* Ohm *)
  663.         Abohm -> 10^-9 Ohm,
  664.         Statohm -> 8.987584*10^11 Ohm,
  665.     (* Mho *)
  666.         Mho -> 1/Ohm,
  667.         Abmho -> 10^9 Mho,
  668.     (* Coulomb *)
  669.         Abcoulomb -> 10 Coulomb,
  670.         Statcoulomb -> 3.335635*10^-10 Coulomb,
  671.     (* Farad *)
  672.         Abfarad -> 10^9 Farad,
  673.         Statfarad -> 1.112646*10^-12 Farad,
  674.     (* Henry *)
  675.         Abhenry -> 10^-9 Henry,
  676.         Stathenry -> 8.987584*10^11 Henry,
  677.     (* Volt *)
  678.         Abvolt -> 10^-8 Volt,
  679.         Statvolt -> 299.7930 Volt,
  680. (* magnetic *)
  681.         Gauss -> 10^-4 Tesla,
  682.         Gamma -> 10^-9 Tesla,
  683.         Oersted -> 1/(4 Pi) 10^3 Ampere/Meter,
  684.         Maxwell -> 10^-8 Weber,
  685.         BohrMagneton -> 0.92740154*10^-20 Erg/Gauss,
  686.         NuclearMagneton -> 5.0507866*10^-24 Erg/Gauss,
  687. (* information *)
  688.         Byte -> 8 Bit,
  689.         Nibble -> 4 Bit,
  690.         Baud -> Bit/Second
  691.     }]            (* end of $ToSI list *)
  692.  
  693. $ToCGS =        (* conversions to basic CGS units *) 
  694.     Dispatch[{
  695.         Meter -> 100 Centimeter,
  696.         Kilogram -> 1000 Gram,
  697.         Newton -> 100000 Dyne,
  698.         Joule -> 10000000 Erg,
  699.         Pascal Second -> Poise,
  700.         Meter^2 / Second -> Stokes,
  701.         Meter / Second^2 -> Gal
  702.     }]    
  703.     
  704.  
  705. End[ ] (* Private` *)
  706.  
  707. EndPackage[]
  708.