Skip to content

Commit 92e69af

Browse files
committed
Define inches, m2, and ft3 to simplify the patch
1 parent 1897175 commit 92e69af

File tree

4 files changed

+58
-95
lines changed

4 files changed

+58
-95
lines changed

definitions.units.patch

+23-70
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--- definitions.units 2022-05-17 15:32:26.767162879 +0200
2-
+++ definitions.units.patched 2022-05-17 17:01:46.803764124 +0200
2+
+++ definitions.units.patched 2022-05-18 15:10:02.482372402 +0200
33
@@ -227,7 +227,7 @@
44
# equator to a pole.
55

@@ -63,7 +63,7 @@
6363
n- nano
6464
p- pico
6565
f- femto
66-
@@ -676,6 +683,13 @@
66+
@@ -676,6 +683,14 @@
6767
padm 1e15
6868
shankh 1e17
6969

@@ -72,12 +72,13 @@
7272
+π pi
7373
+astronomicalunit 149597870700 m # IAU definition from 2012, exact
7474
+au astronomicalunit # ephemeris for the above described
75+
+m2 m^2
7576
+
7677
+
7778
#############################################################################
7879
# #
7980
# Derived units which can be reduced to the primitive units #
80-
@@ -945,7 +959,7 @@
81+
@@ -945,7 +960,7 @@
8182
pointangle 1|32 circle # Used for reporting compass readings
8283
centrad 0.01 radian # Used for angular deviation of light
8384
# through a prism.
@@ -86,7 +87,7 @@
8687
seclongitude circle (seconds/day) # Astronomers measure longitude
8788
# (which they call right ascension) in
8889
# time units by dividing the equator into
89-
@@ -1066,8 +1080,8 @@
90+
@@ -1066,8 +1081,8 @@
9091
tempF(x) units=[1;K] domain=[-459.67,) range=[0,) \
9192
(x+(-32)) degF + stdtemp ; (tempF+(-stdtemp))/degF + 32
9293
tempfahrenheit() tempF
@@ -97,7 +98,7 @@
9798

9899

99100
degreesrankine degF # The Rankine scale has the
100-
@@ -1079,7 +1093,7 @@
101+
@@ -1079,7 +1094,7 @@
101102

102103
tempreaumur(x) units=[1;K] domain=[-218.52,) range=[0,) \
103104
x degreaumur+stdtemp ; (tempreaumur+(-stdtemp))/degreaumur
@@ -106,7 +107,7 @@
106107
# particularly in France. It is defined
107108
# to be 0 at the freezing point of water
108109
# and 80 at the boiling point. Reaumur
109-
@@ -1167,7 +1181,7 @@
110+
@@ -1167,7 +1182,7 @@
110111

111112
# Basic constants
112113

@@ -115,21 +116,23 @@
115116
light c
116117
mu0_SI 2 alpha h_SI / e_SI^2 c_SI # Vacuum magnetic permeability
117118
mu0 2 alpha h / e^2 c # Gets overridden in CGS modes
118-
@@ -1310,6 +1324,13 @@
119+
@@ -1310,6 +1325,15 @@
119120
H2O50C 0.98807 force gram / cm^3
120121
H2O100C 0.95838 force gram / cm^3
121122

122123
+# moved because ft is used before being defined (and otherwise parsed as femtotonne)
123124
+inch 2.54 cm
124125
+in inch
126+
+inches inch
125127
+foot 12 inch
126128
+feet foot
127129
+ft foot
130+
+ft3 ft^3
128131
+
129132
# Atomic constants
130133

131134

132-
@@ -1664,7 +1685,7 @@
135+
@@ -1664,7 +1688,7 @@
133136

134137
abampere 10 A # Current which produces a force of
135138
abamp abampere # 2 dyne/cm between two infinitely
@@ -138,29 +141,7 @@
138141
abA abampere
139142
biot abampere
140143
Bi biot
141-
@@ -2092,8 +2113,8 @@
142-
143-
# Reflected-light meter calibration constant with ISO 100 speed
144-
145-
-k1250 12.5 (cd/m2) / lx s # For Canon, Nikon, and Sekonic
146-
-k1400 14 (cd/m2) / lx s # For Kenko (Minolta) and Pentax
147-
+k1250 12.5 (cd/m^2) / lx s # For Canon, Nikon, and Sekonic
148-
+k1400 14 (cd/m^2) / lx s # For Kenko (Minolta) and Pentax
149-
150-
# Incident-light meter calibration constant with ISO 100 film
151-
152-
@@ -2147,8 +2168,8 @@
153-
# ASA PH2.12-1961, and ANSI PH2.7-1986
154-
#N_apex 0.3162 lx s # value in ANSI PH2.7-1973
155-
N_exif 1|3.125 lx s # value in Exif 2.3 (2010), making Sv(5) = 100
156-
-K_apex1961 11.4 (cd/m2) / lx s # value in ASA PH2.12-1961
157-
-K_apex1971 12.5 (cd/m2) / lx s # value in ANSI PH3.49-1971; more common
158-
+K_apex1961 11.4 (cd/m^2) / lx s # value in ASA PH2.12-1961
159-
+K_apex1971 12.5 (cd/m^2) / lx s # value in ANSI PH3.49-1971; more common
160-
C_apex1961 224 lx / lx s # value in PH2.12-1961 (20.83 for I in
161-
# footcandles; flat sensor?)
162-
C_apex1971 322 lx / lx s # mean value in PH3.49-1971 (30 +/- 5 for I in
163-
@@ -2482,8 +2503,8 @@
144+
@@ -2482,8 +2506,8 @@
164145
# gravitational constant. This is a
165146
# fictional year, and doesn't
166147
# correspond to any celestial event.
@@ -171,7 +152,7 @@
171152
# astronomical unit. (See the NASA
172153
# site listed above.)
173154
GMsun 1.32712440018e20 m^3 / s^2 # heliocentric gravitational constant
174-
@@ -2851,11 +2872,6 @@
155+
@@ -2851,11 +2875,6 @@
175156
int 3937|1200 ft/m # Convert US Survey measures to
176157
int- int # international measures
177158

