Repository navigation
Expand file tree
/
Copy pathdefinitions.units.patch
More file actions
234 lines (209 loc) · 10.3 KB
/
Copy pathdefinitions.units.patch
File metadata and controls
234 lines (209 loc) · 10.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
--- definitions.units 2026-10-05 21:18:09.037553483 +0200
+++ definitions.units.patched 2026-10-05 21:22:32.209287604 +0200
@@ -238,7 +238,7 @@
# equator to a pole.
h_SI 6.62607015e-34
-h 6.62607015e-34 J s # Planck constant (exact)
+h 6.62607015e-34 (m^2*kg/s^2) s # Planck constant (exact)
kg ! # The kilogram, symbol kg, is the SI unit of mass. It is
kilogram kg # defined by taking the fixed numerical value of the Planck
@@ -287,7 +287,7 @@
# https://en.wikipedia.org/wiki/Kibble_balance
k_SI 1.380649e-23
-boltzmann 1.380649e-23 J/K # Boltzmann constant (exact)
+boltzmann 1.380649e-23 (m^2*kg/s^2)/K # Boltzmann constant (exact)
k boltzmann
K ! # The kelvin, symbol K, is the SI unit of thermodynamic
@@ -330,7 +330,7 @@
# depend directly on temperature.
e_SI 1.602176634e-19
-e 1.602176634e-19 C # electron charge (exact)
+e 1.602176634e-19 A s # electron charge (exact)
A ! # The ampere, symbol A, is the SI unit of electric current.
ampere A # It is defined by taking the fixed numerical value of the
@@ -441,7 +441,9 @@
# A primitive non-SI unit
#
-bit ! # Basic unit of information (entropy). The entropy in bits
+B !
+byte B
+bit 1|8 B # Basic unit of information (entropy). The entropy in bits
# of a random variable over a finite alphabet is defined
# to be the sum of -p(i)*log2(p(i)) over the alphabet where
# p(i) is the probability that the random variable takes
@@ -537,6 +539,7 @@
c- centi
m- milli
u- micro # it should be a mu but u is easy to type
+mu- micro
n- nano
p- pico
f- femto
@@ -717,6 +720,14 @@
padm 1e15
shankh 1e17
+# postgresql-unit: Define some units before they are used elsewhere before their original definition
+pi 3.14159265358979323846
+π pi
+astronomicalunit 149597870700 m # IAU definition from 2012, exact
+au astronomicalunit # ephemeris for the above described
+m2 m^2
+
+
#############################################################################
# #
# Derived units which can be reduced to the primitive units #
@@ -1036,7 +1047,7 @@
pointangle 1|32 circle # Used for reporting compass readings
centrad 0.01 radian # Used for angular deviation of light
# through a prism.
-mas milli arcsec # Used by astronomers
+mas milliarcsec # Used by astronomers
seclongitude circle (seconds/day) # Astronomers measure longitude
# (which they call right ascension) in
# time units by dividing the equator into
@@ -1169,8 +1180,8 @@
tempF(x) units=[1;K] domain=[-459.67,) range=[0,) \
(x+(-32)) degF + stdtemp ; (tempF+(-stdtemp))/degF + 32
tempfahrenheit() tempF
-degfahrenheit 5|9 degC
-degF 5|9 degC
+degfahrenheit 5|9 * degC
+degF 5|9 * degC
degreesrankine degF # The Rankine scale has the
@@ -1182,7 +1193,7 @@
tempreaumur(x) units=[1;K] domain=[-218.52,) range=[0,) \
x degreaumur+stdtemp ; (tempreaumur+(-stdtemp))/degreaumur
-degreaumur 10|8 degC # The Reaumur scale was used in Europe and
+degreaumur 10|8 * degC # The Reaumur scale was used in Europe and
# particularly in France. It is defined
# to be 0 at the freezing point of water
# and 80 at the boiling point. Reaumur
@@ -1319,7 +1330,6 @@
# Basic constants
-pi 3.14159265358979323846 # More digits than double
tau 2 pi # precision can handle
phi (sqrt(5)+1)/2
light c
@@ -1489,6 +1499,15 @@
H2O50C 0.98807 force gram / cm^3
H2O100C 0.95838 force gram / cm^3
+# moved because ft is used before being defined (and otherwise parsed as femtotonne)
+inch 2.54 cm
+in inch
+inches inch
+foot 12 inch
+feet foot
+ft foot
+ft3 ft^3
+
# Atomic constants
hartree 4.3597447222060e-18 J # Approximate electric potential energy
@@ -1878,7 +1897,7 @@
abampere 10 A # Current which produces a force of
abamp abampere # 2 dyne/cm between two infinitely
-aA abampere # long wires that are 1 cm apart
+#aA abampere # long wires that are 1 cm apart
abA abampere
biot abampere
Bi biot
@@ -2880,8 +2899,8 @@
# gravitational constant. This is a
# fictional year, and doesn't
# correspond to any celestial event.
-astronomicalunit 149597870700 m # IAU definition from 2012, exact
-au astronomicalunit # ephemeris for the above described
+#astronomicalunit 149597870700 m # IAU definition from 2012, exact
+#au astronomicalunit # ephemeris for the above described
# astronomical unit. (See the NASA
# site listed above.)
GMsun 132712440041.279419 km^3 / s^2 # heliocentric gravitational constant
@@ -3214,11 +3233,6 @@
# NIST Handbook 44, 2024 ed., Appendix C.
# Canadian Journal of Physics, 1959, 37:(1) 84, 10.1139/p59-014.
-inch 2.54 cm # Exact, international inch (1959)
-in inch
-foot 12 inch
-feet foot
-ft foot
yard 3 ft
yd yard
mile 5280 ft # The mile was enlarged from 5000 ft
@@ -3385,6 +3399,7 @@
# Liquid measure
usgallon 231 in^3 # US liquid measure is derived from
+gallon usgallon
gal gallon # the British wine gallon of 1707.
quart 1|4 gallon # See the "winegallon" entry below
pint 1|2 quart # more historical information.
@@ -3917,7 +3932,7 @@
number1can 10 usfloz
number2can 19 usfloz
-number2.5can 3.5 uscups
+number2_5can 3.5 uscups
number3can 4 uscups
number5can 7 uscups
number10can 105 usfloz
@@ -4891,10 +4906,10 @@
btu btu_IT # International Table BTU is the default
britishthermalunit btu
-btu_IT cal_IT lb degF / gram K
-btu_th cal_th lb degF / gram K
-btu_mean cal_mean lb degF / gram K
-btu_15 cal_15 lb degF / gram K
+btu_IT cal_IT lb (degF) / gram K
+btu_th cal_th lb (degF) / gram K
+btu_mean cal_mean lb (degF) / gram K
+btu_15 cal_15 lb (degF) / gram K
btu_ISO 1055.06 J # Exact, rounded ISO definition based
# on the IT calorie
quad quadrillion btu
@@ -5066,7 +5081,7 @@
# Celsius heat unit: energy to raise a pound of water 1 degC
-celsiusheatunit cal lb degC / gram K
+celsiusheatunit cal lb (degC) / gram K
chu celsiusheatunit
# "Apparent" average power in an AC circuit, the product of rms voltage
@@ -5124,13 +5139,13 @@
Uvalue 1/Rvalue
europeanUvalue watt / m^2 K
RSI degC m^2 / W
-clo 0.155 degC m^2 / W # Supposed to be the insulance
+clo 0.155 * degC m^2 / W # Supposed to be the insulance
# required to keep a resting person
# comfortable indoors. The value
# given is from NIST and the CRC,
# but [5] gives a slightly different
# value of 0.875 ft^2 degF hr / btu.
-tog 0.1 degC m^2 / W # Also used for clothing.
+tog 0.1 * degC m^2 / W # Also used for clothing.
# Thermal diffusivity measures the rate of heat transfer inside a
# material. It is the thermal conductivity divided by the volumentric
@@ -5664,8 +5679,8 @@
# to symbols per second. Modern
# modems transmit several bits
# per symbol.
-byte 8 bit # Not all machines had 8 bit
-B byte # bytes, but these days most of
+#byte 8 bit # Not all machines had 8 bit
+#B byte # bytes, but these days most of
# them do. But beware: for
# transmission over modems, a
# few extra bits are used so
@@ -7648,7 +7663,7 @@
pa Pa
ev eV
-hg Hg
+#hg Hg
oe Oe
mh mH
rd rod
@@ -8702,7 +8717,7 @@
ton uston
scruple apscruple
fluidounce usfluidounce
-gallon usgallon
+#gallon usgallon
bushel usbushel
quarter quarterweight
cup uscup