atmospheric 0.4.4 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7fee8e85ad0a5ae8332b352e8e95098e33f3f0235032e1fbe34273a9b14db058
4
- data.tar.gz: 7f5b0d515d007ca5c3cf7c4581312265e1c0c01ddd0e4bac1fa9b8f22a05322f
3
+ metadata.gz: 787d0cac0e08c123814f5e39202e4f053a8be18d24ac7026536736e9e4d7263e
4
+ data.tar.gz: d2e90cfda23d7511f68f815120e71caa93420910b3bc169c1690b5c71e563a68
5
5
  SHA512:
6
- metadata.gz: 2bdb5af2f4c861774e283903e3fef5242614eebd4ef30873e7c8df09cd2c6d4fb4486bf79bc2a4e1cc008acf77769c49cf03a0eaf00989fec013fee71dd91d28
7
- data.tar.gz: 4b647397cf70c2fd211670e2f5d4dd35c6e3be1624d4f3373da7c015581971a00d8ed82d291c139a5b2f691299297af92cc2d54f31a41a0bf21baf78c23e7c08
6
+ metadata.gz: 337b5e2744c7c761dd231043504a29ef6ddec59d935e6714684725ab030d04b69eacdb9a77f17c0adf7538706dab092639f84446eed0b868e9f5f8bc88edc653
7
+ data.tar.gz: e0e7b5734205e3c77bcb3257959a28083ce7d610a93e2eeca2e85c08f17ed4fd8b6e01158ccdabebce9ab375fe98895861a552f483f2309acf53c2483c70b5fa
data/README.adoc CHANGED
@@ -1,4 +1,4 @@
1
- = Atmospheric for Ruby (International Standard Atmosphere / ICAO Standard Atmosphere (ISA))
1
+ = Atmospheric for Ruby (ISO Standard Atmosphere / ICAO Standard Atmosphere (ISA))
2
2
 
3
3
  == Purpose
4
4
 
@@ -40,7 +40,7 @@ To calculate atmospheric properties, either use the formulas directly or use the
40
40
  `Atmospheric::Export::AltitudeAttrs` class to bulk obtain the values needed.
41
41
 
42
42
 
43
- === Prerequsites
43
+ === Prerequisites
44
44
 
45
45
  Include the `atmospheric` gem in your Gemfile:
46
46
 
@@ -75,18 +75,27 @@ require 'atmospheric'
75
75
  Atmospheric::Export::AltitudeAttrs.new.set_altitude(
76
76
  value: {altitude-value} <1>
77
77
  type: {altitude-type} <2>
78
- unit: {altitude-unit} <3>
78
+ unit: {altitude-unit} <3>,
79
+ precision: {precision-mode} <4>
79
80
  )
80
81
  ----
81
82
  <1> Value of the altitude desired. Integer.
82
83
  <2> Type of altitude. Symbol. One of `:geometric`, `:geopotential`.
83
84
  <3> Unit of the altitude. Symbol. One of `:meters`, `:feet`.
84
-
85
- NOTE: The `set_altitude` method does not yet support high-precision mode.
85
+ <4> Precision mode. Symbol. One of `:normal`, `:high`, `:reduced`. Default is `:normal`.
86
86
 
87
87
  Each attribute of the `AltitudeAttrs` object is wrapped in a defined
88
88
  data class which is associated with a https://www.unitsml.org/[UnitsML] unit.
89
89
 
90
+ Behavior of the precision mode:
91
+
92
+ `:reduced`:: (default) Uses Isa::NormalPrecision for calculations with signficant digits
93
+ rounding according to the original ISO 2533 specification.
94
+
95
+ `:normal`:: Uses Isa::NormalPrecision for calculations without value modification.
96
+
97
+ `:high`:: Uses Isa::HighPrecision for calculations without value modifications. This mode uses BigDecimal.
98
+
90
99
  Depending on the type of the value, it is in one of the following classes:
91
100
 
92
101
  * Integer. Class: `UnitValueInteger`
@@ -94,29 +103,29 @@ Depending on the type of the value, it is in one of the following classes:
94
103
 
95
104
  The `AltitudeAttrs` object provides the following attributes:
96
105
 