@@ -183,15 +164,15 @@
183164
yard 3 ft
184165
yd yard
185166
mile 5280 ft # The mile was enlarged from 5000 ft
186-
@@ -3003,6 +3019,7 @@
167+
@@ -3003,6 +3022,7 @@
187168
# Liquid measure
188169

189170
usgallon 231 in^3 # US liquid measure is derived from
190171
+gallon usgallon
191172
gal gallon # the British wine gallon of 1707.
192173
quart 1|4 gallon # See the "winegallon" entry below
193174
pint 1|2 quart # more historical information.
194-
@@ -3504,7 +3521,7 @@
175+
@@ -3504,7 +3524,7 @@
195176

196177
number1can 10 usfloz
197178
number2can 19 usfloz
@@ -200,7 +181,7 @@
200181
number3can 4 uscups
201182
number5can 7 uscups
202183
number10can 105 usfloz
203-
@@ -4469,10 +4486,10 @@
184+
@@ -4469,10 +4489,10 @@
204185

205186
btu btu_IT # International Table BTU is the default
206187
britishthermalunit btu
@@ -215,18 +196,7 @@
215196
btu_ISO 1055.06 J # Exact, rounded ISO definition based
216197
# on the IT calorie
217198
quad quadrillion btu
218-
@@ -4599,8 +4616,8 @@
219-
# of coal used in the 1950's
220-
barreloil 5.8 Mbtu # Conventional value for barrel of crude
221-
# oil [E2]. Actual range is 5.6 - 6.3.
222-
-naturalgas_HHV 1027 btu/ft3 # Energy content of natural gas. HHV
223-
-naturalgas_LHV 930 btu/ft3 # is for Higher Heating Value and
224-
+naturalgas_HHV 1027 btu/ft^3 # Energy content of natural gas. HHV
225-
+naturalgas_LHV 930 btu/ft^3 # is for Higher Heating Value and
226-
naturalgas naturalgas_HHV # includes energy from condensation
227-
# combustion products. LHV is for Lower
228-
# Heating Value and excludes these.
229-
@@ -4635,7 +4652,7 @@
199+
@@ -4635,7 +4655,7 @@
230200

231201
# Celsius heat unit: energy to raise a pound of water 1 degC
232202

@@ -235,7 +205,7 @@
235205
chu celsiusheatunit
236206

237207
POWER watt
238-
@@ -4695,13 +4712,13 @@
208+
@@ -4695,13 +4715,13 @@
239209
Uvalue 1/Rvalue
240210
europeanUvalue watt / m^2 K
241211
RSI degC m^2 / W
@@ -251,16 +221,7 @@
251221

252222

253223
# Thermal Conductivity of a few materials
254-
@@ -5094,7 +5111,7 @@
255-
europeanpoint didotpoint # for the point used in Europe
256-
cicero 12 didotpoint
257-
258-
-stick 2 inches
259-
+stick 2 in
260-
261-
# Type sizes
262-
263-
@@ -5167,8 +5184,8 @@
224+
@@ -5167,8 +5187,8 @@
264225
# to symbols per second. Modern
265226
# modems transmit several bits
266227
# per symbol.
@@ -271,16 +232,7 @@
271232
# them do. But beware: for
272233
# transmission over modems, a
273234
# few extra bits are used so
274-
@@ -5527,7 +5544,7 @@
275-
boardfeet boardfoot
276-
fbm boardfoot # feet board measure
277-
stack 4 yard^3 # British, used for firewood and coal [18]
278-
-rick 4 ft 8 ft 16 inches # Stack of firewood, supposedly
279-
+rick 4 ft 8 ft 16 in # Stack of firewood, supposedly
280-
# sometimes called a face cord, but this
281-
# value is equal to 1|3 cord. Name
282-
# comes from an old Norse word for a
283-
@@ -6607,7 +6624,7 @@
235+
@@ -6607,7 +6627,7 @@
284236

285237
pa Pa
286238
ev eV
@@ -289,7 +241,7 @@
289241
oe Oe
290242
mh mH
291243
rd rod
292-
@@ -6989,7 +7006,8 @@
244+
@@ -6989,7 +7009,8 @@
293245
Mag Maz gravity # force
294246
Maz Volm kg / oldliter # mass based on water
295247

