#!/usr/local/lib/hl7/bin/unitmgr # # Database of Units # # @(#) units.tab (Gunther Schadow) 8/10/1995 # # Base Units # # m = [ 1, 0, 0, 0, 0, 0, 0], 1, 0 # s = [ 0, 1, 0, 0, 0, 0, 0], 1, 0 # g = [ 0, 0, 1, 0, 0, 0, 0], 1, 0 # c = [ 0, 0, 0, 1, 0, 0, 0], 1, 0 # k = [ 0, 0, 0, 0, 1, 0, 0], 1, 0 # cd = [ 0, 0, 0, 0, 0, 1, 0], 1, 0 # rad = [ 0, 0, 0, 0, 0, 0, 1], 1, 0 # 1 = [ 0, 0, 0, 0, 0, 0, 0], 1, 0 # 10* = [ 0, 0, 0, 0, 0, 0, 0], 1, 1 # # Format: # # proportional conversions: # = # # non-proportional conversions: # = ( ) # # where must be a name known at compile time. Working # with functions is a bit tricky and limits the applicability of the # unit in terms. General rule: avoid functions. If not avoidable use # as follows: # 1. define a pair of functions in cnv_func_tab.cc and recompile/relink # 2. edit table of units # 3. run through unitmgr to remake database # # Functions are applied as follows: If the table states: # # foo = foo_f(12.3 bar) # # a given foo (F) is converted to bar (B) as: # # B = foo_from(F) * 12.3 * bar # # and if a bar (B) is given, we get the foo (F) by: # # F = foo_to(B / 12.3 / bar) # # Pseudo Units, i.e. those whose dimension is 1 % = 1 10*-2 # percent # Angle sr = 1 rad+2 # steradian circ = 6.2831853071795864768 rad # circle sph = 3.1830988618379067154 10*-1.circ+2 # sphere deg = 2.7777777777777777778 10*-3.circ # degree (angular) mnt = 1.6666666666666666667 10*-2.deg # angular minute gon = 2.5 10*-3.circ # gon degree # Space l = 1 dm3 # liter # Time hr = 3.6 10*3.s # hour min = 6 10*1.s # minute d = 8.64 10*4.s # day ann = 3.1536 10*7.s # year hz = 1 /s # Herz # Mechanics n = 1 kg.m/s2 # Newton p = 9.80665 g.m/s2 # pond j = 1 n.m # Joule cal = 4.1868 j # calorie w = 1 j/s # Watt pal = 1 n/m2 # Pascal bar = 1 10*5.pal # bar m(h2o) = 9.806650 kpal # meter of water column m(hg) = 133.3220 kpal # meter of mercury column # Temperature cel = cel_f(1 k) # degree Celsius degf = degf_f(0.5555555555555555556 k) # degree Fahrenheit # Electromagnetism a = 1 c/s # Ampere v = 1 j/c # Volt ohm = 1 v/a # Ohm sie = 1 a/v # Siemens f = 1 c/v # Farad wb = 1 v.s # Weber (magnetic flux) t = 1 wb/m2 # Tesla (magnetic inductance) hy = 1 wb/a # Henry (inductance) # Photometric Units lm = 1 cd/sr # lumen (luminous flux) lx = 1 lm/m2 # lux # Nuclear/Atomic/Molecular/Chemical mol = 6.022137 10*23 # mole -- Avogadro's number val = 6.022137 10*23 # val -- equivalents eq = 6.022137 10*23 # equivalents ph = ph_f(1 mol/l) # pH e = 1.6021892 10*-19.c # elementary charge ev = 1.602177 10*-19.j # electronvolt u = 1.6605655 10*-24.g # atomic mass unit bq = 1 1/s # Bequerel (activity) gy = 1 j/s # Gray (energy dose) # Levels bel = f_ln(1 1) # bel db(spl) = f_20_lg(2 10*-5.pal) # decibel sound pressure db(v) = f_20_lg(1 v) # decibel volts db(mv) = f_20_lg(1 mv) # decibel millivolts db(uv) = f_20_lg(1 uv) # decibel mycrovolts db(w) = f_10_lg(1 w) # decibel watts db(kw) = f_10_lg(1 kw) # decibel kilowatts # Biological/Biochemical/Medical Units sv(a) = 0.04 gy # Sievert (alpha rays) sv(b) = 1 gy # Sievert (beta rays) sv(g) = 1 gy # Sievert (gamma rays) sv(x) = 1 gy # Sievert (X-rays) sv(n) = 0.2 gy # Sievert (neutrons) sv(p) = 0.1 gy # Sievert (protons) tot = 1 1 # particles total count cfu = 1 1 # colony forming units ppm = 1 10*-6 # parts per million ppb = 1 10*-9 # parts per billion iu = 1 1 # international units kat = 1 mol/s # katal