97
- `geometric_altitude_m`:: Geometric altitude in meters.
98
- `geometric_altitude_ft`:: Geometric altitude in feet.
99
- `geopotential_altitude_m`:: Geopotential altitude in meters.
100
- `geopotential_altitude_ft`:: Geopotential altitude in feet.
101
- `temperature_k`:: Temperature in Kelvin. This value is multiplied by 1000.
102
- `temperature_c`:: Temperature in Celsius. This value is multiplied by 1000.
103
- `pressure_mbar`:: Pressure in millibar.
104
- `pressure_mmhg`:: Pressure in mmHg.
105
- `density`:: Density in kg/m^3.
106
- `acceleration`:: Acceleration in m/s^2.
107
- `ppn`:: Ratio of pressure at altitude to pressure at sea level.
108
- `rhorhon`:: Ratio of density at altitude to density at sea level.
109
- `sqrt_rhorhon`:: Square root of the ratio of density at altitude to density at sea level.
110
- `speed_of_sound`:: Speed of sound in m/s.
111
- `dynamic_viscosity`:: Dynamic viscosity in kg/(m·s).
112
- `kinematic_viscosity`:: Kinematic viscosity in m^2/s.
113
- `thermal_conductivity`:: Thermal conductivity in W/(m·K).
114
- `pressure_scale_height`:: Pressure scale height in meters.
115
- `specific_weight`:: Specific weight in N/m^3.
116
- `air_number_density`:: Air number density in particles/m^3.
117
- `mean_speed`:: Mean speed of air particles in m/s.
118
- `frequency`:: Frequency of air particle collisions in 1/s.
119
- `mean_free_path`:: Mean free path of air particles in meters.
106
+ All attributes are represented as collections (arrays) to support multiple units:
107
+
108
+ `geometric_altitudes`:: Array of geometric altitude values. Units: m, ft.
109
+ `geopotential_altitudes`:: Array of geopotential altitude values. Units: m, ft.
110
+ `temperatures`:: Array of temperature values. Units: K, degC.
111
+ `pressures`:: Array of pressure values. Units: mbar, mm_Hg.
112
+ `densities`:: Array of density values. Units: kg*m^-3.
113
+ `accelerations`:: Array of acceleration values. Units: m*s^-2.
114
+ `ppns`:: Array of pressure ratio values (unitless).
115
+ `rhorhons`:: Array of density ratio values (unitless).
116
+ `sqrt_rhorhons`:: Array of sqrt of density ratio values (unitless).
117
+ `speeds_of_sound`:: Array of speed of sound values. Units: m*s^-1.
118
+ `dynamic_viscosities`:: Array of dynamic viscosity values. Units: Pa*s.
119
+ `kinematic_viscosities`:: Array of kinematic viscosity values. Units: m^2*s^-1.
120
+ `thermal_conductivities`:: Array of thermal conductivity values. Units: W*m^-1*K^-1.
121
+ `pressure_scale_heights`:: Array of pressure scale height values. Units: m.
122
+ `specific_weights`:: Array of specific weight values. Units: N*m^-3.
123
+ `air_number_densities`:: Array of air number density values. Units: m^-3.
124
+ `mean_speeds`:: Array of mean speed values. Units: m*s^-1.
125
+ `frequencies`:: Array of frequency values. Units: s^-1.
126
+ `mean_free_paths`:: Array of mean free path values. Units: m.
127
+
128
+ Each attribute value is wrapped in `UnitValueFloat` or `UnitValueInteger` with UnitsML unit metadata.
120
129
 
121
130
  [example]
122
131
  ====
@@ -129,10 +138,15 @@ attrs = Atmospheric::Export::AltitudeAttrs.new.set_altitude(
129
138
  unit: :meters
130
139
  )
131
140
 
132
- attrs.geopotential_altitude_m #=> -2000
133
- attrs.geopotential_altitude_ft #=> -6561.68
134
- attrs.geometric_altitude_m #=> -1999
135
- attrs.geometric_altitude_ft #=> -6560
141
+ # Access collection values
142
+ attrs.geometric_altitudes[0].value #=> -1999 (meters)
143
+ attrs.geometric_altitudes[1].value #=> -6560 (feet)
144
+ attrs.geopotential_altitudes[0].value #=> -2000 (meters)
145
+ attrs.geopotential_altitudes[1].value #=> -6562 (feet)
146
+ attrs.temperatures[0].value #=> 301.15 (Kelvin)
147
+ attrs.temperatures[1].value #=> 28.0 (Celsius)
148
+ attrs.pressures[0].value #=> 1277.74 (mbar)
149
+ attrs.pressures[1].value #=> 958.382 (mm_Hg)
136
150
  ----