@@ -299,11 +251,12 @@
299251
Gf Grafut
300252
Sf Surf
301253
Vm Volm
302-
@@ -7779,7 +7797,6 @@
254+
@@ -7779,7 +7800,7 @@
303255
ton uston
304256
scruple apscruple
305257
fluidounce usfluidounce
306258
-gallon usgallon
259+
+#gallon usgallon
307260
bushel usbushel
308261
quarter quarterweight
309262
cup uscup

definitions.units.patched

+12-8
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ pi 3.14159265358979323846
688688
π pi
689689
astronomicalunit 149597870700 m # IAU definition from 2012, exact
690690
au astronomicalunit # ephemeris for the above described
691+
m2 m^2
691692

692693

693694
#############################################################################
@@ -1327,9 +1328,11 @@ H2O100C 0.95838 force gram / cm^3
13271328
# moved because ft is used before being defined (and otherwise parsed as femtotonne)
13281329
inch 2.54 cm
13291330
in inch
1331+
inches inch
13301332
foot 12 inch
13311333
feet foot
13321334
ft foot
1335+
ft3 ft^3
13331336

13341337
# Atomic constants
13351338

@@ -2113,8 +2116,8 @@ iso100 s100
21132116

21142117
# Reflected-light meter calibration constant with ISO 100 speed
21152118

2116-
k1250 12.5 (cd/m^2) / lx s # For Canon, Nikon, and Sekonic
2117-
k1400 14 (cd/m^2) / lx s # For Kenko (Minolta) and Pentax
2119+
k1250 12.5 (cd/m2) / lx s # For Canon, Nikon, and Sekonic
2120+
k1400 14 (cd/m2) / lx s # For Kenko (Minolta) and Pentax
21182121

21192122
# Incident-light meter calibration constant with ISO 100 film
21202123

@@ -2168,8 +2171,8 @@ iv100(x) units=[1;lx] range=(0,) 2^x c250 / s100; log2(iv100 s100 / c250)
21682171
# ASA PH2.12-1961, and ANSI PH2.7-1986
21692172
#N_apex 0.3162 lx s # value in ANSI PH2.7-1973
21702173
N_exif 1|3.125 lx s # value in Exif 2.3 (2010), making Sv(5) = 100
2171-
K_apex1961 11.4 (cd/m^2) / lx s # value in ASA PH2.12-1961
2172-
K_apex1971 12.5 (cd/m^2) / lx s # value in ANSI PH3.49-1971; more common
2174+
K_apex1961 11.4 (cd/m2) / lx s # value in ASA PH2.12-1961
2175+
K_apex1971 12.5 (cd/m2) / lx s # value in ANSI PH3.49-1971; more common
21732176
C_apex1961 224 lx / lx s # value in PH2.12-1961 (20.83 for I in
21742177
# footcandles; flat sensor?)
21752178
C_apex1971 322 lx / lx s # mean value in PH3.49-1971 (30 +/- 5 for I in
@@ -4616,8 +4619,8 @@ toncoal 7e9 cal_IT # Energy in metric ton coal from [18].
46164619
# of coal used in the 1950's
46174620
barreloil 5.8 Mbtu # Conventional value for barrel of crude
46184621
# oil [E2]. Actual range is 5.6 - 6.3.
4619-
naturalgas_HHV 1027 btu/ft^3 # Energy content of natural gas. HHV
4620-
naturalgas_LHV 930 btu/ft^3 # is for Higher Heating Value and
4622+
naturalgas_HHV 1027 btu/ft3 # Energy content of natural gas. HHV
4623+
naturalgas_LHV 930 btu/ft3 # is for Higher Heating Value and
46214624
naturalgas naturalgas_HHV # includes energy from condensation
46224625
# combustion products. LHV is for Lower
46234626
# Heating Value and excludes these.
@@ -5111,7 +5114,7 @@ didotpoint germandidotpoint # This seems to be the dominant value
51115114
europeanpoint didotpoint # for the point used in Europe
51125115
cicero 12 didotpoint
51135116

5114-
stick 2 in
5117+
stick 2 inches
51155118

51165119
# Type sizes
51175120

@@ -5544,7 +5547,7 @@ boardfoot ft^2 inch # Usually 1 inch thick wood
55445547
boardfeet boardfoot
55455548
fbm boardfoot # feet board measure
55465549
stack 4 yard^3 # British, used for firewood and coal [18]
5547-
rick 4 ft 8 ft 16 in # Stack of firewood, supposedly
5550+
rick 4 ft 8 ft 16 inches # Stack of firewood, supposedly
55485551
# sometimes called a face cord, but this
55495552
# value is equal to 1|3 cord. Name
55505553
# comes from an old Norse word for a
@@ -7797,6 +7800,7 @@ hundredweight ushundredweight
77977800
ton uston
77987801
scruple apscruple
77997802
fluidounce usfluidounce
7803+
#gallon usgallon
78007804
bushel usbushel
78017805
quarter quarterweight
78027806
cup uscup

0 commit comments

Comments
 (0)