137
151
  ====
138
152
 
@@ -154,95 +168,92 @@ attrs.to_yaml
154
168
 
155
169
  [source,yaml]
156
170
  ----
157
- geometric-altitude-m:
158
- value: -1999
171
+ geometric-altitude:
172
+ - value: -1999
159
173
  unitsml: m
160
174
  type: integer
161
- geometric-altitude-ft:
162
- value: -6560
175
+ - value: -6560
163
176
  unitsml: ft
164
177
  type: integer
165
- geopotential-altitude-m:
166
- value: -2000
178
+ geopotential-altitude:
179
+ - value: -2000
167
180
  unitsml: m
168
181
  type: integer
169
- geopotential-altitude-ft:
170
- value: -6562
182
+ - value: -6562
171
183
  unitsml: ft
172
184
  type: integer
173
- temperature-k:
174
- value: 301150
185
+ temperature:
186
+ - value: 301.15
175
187
  unitsml: K
176
- type: integer
177
- temperature-c:
178
- value: 28000
188
+ type: float
189
+ - value: 28.0
179
190
  unitsml: degC
180
- type: integer
181
- pressure-mbar:
182
- value: 1277.74
191
+ type: float
192
+ pressure:
193
+ - value: 1277.74
183
194
  unitsml: mbar
184
195
  type: float
185
- pressure-mmhg:
186
- value: 958.382
187
- unitsml: u:mm_Hg
196
+ - value: 958.382
197
+ unitsml: mm_Hg
188
198
  type: float
189
199
  density:
190
- value: 1.47808
200
+ - value: 1.47808
191
201
  unitsml: kg*m^-3
192
202
  type: float
193
203
  acceleration:
194
- value: 9.8128
204
+ - value: 9.8128
195
205
  unitsml: m*s^-2
196
206
  type: float
197
207
  ppn:
198
- value: 1.26103
208
+ - value: 1.26103
199
209
  type: float
200
210
  rhorhon:
201
- value: 1.20659
211
+ - value: 1.20659
202
212
  type: float
203
213
  sqrt-rhorhon:
204
- value: 1.09845
214
+ - value: 1.09845
205
215
  type: float
206
216
  speed-of-sound:
207
- value: 347886
217
+ - value: 347.886
208
218
  unitsml: m*s^-1
209
- type: integer
219
+ type: float
210
220
  dynamic-viscosity:
211
- value: 1.8514e-05
221
+ - value: 1.8514e-05
212
222
  unitsml: Pa*s
213
223
  type: float
214
224
  kinematic-viscosity:
215
- value: 1.2526e-05
225
+ - value: 1.2526e-05
216
226
  unitsml: m^2*s^-1
217
227
  type: float
218
228
  thermal-conductivity:
219
- value: 0.026359
229
+ - value: 0.026359
220
230
  unitsml: W*m^-1*K^-1
221
231
  type: float
222
232
  pressure-scale-height:
223
- value: 8809.5
233
+ - value: 8809.5
224
234
  unitsml: m
225
235
  type: float
226
236
  specific-weight:
227
- value: 14.504
237
+ - value: 14.504
228
238
  unitsml: N*m^-3
229
239
  type: float
230
240
  air-number-density:
231
- value: 3.0734e+25
241
+ - value: 3.0734e+25
232
242
  unitsml: m^-3
233
243
  type: float
234
244
  mean-speed:
235
- value: 469.18
245
+ - value: 469.18
236
246
  unitsml: m*s^-1
237
247
  type: float
238
248
  frequency:
239
- value: 8535100000.0
249
+ - value: 8535100000.0
240
250
  unitsml: s^-1
241
251
  type: float
242
252
  mean-free-path:
243
- value: 5.4971e-08
253
+ - value: 5.4971e-08
244
254
  unitsml: m
245
255
  type: float
256
+ precision: reduced
246
257
  ----
247
258
  ====
248
259
 
@@ -263,20 +274,20 @@ attrs.to_xml
263
274
  [source,xml]
264
275
  ----
265
276
  <atmosphere-attributes>
266
- <geometric-altitude-m unitsml="m" type="integer">-1999</geometric-altitude-m>
267
- <geometric-altitude-ft unitsml="ft" type="integer">-6560</geometric-altitude-ft>
268
- <geopotential-altitude-m unitsml="m" type="integer">-2000</geopotential-altitude-m>
269
- <geopotential-altitude-ft unitsml="ft" type="integer">-6562</geopotential-altitude-ft>
270
- <temperature-k unitsml="K" type="integer">301150</temperature-k>
271
- <temperature-c unitsml="degC" type="integer">28000</temperature-c>
272
- <pressure-mbar unitsml="mbar" type="float">1277.74</pressure-mbar>
273
- <pressure-mmhg unitsml="u:mm_Hg" type="float">958.382</pressure-mmhg>
277
+ <geometric-altitude unitsml="m" type="integer">-1999</geometric-altitude>
278
+ <geometric-altitude unitsml="ft" type="integer">-6560</geometric-altitude>
279
+ <geopotential-altitude unitsml="m" type="integer">-2000</geopotential-altitude>
280
+ <geopotential-altitude unitsml="ft" type="integer">-6562</geopotential-altitude>
281
+ <temperature unitsml="K" type="float">301.15</temperature>
282
+ <temperature unitsml="degC" type="float">28.0</temperature>
283
+ <pressure unitsml="mbar" type="float">1277.74</pressure>
284
+ <pressure unitsml="mm_Hg" type="float">958.382</pressure>
274
285
  <density unitsml="kg*m^-3" type="float">1.47808</density>
275
286
  <acceleration unitsml="m*s^-2" type="float">9.8128</acceleration>
276
287
  <ppn type="float">1.26103</ppn>
277
288
  <rhorhon type="float">1.20659</rhorhon>
278
289
  <sqrt-rhorhon type="float">1.09845</sqrt-rhorhon>
279
- <speed-of-sound unitsml="m*s^-1" type="integer">347886</speed-of-sound>
290
+ <speed-of-sound unitsml="m*s^-1" type="float">347.886</speed-of-sound>
280
291
  <dynamic-viscosity unitsml="Pa*s" type="float">1.8514e-05</dynamic-viscosity>
281
292
  <kinematic-viscosity unitsml="m^2*s^-1" type="float">1.2526e-05</kinematic-viscosity>
282
293
  <thermal-conductivity unitsml="W*m^-1*K^-1" type="float">0.026359</thermal-conductivity>
@@ -286,6 +297,7 @@ attrs.to_xml
286
297
  <mean-speed unitsml="m*s^-1" type="float">469.18</mean-speed>
287
298
  <frequency unitsml="s^-1" type="float">8535100000.0</frequency>
288
299
  <mean-free-path unitsml="m" type="float">5.4971e-08</mean-free-path>
300
+ <precision>reduced</precision>
289
301
  </atmosphere-attributes>
290
302
  ----
291
303
  ====
@@ -303,8 +315,9 @@ Syntax:
303
315
  require 'atmospheric'
304
316
 
305
317
  Atmospheric::Export::PressureAttrs.new.set_pressure(
306
- value: {pressure-value} <1>
307
- unit: {pressure-unit} <2>
318
+ value: {pressure-value}, <1>
319
+ unit: {pressure-unit}, <2>
320
+ precision: {precision-mode} <3>
308
321
  )
309
322
  ----
310
323
  <1> Value of the pressure desired. Float.
@@ -312,6 +325,15 @@ Atmospheric::Export::PressureAttrs.new.set_pressure(
312
325
 
313
326
  NOTE: The `set_pressure` method does not yet support high-precision mode.
314
327
 
328
+ Behavior of the precision mode:
329
+
330
+ `:reduced`:: (default) Uses Isa::NormalPrecision for calculations with signficant digits
331
+ rounding according to the original ISO 2533/ADD 2 specification.
332
+
333
+ `:normal`:: Uses Isa::NormalPrecision for calculations without value modification.
334
+
335
+ `:high`:: Uses Isa::HighPrecision for calculations without value modifications. This mode uses BigDecimal.
336
+
315
337
  Each attribute of the `PressureAttrs` object is wrapped in a defined
316
338
  data class which is associated with a https://www.unitsml.org/[UnitsML] unit.
317
339
 
@@ -322,12 +344,11 @@ Depending on the type of the value, it is in one of the following classes:
322
344
 
323
345
  The `PressureAttrs` object provides the following attributes:
324
346
 
325
- `pressure_mbar`:: Pressure in millibar.
326
- `pressure_mmhg`:: Pressure in mmHg.
327
- `geometric_altitude_m`:: Geometric altitude in meters.
328
- `geometric_altitude_ft`:: Geometric altitude in feet.
329
- `geopotential_altitude_m`:: Geopotential altitude in meters.
330
- `geopotential_altitude_ft`:: Geopotential altitude in feet.
347
+ All attributes are represented as collections (arrays) to support multiple units:
348
+
349
+ `pressures`:: Array of pressure values. Units: mbar, mm_Hg.
350
+ `geometric_altitudes`:: Array of geometric altitude values. Units: m, ft.
351
+ `geopotential_altitudes`:: Array of geopotential altitude values. Units: m, ft.
331
352
 
332
353
  [example]
333
354
  ====
@@ -338,12 +359,13 @@ attrs = Atmospheric::Export::PressureAttrs.new.set_pressure(
338
359
  unit: :mbar
339
360
  )
340
361
 
341
- attrs.pressure_mbar #=> 5.0
342
- attrs.pressure_mmhg #=> 3.7503084135
343
- attrs.geopotential_altitude_m #=> 35776
344
- attrs.geopotential_altitude_ft #=> 117377
345
- attrs.geometric_altitude_m #=> 35979
346
- attrs.geometric_altitude_ft #=> 118041
362
+ # Access collection values
363
+ attrs.pressures[0].value #=> 5.0 (mbar)
364
+ attrs.pressures[1].value #=> 3.7503084135 (mm_Hg)
365
+ attrs.geopotential_altitudes[0].value #=> 35776.5 (meters)
366
+ attrs.geopotential_altitudes[1].value #=> 117377.0 (feet)
367
+ attrs.geometric_altitudes[0].value #=> 35979.0 (meters)
368
+ attrs.geometric_altitudes[1].value #=> 118041.0 (feet)
347
369
  ----
348
370
  ====
349
371
 
@@ -364,30 +386,27 @@ attrs.to_yaml
364
386
 
365
387
  [source,yaml]
366
388
  ----
367
- pressure-mbar:
368
- value: 5.0
389
+ pressure:
390
+ - value: 5.0
369
391
  unitsml: mbar
370
392
  type: float
371
- pressure-mmhg:
372
- value: 3.7503084135
373
- unitsml: mmhg
393
+ - value: 3.7503084135
394
+ unitsml: mm_Hg
374
395
  type: float
375
- geopotential-altitude-m:
376
- value: 35776
396
+ geopotential-altitude:
397
+ - value: 35776.5
377
398
  unitsml: m
378
- type: integer
379
- geopotential-altitude-ft:
380
- value: 117377
399
+ type: float
400
+ - value: 117377.0
381
401
  unitsml: ft
382
- type: integer
383
- geometric-altitude-m:
384
- value: 35979
402
+ type: float
403
+ geometric-altitude:
404
+ - value: 35979.0
385
405
  unitsml: m
386
- type: integer
387
- geometric-altitude-ft:
388
- value: 118041
406
+ type: float
407
+ - value: 118041.0
389
408
  unitsml: ft
390
- type: integer
409
+ type: float
391
410
  ----
392
411
  ====
393
412
 
@@ -407,12 +426,12 @@ attrs.to_xml
407
426
  [source,xml]
408
427
  ----
409
428
  <hypsometrical-attributes>
410
- <pressure-mbar unitsml="mbar" type="float">5.0</pressure-mbar>
411
- <pressure-mmhg unitsml="mmhg" type="float">3.7503084135</pressure-mmhg>
412
- <geometric-altitude-m unitsml="m" type="integer">35979</geometric-altitude-m>
413
- <geometric-altitude-ft unitsml="ft" type="integer">118041</geometric-altitude-ft>
414
- <geopotential-altitude-m unitsml="m" type="integer">35776</geopotential-altitude-m>
415
- <geopotential-altitude-ft unitsml="ft" type="integer">117377</geopotential-altitude-ft>
429
+ <pressure unitsml="mbar" type="float">5.0</pressure>
430
+ <pressure unitsml="mm_Hg" type="float">3.7503084135</pressure>
431
+ <geometric-altitude unitsml="m" type="float">35979</geometric-altitude>
432
+ <geometric-altitude unitsml="ft" type="float">118041</geometric-altitude>
433
+ <geopotential-altitude unitsml="m" type="float">35776</geopotential-altitude>
434
+ <geopotential-altitude unitsml="ft" type="float">117377</geopotential-altitude>
416
435
  </hypsometrical-attributes>
417
436
  ----
418
437
  ====
@@ -572,12 +591,11 @@ All tables in the 1975 edition are arranged in these steps in meters:
572
591
  (51000..80000).step(200)
573
592
  ----
574
593
 
575
- Tables 5 to 7 all have height information of the following keys in the hash:
594
+ Tables 5 to 7 all have height information as collections (arrays) with
595
+ UnitsML unit metadata:
576
596
 
577
- * `geopotential-altitude-m`
578
- * `geopotential-altitude-ft`
579
- * `geometric-altitude-m`
580
- * `geometric-altitude-ft`
597
+ * `geometric-altitude` (collection: m, ft)
598
+ * `geopotential-altitude` (collection: m, ft)
581
599
 
582
600
  All YAML tables generated contain these two keys which group altitude values
583
601
  as the ISO 2533 tables are rendered in both types of altitudes:
@@ -593,10 +611,8 @@ Title:
593
611
 
594
612
  Provides the following values in addition to geopotential and geometric height:
595
613
 
596
- * `temperature-k`
597
- * `temperature-c`
598
- * `pressure-mbar`
599
- * `pressure-mmhg`
614
+ * `temperature` (collection: K, degC)
615
+ * `pressure` (collection: mbar, mm_Hg)
600
616
  * `density`
601
617
  * `acceleration`
602
618
 
@@ -665,7 +681,7 @@ For the range of `(5.0..19.99).step(0.01)` in hPa.
665
681
 
666
682
  Provides:
667
683
 
668
- * `pressure-mbar`
684
+ * `pressure` (collection: mbar, mm_Hg)
669
685
  * `geopotential-altitude`
670
686
 
671
687
  [source,ruby]
@@ -698,7 +714,7 @@ Same as Table 1 but for the range of `(4.0..9.99).step(0.01)` and results in mmh
698
714
 
699
715
  Provides:
700
716
 
701
- * `pressure-mmhg`
717
+ * `pressure` (collection: mbar, mm_Hg)
702
718
  * `geopotential-altitude`
703
719
 
704
720
  [source,ruby]
@@ -732,8 +748,7 @@ for -1000 <= H < +4600 m at intervals of 1m_"
732
748
  Provides:
733
749
 
734
750
  * `geopotential-altitude`
735
- * `pressure-mbar`
736
- * `pressure-mmhg`
751
+ * `pressure` (collection: mbar, mm_Hg)
737
752
 
738
753
  Range of `(-1000..4599).step(1)`.
739
754
 
@@ -949,8 +964,13 @@ is a `PressureAttrs` object. It follows this step schedule:
949
964
  ====
950
965
  [source,ruby]
951
966
  ----
967
+ # Defaults to precision mode `:reduced`
952
968
  Atmospheric::Export::Iso25332025.table_atmosphere_meters #=> Lutaml::Model
953
969
  Atmospheric::Export::Iso25332025.table_atmosphere_meters.to_yaml #=> YAML
970
+
971
+ # To use precision mode `:high`
972
+ x = Atmospheric::Export::Iso25332025.table_atmosphere_meters(precision: :high)
973
+ x.to_yaml #=> YAML
954
974
  ----
955
975
  ====
956
976
 
@@ -1060,17 +1080,19 @@ For the range of `(5.0..19.99).step(0.01) + (20.0..1199.9).step(0.1)` in hPa.
1060
1080
 
1061
1081
  Provides:
1062
1082
 
1063
- * `pressure-mbar`
1064
- * `pressure-mmhg`
1065
- * `geopotential-altitude-m`
1066
- * `geopotential-altitude-ft`
1067
- * `geometric-altitude-m`
1068
- * `geometric-altitude-ft`
1083
+ * `pressure` (collection: mbar, mm_Hg)
1084
+ * `geopotential-altitude` (collection: m, ft)
1085
+ * `geometric-altitude` (collection: m, ft)
1069
1086
 
1070
1087
  [source,ruby]
1071
1088
  ----
1089
+ # Defaults to precision mode `:reduced`
1072
1090
  Atmospheric::Export::Iso25332025.table_hypsometrical_mbar #=> Lutaml::Model
1073
1091
  Atmospheric::Export::Iso25332025.table_hypsometrical_mbar.to_yaml #=> YAML
1092
+
1093
+ # To use precision mode `:high`
1094
+ x = Atmospheric::Export::Iso25332025.table_hypsometrical_mbar(precision: :high)
1095
+ x.to_yaml #=> YAML
1074
1096
  ----
1075
1097
 
1076
1098
 
@@ -1095,6 +1117,75 @@ for -1000 <= H < +4600 m at intervals of 1m_"
1095
1117
 
1096
1118
  This table is a subset of the `table_atmosphere_meters` method.
1097
1119
 
1120
+ == XML Schema
1121
+
1122
+ An XSD schema for the XML serialization format is provided at
1123
+ `schema/atmospheric.xsd`.
1124
+
1125
+ The schema defines the following root elements:
1126
+
1127
+ `atmospheric`:: Polymorphic root element. Two variants:
1128
+ +
1129
+ --
1130
+ * **Hypsometrical table**: contains `<hypsometrical-attributes>` records
1131
+ (pressure → altitude lookup).
1132
+ * **ISO 2533:2025 table**: contains `<by-geometric-altitude>` and
1133
+ `<by-geopotential-altitude>` sections, each with
1134
+ `<atmospheric-attributes>` records.
1135
+ --
1136
+ +
1137
+ [example]
1138
+ ====
1139
+ [source,xml]
1140
+ ----
1141
+ <!-- Hypsometrical table variant -->
1142
+ <atmospheric>
1143
+ <hypsometrical-attributes>
1144
+ <pressure unitsml="mbar" type="float">1013.25</pressure>
1145
+ <pressure unitsml="mm_Hg" type="float">760.0</pressure>
1146
+ <geometric-altitude unitsml="m" type="float">0.0</geometric-altitude>
1147
+ <geometric-altitude unitsml="ft" type="float">0.0</geometric-altitude>
1148
+ <geopotential-altitude unitsml="m" type="float">0.0</geopotential-altitude>
1149
+ <geopotential-altitude unitsml="ft" type="float">0.0</geopotential-altitude>
1150
+ </hypsometrical-attributes>
1151
+ </atmospheric>
1152
+
1153
+ <!-- ISO 2533:2025 table variant -->
1154
+ <atmospheric>
1155
+ <by-geometric-altitude>
1156
+ <atmospheric-attributes>...</atmospheric-attributes>
1157
+ </by-geometric-altitude>
1158
+ <by-geopotential-altitude>
1159
+ <atmospheric-attributes>...</atmospheric-attributes>
1160
+ </by-geopotential-altitude>
1161
+ </atmospheric>
1162
+ ----
1163
+ ====
1164
+
1165
+ `atmosphere-attributes`:: Full atmospheric property record (ISO 2533:2025).
1166
+ Contains all altitude, temperature, pressure, density, and derived properties.
1167
+
1168
+ `hypsometrical-attributes`:: Pressure-to-altitude record. Contains pressure
1169
+ and altitude values.
1170
+
1171
+ `group-one-attrs`:: ISO 2533:1975 Group One record (temperature, pressure,
1172
+ density, acceleration). Temperature values use integer type (scaled by 1000).
1173
+
1174
+ `attributes-group`:: Wrapper for a collection of `<atmospheric-attributes>`.
1175
+
1176
+ All value elements share a common pattern:
1177
+
1178
+ * Text content: the numeric value
1179
+ * `unitsml` attribute (optional): the UnitsML unit identifier (e.g., `m`,
1180
+ `ft`, `K`, `mbar`)
1181
+ * `type` attribute (required): either `"float"` or `"integer"`
1182
+
1183
+ [source,xml]
1184
+ ----
1185
+ <temperature unitsml="K" type="float">288.15</temperature>
1186
+ <geometric-altitude unitsml="m" type="integer">5000</geometric-altitude>
1187
+ <ppn type="float">0.53338</ppn> <!-- dimensionless, no unitsml -->
1188
+ ----
1098
1189
 
1099
1190
 
1100
1191
  == Testing
@@ -1156,7 +1247,6 @@ The only defining value in a tests is `H` (geopotential altitude).
1156
1247
  It is used to generate all the other values.
1157
1248
 
1158
1249
 
1159
- == License
1160
-
1161
- Copyright Ribose.
1250
+ == Copyright and license
1162
1251
 
1252
+ Copyright Ribose. Licensed under the 3-clause BSD license.