atmospheric 0.4.3 → 0.4.4

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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.adoc +652 -183
  4. data/lib/atmospheric/export/altitude_attrs.rb +238 -0
  5. data/lib/atmospheric/export/altitude_convertable_model.rb +84 -0
  6. data/lib/atmospheric/export/altitude_table.rb +51 -0
  7. data/lib/atmospheric/export/hypsometrical_table.rb +38 -0
  8. data/lib/atmospheric/export/iso_25331975/group_one.rb +15 -27
  9. data/lib/atmospheric/export/iso_25331975/group_one_attrs.rb +88 -0
  10. data/lib/atmospheric/export/iso_25331975/group_three.rb +14 -27
  11. data/lib/atmospheric/export/iso_25331975/group_three_attrs.rb +87 -0
  12. data/lib/atmospheric/export/iso_25331975/group_two.rb +14 -28
  13. data/lib/atmospheric/export/iso_25331975/group_two_attrs.rb +96 -0
  14. data/lib/atmospheric/export/iso_25331975.rb +5 -17
  15. data/lib/atmospheric/export/iso_25331985/pressure_attrs.rb +19 -0
  16. data/lib/atmospheric/export/iso_25331985/table_five_six_attrs.rb +19 -0
  17. data/lib/atmospheric/export/iso_25331985.rb +42 -63
  18. data/lib/atmospheric/export/iso_25331997.rb +21 -39
  19. data/lib/atmospheric/export/iso_25332025/altitude_attrs_group.rb +27 -0
  20. data/lib/atmospheric/export/iso_25332025/combined_altitude_attrs_group.rb +44 -0
  21. data/lib/atmospheric/export/iso_25332025.rb +81 -0
  22. data/lib/atmospheric/export/pressure_attrs.rb +93 -0
  23. data/lib/atmospheric/export/{target.rb → utils.rb} +10 -13
  24. data/lib/atmospheric/export.rb +3 -1
  25. data/lib/atmospheric/isa.rb +119 -114
  26. data/lib/atmospheric/unit_value_float.rb +24 -0
  27. data/lib/atmospheric/unit_value_integer.rb +24 -0
  28. data/lib/atmospheric/version.rb +1 -1
  29. data/lib/atmospheric.rb +1 -0
  30. metadata +38 -28
  31. data/lib/atmospheric/export/hypsometrical_tables.rb +0 -34
  32. data/lib/atmospheric/export/iso_25331975/group_base.rb +0 -72
  33. data/lib/atmospheric/export/iso_25332024.rb +0 -205
  34. data/spec/fixtures/iso-2533-1975-table5.yaml +0 -18297
  35. data/spec/fixtures/iso-2533-1975-table6.yaml +0 -18298
  36. data/spec/fixtures/iso-2533-1975-table7.yaml +0 -16265
data/README.adoc CHANGED
@@ -3,65 +3,489 @@
3
3
  == Purpose
4
4
 
5
5
  This repository provides Ruby code for calculating values defined in the
6
- following documents:
6
+ following standards:
7
7
 
8
8
  * International Standard Atmosphere (ISA) from ISO 2533:1975,
9
9
  ISO 2533:1975/ADD 1:1985 and ISO 2533:1975/ADD 2:1997
10
- * ICAO Standard Atmosphere (ICAO Doc 7488/3, 1994)
10
+ * https://store.icao.int/en/manual-of-the-icao-standard-atmosphere-extended-to-80-kilometres-262500-feet-doc-7488[ICAO Standard Atmosphere (ICAO Doc 7488/3, 1994)]
11
11
 
12
- Which are technically identical documents but different in presentation and
12
+ Which are technically identical standards but different in presentation and
13
13
  units (the ICAO document includes `ft` in addition to `m`).
14
14
 
15
+ This library serves as a reference implementation for the values defined in
16
+ ISO CD 2533:2025.
17
+
18
+
15
19
  == Usage
16
20
 
17
- === Precision modes
21
+ === General
18
22
 
19
- There are two precision modes available for calculations: high precision and normal precision (default).
23
+ This library contains code for two separate, but related, purposes.
20
24
 
21
- High Precision Mode::
22
- Uses more accurate constants and number calculations through Ruby's BigDecimal
23
- to provide results with higher precision. Suitable for applications where the
24
- utmost accuracy is required.
25
+ * Calculating atmospheric properties at different altitudes. The algorithms
26
+ are based on ISO 2533.
25
27
 
26
- Normal Precision Mode (default)::
27
- Uses standard constants and number calculations to provide results with
28
- sufficient accuracy for most applications.
28
+ * Generating tables of atmospheric properties at different altitudes. This library
29
+ is used to data tables provided by the full ISO 2533 series:
29
30
 
30
- To specify the precision mode, set the `precision` attribute when creating an instance of `Atmospheric::Isa`:
31
+ ** ISO 2533:1975
32
+ ** ISO 2533:1975/ADD 1:1985
33
+ ** ISO 2533:1975/ADD 2:1997
34
+ ** ISO CD 2533:2025
31
35
 
32
- `:high`:: High precision mode
33
- `:normal` or not specified:: Normal precision mode
36
+ For the typical user who wishes to calculate atmospheric properties, there
37
+ is no need to worry about how the tables work.
38
+
39
+ To calculate atmospheric properties, either use the formulas directly or use the
40
+ `Atmospheric::Export::AltitudeAttrs` class to bulk obtain the values needed.
41
+
42
+
43
+ === Prerequsites
44
+
45
+ Include the `atmospheric` gem in your Gemfile:
46
+
47
+ [source,ruby]
48
+ ----
49
+ gem 'atmospheric'
50
+ ----
34
51
 
35
- Example usage:
52
+ Then use `require` in code:
36
53
 
37
54
  [source,ruby]
38
55
  ----
39
56
  require 'atmospheric'
57
+ ----
40
58
 
41
- # Normal precision mode (default)
42
- normal_precision_instance = Atmospheric::Isa.new
43
59
 
44
- # High precision mode
45
- high_precision_instance = Atmospheric::Isa.new(precision: :high)
60
+ === Atmospheric attributes by altitude
61
+
62
+ The `Atmospheric::Export::AltitudeAttrs` class provides a way to obtain the
63
+ atmospheric properties at a particular given altitude, geopotential or
64
+ geometric.
65
+
66
+ The resulting object can also be easily serialized, courtesy of the
67
+ https://github.com/lutaml/lutaml-model[`lutaml-model`] library.
68
+
69
+ Syntax:
70
+
71
+ [source,ruby]
72
+ ----
73
+ require 'atmospheric'
74
+
75
+ Atmospheric::Export::AltitudeAttrs.new.set_altitude(
76
+ value: {altitude-value} <1>
77
+ type: {altitude-type} <2>
78
+ unit: {altitude-unit} <3>
79
+ )
80
+ ----
81
+ <1> Value of the altitude desired. Integer.
82
+ <2> Type of altitude. Symbol. One of `:geometric`, `:geopotential`.
83
+ <3> Unit of the altitude. Symbol. One of `:meters`, `:feet`.
84
+
85
+ NOTE: The `set_altitude` method does not yet support high-precision mode.
86
+
87
+ Each attribute of the `AltitudeAttrs` object is wrapped in a defined
88
+ data class which is associated with a https://www.unitsml.org/[UnitsML] unit.
89
+
90
+ Depending on the type of the value, it is in one of the following classes:
91
+
92
+ * Integer. Class: `UnitValueInteger`
93
+ * Float. Class: `UnitValueFloat`
94
+
95
+ The `AltitudeAttrs` object provides the following attributes:
96
+
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.
120
+
121
+ [example]
122
+ ====
123
+ [source,ruby]
124
+ ----
125
+ require 'atmospheric'
126
+ attrs = Atmospheric::Export::AltitudeAttrs.new.set_altitude(
127
+ value: -2000,
128
+ type: :geopotential,
129
+ unit: :meters
130
+ )
131
+
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
46
136
  ----
137
+ ====
47
138
 
48
- === Formulas and calculations
139
+ The object can be serialized into YAML or XML.
140
+
141
+ .AltitudeAttrs in YAML
142
+ [example]
143
+ ====
144
+ [source,ruby]
145
+ ----
146
+ attrs = Atmospheric::Export::AltitudeAttrs.new.set_altitude(
147
+ value: -2000,
148
+ type: :geopotential,
149
+ unit: :meters
150
+ )
151
+
152
+ attrs.to_yaml
153
+ ----
154
+
155
+ [source,yaml]
156
+ ----
157
+ geometric-altitude-m:
158
+ value: -1999
159
+ unitsml: m
160
+ type: integer
161
+ geometric-altitude-ft:
162
+ value: -6560
163
+ unitsml: ft
164
+ type: integer
165
+ geopotential-altitude-m:
166
+ value: -2000
167
+ unitsml: m
168
+ type: integer
169
+ geopotential-altitude-ft:
170
+ value: -6562
171
+ unitsml: ft
172
+ type: integer
173
+ temperature-k:
174
+ value: 301150
175
+ unitsml: K
176
+ type: integer
177
+ temperature-c:
178
+ value: 28000
179
+ unitsml: degC
180
+ type: integer
181
+ pressure-mbar:
182
+ value: 1277.74
183
+ unitsml: mbar
184
+ type: float
185
+ pressure-mmhg:
186
+ value: 958.382
187
+ unitsml: u:mm_Hg
188
+ type: float
189
+ density:
190
+ value: 1.47808
191
+ unitsml: kg*m^-3
192
+ type: float
193
+ acceleration:
194
+ value: 9.8128
195
+ unitsml: m*s^-2
196
+ type: float
197
+ ppn:
198
+ value: 1.26103
199
+ type: float
200
+ rhorhon:
201
+ value: 1.20659
202
+ type: float
203
+ sqrt-rhorhon:
204
+ value: 1.09845
205
+ type: float
206
+ speed-of-sound:
207
+ value: 347886
208
+ unitsml: m*s^-1
209
+ type: integer
210
+ dynamic-viscosity:
211
+ value: 1.8514e-05
212
+ unitsml: Pa*s
213
+ type: float
214
+ kinematic-viscosity:
215
+ value: 1.2526e-05
216
+ unitsml: m^2*s^-1
217
+ type: float
218
+ thermal-conductivity:
219
+ value: 0.026359
220
+ unitsml: W*m^-1*K^-1
221
+ type: float
222
+ pressure-scale-height:
223
+ value: 8809.5
224
+ unitsml: m
225
+ type: float
226
+ specific-weight:
227
+ value: 14.504
228
+ unitsml: N*m^-3
229
+ type: float
230
+ air-number-density:
231
+ value: 3.0734e+25
232
+ unitsml: m^-3
233
+ type: float
234
+ mean-speed:
235
+ value: 469.18
236
+ unitsml: m*s^-1
237
+ type: float
238
+ frequency:
239
+ value: 8535100000.0
240
+ unitsml: s^-1
241
+ type: float
242
+ mean-free-path:
243
+ value: 5.4971e-08
244
+ unitsml: m
245
+ type: float
246
+ ----
247
+ ====
248
+
249
+ .AltitudeAttrs in XML
250
+ [example]
251
+ ====
252
+ [source,ruby]
253
+ ----
254
+ attrs = Atmospheric::Export::AltitudeAttrs.new.set_altitude(
255
+ value: -2000,
256
+ type: :geopotential,
257
+ unit: :meters
258
+ )
259
+
260
+ attrs.to_xml
261
+ ----
262
+
263
+ [source,xml]
264
+ ----
265
+ <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>
274
+ <density unitsml="kg*m^-3" type="float">1.47808</density>
275
+ <acceleration unitsml="m*s^-2" type="float">9.8128</acceleration>
276
+ <ppn type="float">1.26103</ppn>
277
+ <rhorhon type="float">1.20659</rhorhon>
278
+ <sqrt-rhorhon type="float">1.09845</sqrt-rhorhon>
279
+ <speed-of-sound unitsml="m*s^-1" type="integer">347886</speed-of-sound>
280
+ <dynamic-viscosity unitsml="Pa*s" type="float">1.8514e-05</dynamic-viscosity>
281
+ <kinematic-viscosity unitsml="m^2*s^-1" type="float">1.2526e-05</kinematic-viscosity>
282
+ <thermal-conductivity unitsml="W*m^-1*K^-1" type="float">0.026359</thermal-conductivity>
283
+ <pressure-scale-height unitsml="m" type="float">8809.5</pressure-scale-height>
284
+ <specific-weight unitsml="N*m^-3" type="float">14.504</specific-weight>
285
+ <air-number-density unitsml="m^-3" type="float">3.0734e+25</air-number-density>
286
+ <mean-speed unitsml="m*s^-1" type="float">469.18</mean-speed>
287
+ <frequency unitsml="s^-1" type="float">8535100000.0</frequency>
288
+ <mean-free-path unitsml="m" type="float">5.4971e-08</mean-free-path>
289
+ </atmosphere-attributes>
290
+ ----
291
+ ====
292
+
293
+
294
+ === Altitude by pressure
295
+
296
+ The `Atmospheric::Export::PressureAttrs` class provides a way to obtain the
297
+ altitude at a given pressure value (mbar, mmhg).
298
+
299
+ Syntax:
49
300
 
50
301
  [source,ruby]
51
302
  ----
52
303
  require 'atmospheric'
53
- instance = Atmospheric::Isa.{method_name}
54
- # {method_name} is one of the following
304
+
305
+ Atmospheric::Export::PressureAttrs.new.set_pressure(
306
+ value: {pressure-value} <1>
307
+ unit: {pressure-unit} <2>
308
+ )
309
+ ----
310
+ <1> Value of the pressure desired. Float.
311
+ <2> Unit of the pressure. Symbol. One of `:mbar`, `:mmhg`.
312
+
313
+ NOTE: The `set_pressure` method does not yet support high-precision mode.
314
+
315
+ Each attribute of the `PressureAttrs` object is wrapped in a defined
316
+ data class which is associated with a https://www.unitsml.org/[UnitsML] unit.
317
+
318
+ Depending on the type of the value, it is in one of the following classes:
319
+
320
+ * Integer. Class: `UnitValueInteger`
321
+ * Float. Class: `UnitValueFloat`
322
+
323
+ The `PressureAttrs` object provides the following attributes:
324
+
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.
331
+
332
+ [example]
333
+ ====
334
+ [source,ruby]
335
+ ----
336
+ attrs = Atmospheric::Export::PressureAttrs.new.set_pressure(
337
+ value: 5.0,
338
+ unit: :mbar
339
+ )
340
+
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
347
+ ----
348
+ ====
349
+
350
+ The object can be serialized into YAML or XML.
351
+
352
+ .PressureAttrs in YAML
353
+ [example]
354
+ ====
355
+ [source,ruby]
356
+ ----
357
+ attrs = Atmospheric::Export::PressureAttrs.new.set_pressure(
358
+ value: 5.0,
359
+ unit: :mbar
360
+ )
361
+
362
+ attrs.to_yaml
363
+ ----
364
+
365
+ [source,yaml]
366
+ ----
367
+ pressure-mbar:
368
+ value: 5.0
369
+ unitsml: mbar
370
+ type: float
371
+ pressure-mmhg:
372
+ value: 3.7503084135
373
+ unitsml: mmhg
374
+ type: float
375
+ geopotential-altitude-m:
376
+ value: 35776
377
+ unitsml: m
378
+ type: integer
379
+ geopotential-altitude-ft:
380
+ value: 117377
381
+ unitsml: ft
382
+ type: integer
383
+ geometric-altitude-m:
384
+ value: 35979
385
+ unitsml: m
386
+ type: integer
387
+ geometric-altitude-ft:
388
+ value: 118041
389
+ unitsml: ft
390
+ type: integer
391
+ ----
392
+ ====
393
+
394
+ .PressureAttrs in XML
395
+ [example]
396
+ ====
397
+ [source,ruby]
55
398
  ----
399
+ attrs = Atmospheric::Export::PressureAttrs.new.set_pressure(
400
+ value: 5.0,
401
+ unit: :mbar
402
+ )
403
+
404
+ attrs.to_xml
405
+ ----
406
+
407
+ [source,xml]
408
+ ----
409
+ <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>
416
+ </hypsometrical-attributes>
417
+ ----
418
+ ====
419
+
420
+ === Algorithms
421
+
422
+ ==== General
423
+
424
+ For users who wish to access the algorithms directly, the
425
+ `Atmospheric::Isa::Algorithms` class provides a set of methods for calculating
426
+ atmospheric properties at different altitudes.
427
+
428
+ ISO 2533 specifies a number of formulas for the calculation of atmospheric
429
+ properties at different altitudes.
430
+
431
+ These algorithms are implemented in the `Atmospheric::Isa::Algorithms` class.
432
+
433
+ There are two ways to use the `Atmospheric::Isa::Algorithms` class:
434
+
435
+ * as a singleton class, using one of the precision modes (see below)
436
+ * as a class instance
437
+
438
+ [example]
439
+ ====
440
+ [source,ruby]
441
+ ----
442
+ require 'atmospheric'
443
+ # Singleton class
444
+ instance = Atmospheric::Isa::NormalPrecision.instance.instance
445
+ instance.geometric_altitude_from_geopotential(100).to_f
446
+ => 100.00157315171192
447
+
448
+ # Class instance
449
+ instance = Atmospheric::Isa::Algorithms.new(precision: :high)
450
+ instance.geometric_altitude_from_geopotential(100).to_f
451
+ => 100.00157315171192
452
+ ----
453
+ ====
454
+
455
+
456
+ ==== Formulas and calculations
457
+
458
+ The `Algorithms` class supports the following methods for calculating
459
+ atmospheric properties.
460
+
461
+ Syntax:
462
+
463
+ [source,ruby]
464
+ ----
465
+ require 'atmospheric'
466
+ instance = Atmospheric::Isa::Algorithms.new.{method_name} <1>
467
+ ----
468
+ <1> `method_name` is one of the methods listed below.
56
469
 
57
470
  The available methods are:
58
471
 
472
+ Converting between geometric and geopotential altitudes:
473
+
59
474
  * `geometric_altitude_from_geopotential(geopotential_altitude)`
60
475
  * `geopotential_altitude_from_geometric(geometric_altitude)`
61
- * `temperature_at_layer_from_geopotential(geopotential_altitude)`
62
- * `temperature_at_layer_celcius(geopotential_altitude)`
63
- * `pressure_from_geopotential_mbar(geopotential_altitude)`
64
- * `pressure_from_geopotential_mmhg(geopotential_altitude)`
476
+
477
+ Obtaining the temperature value from an altitude:
478
+
479
+ * `temperature_at_layer_from_geopotential(geopotential_altitude)` (Kelvin)
480
+ * `temperature_at_layer_celcius(geopotential_altitude)` (Celcius)
481
+
482
+ Obtaining the pressure value from an altitude:
483
+
484
+ * `pressure_from_geopotential_mbar(geopotential_altitude)` (mbar/hPa)
485
+ * `pressure_from_geopotential_mmhg(geopotential_altitude)` (mmHg)
486
+
487
+ Obtaining other atmospheric properties from an altitude:
488
+
65
489
  * `density_from_geopotential(geopotential_altitude)`
66
490
  * `gravity_at_geopotential(geopotential_altitude)`
67
491
  * `p_p_n_from_geopotential(geopotential_altitude)`
@@ -78,6 +502,62 @@ The available methods are:
78
502
  * `air_particle_collision_frequency_from_geopotential(geopotential_altitude)`
79
503
  * `mean_free_path_of_air_particles_from_geopotential(geopotential_altitude)`
80
504
 
505
+ Obtaining thermal conductivity from temperature:
506
+
507
+ * `thermal_conductivity_from_temp(temp)`
508
+
509
+ Obtaining geopotential altitude from a given pressure:
510
+
511
+ * `geopotential_altitude_from_pressure_mbar(mbar)`
512
+ * `geopotential_altitude_from_pressure_mmhg(mmhg)`
513
+
514
+
515
+ ==== Precision modes
516
+
517
+ There are two precision modes available for calculations.
518
+
519
+ High precision mode::
520
+ Uses more accurate constants and number calculations through Ruby's BigDecimal
521
+ to provide results with higher precision. Suitable for applications where the
522
+ utmost accuracy is required.
523
+
524
+ Normal precision mode (default)::
525
+ Uses standard constants and number calculations to provide results with
526
+ sufficient accuracy for most applications.
527
+
528
+ To use the high precision mode, you can either:
529
+
530
+ * use the `Atmospheric::Isa::HighPrecision` class
531
+ * use the `Atmospheric::Isa::Algorithms` class then call the `set_precision(:high)` method
532
+
533
+ [example]
534
+ ====
535
+ [source,ruby]
536
+ ----
537
+ require 'atmospheric'
538
+
539
+ # High precision mode
540
+ high_precision_instance = Atmospheric::Isa::HighPrecision.instance
541
+
542
+ speed_h = Atmospheric::Isa::HighPrecision.instance.speed_of_sound_from_temp(100)
543
+ => 0.200467958523516054299360531511514627125051490111885121917578012786288944852326625441743718038552367514555018117e3
544
+
545
+ speed_h.class
546
+ => BigDecimal
547
+
548
+ # Normal precision mode (default)
549
+ normal_precision_instance = Atmospheric::Isa::NormalPrecision.instance.instance
550
+
551
+ speed_n = Atmospheric::Isa::NormalPrecision.instance.instance.speed_of_sound_from_temp(100)
552
+ => 200.46795852351607
553
+
554
+ speed_n.class
555
+ => Float
556
+ ----
557
+ ====
558
+
559
+
560
+
81
561
 
82
562
  == Generating ISO 2533 tables
83
563
 
@@ -96,8 +576,8 @@ Tables 5 to 7 all have height information of the following keys in the hash:
96
576
 
97
577
  * `geopotential-altitude-m`
98
578
  * `geopotential-altitude-ft`
99
- * `geometrical-altitude-m`
100
- * `geometrical-altitude-ft`
579
+ * `geometric-altitude-m`
580
+ * `geometric-altitude-ft`
101
581
 
102
582
  All YAML tables generated contain these two keys which group altitude values
103
583
  as the ISO 2533 tables are rendered in both types of altitudes:
@@ -109,12 +589,12 @@ as the ISO 2533 tables are rendered in both types of altitudes:
109
589
 
110
590
  Title:
111
591
  "_Temperature (T and t), Pressure (p), Density (p) and Acceleration of free fall
112
- (g) in terms of geometrical altitude (h) and geopotential altitude (H)_"
592
+ (g) in terms of geometric altitude (h) and geopotential altitude (H)_"
113
593
 
114
594
  Provides the following values in addition to geopotential and geometric height:
115
595
 
116
- * `temperature-K`
117
- * `temperature-C`
596
+ * `temperature-k`
597
+ * `temperature-c`
118
598
  * `pressure-mbar`
119
599
  * `pressure-mmhg`
120
600
  * `density`
@@ -122,8 +602,8 @@ Provides the following values in addition to geopotential and geometric height:
122
602
 
123
603
  [source,ruby]
124
604
  ----
125
- Atmospheric::Export::Iso25331975.table_5 #=> Hash
126
- Atmospheric::Export::Iso25331975.table_5_yaml #=> YAML
605
+ Atmospheric::Export::Iso25331975.table_5 #=> Lutaml::Model
606
+ Atmospheric::Export::Iso25331975.table_5.to_yaml #=> YAML
127
607
  ----
128
608
 
129
609
  ==== Table 6
@@ -131,7 +611,7 @@ Atmospheric::Export::Iso25331975.table_5_yaml #=> YAML
131
611
  Title:
132
612
  "_Relations of p'pn, p/pn and bar(p/pn), Speed of sound (a), Dynamic viscosity
133
613
  (p), Kinematic viscosity (v) and Thermal conductivity (lambda) in terms of
134
- geometrical altitude (h), and geopotential altitude (H)_"
614
+ geometric altitude (h), and geopotential altitude (H)_"
135
615
 
136
616
  Provides the following values in addition to geopotential and geometric height:
137
617
 
@@ -145,8 +625,8 @@ Provides the following values in addition to geopotential and geometric height:
145
625
 
146
626
  [source,ruby]
147
627
  ----
148
- Atmospheric::Export::Iso25331975.table_6 #=> Hash
149
- Atmospheric::Export::Iso25331975.table_6_yaml #=> YAML
628
+ Atmospheric::Export::Iso25331975.table_6 #=> Lutaml::Model
629
+ Atmospheric::Export::Iso25331975.table_6.to_yaml #=> YAML
150
630
  ----
151
631
 
152
632
  ==== Table 7
@@ -154,7 +634,7 @@ Atmospheric::Export::Iso25331975.table_6_yaml #=> YAML
154
634
  Title:
155
635
  "_Pressure scale height (H_p) Specific weight (gamma), Air number density (n),
156
636
  Mean air-particle speed (v), Air-particle collision frequency (omega) and Mean
157
- free path of air particles (l) in terms of geometrical altitude (h) and
637
+ free path of air particles (l) in terms of geometric altitude (h) and
158
638
  geopotential altitude (H)_"
159
639
 
160
640
  * `pressure-scale-height`
@@ -166,8 +646,8 @@ geopotential altitude (H)_"
166
646
 
167
647
  [source,ruby]
168
648
  ----
169
- Atmospheric::Export::Iso25331975.table_7 #=> Hash
170
- Atmospheric::Export::Iso25331975.table_7_yaml #=> YAML
649
+ Atmospheric::Export::Iso25331975.table_7 #=> Lutaml::Model
650
+ Atmospheric::Export::Iso25331975.table_7.to_yaml #=> YAML
171
651
  ----
172
652
 
173
653
 
@@ -190,8 +670,8 @@ Provides:
190
670
 
191
671
  [source,ruby]
192
672
  ----
193
- Atmospheric::Export::Iso25331985.table_1 #=> Hash
194
- Atmospheric::Export::Iso25331985.table_1_yaml #=> YAML
673
+ Atmospheric::Export::Iso25331985.table_1 #=> Lutaml::Model
674
+ Atmospheric::Export::Iso25331985.table_1.to_yaml #=> YAML
195
675
  ----
196
676
 
197
677
  ==== Table 2 (hPa)
@@ -204,8 +684,8 @@ Same as Table 1 but for the range of `(20.0..1199.9).step(0.1)` in hPa.
204
684
 
205
685
  [source,ruby]
206
686
  ----
207
- Atmospheric::Export::Iso25331985.table_2 #=> Hash
208
- Atmospheric::Export::Iso25331985.table_2_yaml #=> YAML
687
+ Atmospheric::Export::Iso25331985.table_2 #=> Lutaml::Model
688
+ Atmospheric::Export::Iso25331985.table_2.to_yaml #=> YAML
209
689
  ----
210
690
 
211
691
  ==== Table 3 (mmHg)
@@ -223,8 +703,8 @@ Provides:
223
703
 
224
704
  [source,ruby]
225
705
  ----
226
- Atmospheric::Export::Iso25331985.table_3 #=> Hash
227
- Atmospheric::Export::Iso25331985.table_3_yaml #=> YAML
706
+ Atmospheric::Export::Iso25331985.table_3 #=> Lutaml::Model
707
+ Atmospheric::Export::Iso25331985.table_3.to_yaml #=> YAML
228
708
  ----
229
709
 
230
710
  ==== Table 4 (mmHg)
@@ -237,8 +717,8 @@ Same as Table 3 but for the range of `(10.0..899.9).step(0.1)` and results in mm
237
717
 
238
718
  [source,ruby]
239
719
  ----
240
- Atmospheric::Export::Iso25331985.table_4 #=> Hash
241
- Atmospheric::Export::Iso25331985.table_4_yaml #=> YAML
720
+ Atmospheric::Export::Iso25331985.table_4 #=> Lutaml::Model
721
+ Atmospheric::Export::Iso25331985.table_4.to_yaml #=> YAML
242
722
  ----
243
723
 
244
724
  ==== Table 5 (hPa) and Table 6 (mmHg)
@@ -259,8 +739,8 @@ Range of `(-1000..4599).step(1)`.
259
739
 
260
740
  [source,ruby]
261
741
  ----
262
- Atmospheric::Export::Iso25331985.table_56 #=> Hash
263
- Atmospheric::Export::Iso25331985.table_56_yaml #=> YAML
742
+ Atmospheric::Export::Iso25331985.table_56 #=> Lutaml::Model
743
+ Atmospheric::Export::Iso25331985.table_56.to_yaml #=> YAML
264
744
  ----
265
745
 
266
746
  === ISO 2533 ADD 2:1997
@@ -287,7 +767,7 @@ Addendum 2 is exactly like ISO 2533:1975 with the tables but extended the tables
287
767
 
288
768
  Title:
289
769
  "_Temperature (T and t), pressure (p), density (p) and acceleration of free fall
290
- (g) in terms of geometrical altitude (h) and geopotential altitude (H) --
770
+ (g) in terms of geometric altitude (h) and geopotential altitude (H) --
291
771
  Altitudes in metres_"
292
772
 
293
773
  Exactly same as ISO 2533:1975 Table 5, but with a different height range.
@@ -297,8 +777,8 @@ still provides it for completeness.
297
777
 
298
778
  [source,ruby]
299
779
  ----
300
- Atmospheric::Export::Iso25331997.table_1 #=> Hash
301
- Atmospheric::Export::Iso25331997.table_1_yaml #=> YAML
780
+ Atmospheric::Export::Iso25331997.table_1 #=> Lutaml::Model
781
+ Atmospheric::Export::Iso25331997.table_1.to_yaml #=> YAML
302
782
  ----
303
783
 
304
784
  ==== Table 2 (-5km to 2km)
@@ -306,14 +786,14 @@ Atmospheric::Export::Iso25331997.table_1_yaml #=> YAML
306
786
  Title:
307
787
  "_Relations of p'pn, p/pn and bar(p/pn), Speed of sound (a), Dynamic viscosity
308
788
  (p), Kinematic viscosity (v) and Thermal conductivity (lambda) in terms of
309
- geometrical altitude (h), and geopotential altitude (H) -- Altitudes in metres_"
789
+ geometric altitude (h), and geopotential altitude (H) -- Altitudes in metres_"
310
790
 
311
791
  Exactly same as ISO 2533:1975 Table 6, but with a different height range.
312
792
 
313
793
  [source,ruby]
314
794
  ----
315
- Atmospheric::Export::Iso25331997.table_2 #=> Hash
316
- Atmospheric::Export::Iso25331997.table_2_yaml #=> YAML
795
+ Atmospheric::Export::Iso25331997.table_2 #=> Lutaml::Model
796
+ Atmospheric::Export::Iso25331997.table_2.to_yaml #=> YAML
317
797
  ----
318
798
 
319
799
  ==== Table 3 (-5km to 2km)
@@ -321,22 +801,22 @@ Atmospheric::Export::Iso25331997.table_2_yaml #=> YAML
321
801
  Title:
322
802
  "_Pressure scale height (H_p) Specific weight (gamma), Air number density (n),
323
803
  Mean air-particle speed (v), Air-particle collision frequency (omega) and Mean
324
- free path of air particles (l) in terms of geometrical altitude (h) and
804
+ free path of air particles (l) in terms of geometric altitude (h) and
325
805
  geopotential altitude (H) -- Altitudes in metres_"
326
806
 
327
807
  Exactly same as ISO 2533:1975 Table 7, but with a different height range.
328
808
 
329
809
  [source,ruby]
330
810
  ----
331
- Atmospheric::Export::Iso25331997.table_3 #=> Hash
332
- Atmospheric::Export::Iso25331997.table_3_yaml #=> YAML
811
+ Atmospheric::Export::Iso25331997.table_3 #=> Lutaml::Model
812
+ Atmospheric::Export::Iso25331997.table_3.to_yaml #=> YAML
333
813
  ----
334
814
 
335
815
  ==== Table 4 (-16.5kft to 262.5kft)
336
816
 
337
817
  Title:
338
818
  "_Temperature (T and t), pressure (p), density (p) and acceleration of free fall
339
- (g) in terms of geometrical altitude (h) and geopotential altitude (H) --
819
+ (g) in terms of geometric altitude (h) and geopotential altitude (H) --
340
820
  Altitudes in feet_"
341
821
 
342
822
  Exactly same as ISO 2533:1975 Table 5, but in feet and different range.
@@ -346,8 +826,8 @@ for completeness.
346
826
 
347
827
  [source,ruby]
348
828
  ----
349
- Atmospheric::Export::Iso25331997.table_4 #=> Hash
350
- Atmospheric::Export::Iso25331997.table_4_yaml #=> YAML
829
+ Atmospheric::Export::Iso25331997.table_4 #=> Lutaml::Model
830
+ Atmospheric::Export::Iso25331997.table_4.to_yaml #=> YAML
351
831
  ----
352
832
 
353
833
  ==== Table 5 (-16.5kft to 262.5kft)
@@ -355,14 +835,14 @@ Atmospheric::Export::Iso25331997.table_4_yaml #=> YAML
355
835
  Title:
356
836
  "_Relations of p'pn, p/pn and bar(p/pn), Speed of sound (a), Dynamic viscosity
357
837
  (p), Kinematic viscosity (v) and Thermal conductivity (lambda) in terms of
358
- geometrical altitude (h), and geopotential altitude (H) -- Altitudes in feet_"
838
+ geometric altitude (h), and geopotential altitude (H) -- Altitudes in feet_"
359
839
 
360
840
  Exactly same as ISO 2533:1975 Table 6, but in feet and different range.
361
841
 
362
842
  [source,ruby]
363
843
  ----
364
- Atmospheric::Export::Iso25331997.table_5 #=> Hash
365
- Atmospheric::Export::Iso25331997.table_5_yaml #=> YAML
844
+ Atmospheric::Export::Iso25331997.table_5 #=> Lutaml::Model
845
+ Atmospheric::Export::Iso25331997.table_5.to_yaml #=> YAML
366
846
  ----
367
847
 
368
848
  ==== Table 6 (-16.5kft to 262.5kft)
@@ -370,27 +850,33 @@ Atmospheric::Export::Iso25331997.table_5_yaml #=> YAML
370
850
  Title:
371
851
  "_Pressure scale height (H_p) Specific weight (gamma), Air number density (n),
372
852
  Mean air-particle speed (v), Air-particle collision frequency (omega) and Mean
373
- free path of air particles (l) in terms of geometrical altitude (h) and
853
+ free path of air particles (l) in terms of geometric altitude (h) and
374
854
  geopotential altitude (H) -- Altitudes in feet_"
375
855
 
376
856
  Exactly same as ISO 2533:1975 Table 7, but in feet and different range.
377
857
 
378
858
  [source,ruby]
379
859
  ----
380
- Atmospheric::Export::Iso25331997.table_6 #=> Hash
381
- Atmospheric::Export::Iso25331997.table_6_yaml #=> YAML
860
+ Atmospheric::Export::Iso25331997.table_6 #=> Lutaml::Model
861
+ Atmospheric::Export::Iso25331997.table_6.to_yaml #=> YAML
382
862
  ----
383
863
 
384
864
 
385
- === ISO NP 2533:2024
865
+ === ISO 2533:2025
386
866
 
387
867
  ==== General
388
868
 
389
- ISO 2533 is now proposed to be revised for a 2024/2025 version, 49 years
390
- since the last edition (1975) and 27 years since it was last updated (1997).
869
+ ISO 2533 is now being revised targeting a 2025 publication, which will be 50
870
+ years since the last edition (1975) and 28 years since it was last updated
871
+ (1997).
872
+
873
+ It is currently in the CD stage (Committee Draft) and is expected to be published in 2025.
391
874
 
392
- ISO NP 2533:2024 will likely include all content in the previously published
393
- Addenda, including:
875
+ * ISO NP 2533:2024. approved in 2024.
876
+ * ISO WD 2533:2024. launched: 2024-11-22, closed: 2025-02-17.
877
+ * ISO CD 2533:2024. pending.
878
+
879
+ ISO 2533:2025 covers all content in the previously published Addenda, including:
394
880
 
395
881
  * Standard atmosphere values from altitude -5km to 80km (geometric and geopotential)
396
882
  +
@@ -410,35 +896,76 @@ In the 2024 edition only hPa/mbar is provided.
410
896
  This document will also align to the values provided in
411
897
  https://store.icao.int/en/manual-of-the-icao-standard-atmosphere-extended-to-80-kilometres-262500-feet-doc-7488[ICAO Doc 7488/3].
412
898
 
899
+ All YAML tables generated contain these two keys which group altitude values
900
+ as the ISO 2533 tables are rendered in both types of altitudes:
901
+
902
+ * `by-geopotential-altitude`
903
+ * `by-geometric-altitude`
413
904
 
414
- All tables in the new edition are arranged in these steps.
905
+ The `Iso25332025` class provides the following methods to generate tables:
415
906
 
416
- .ISO 2533:2024 atmosphere values (m): step 50 from -5k, 100 from 32k, 200 from 51k to 80k
907
+ `table_atmosphere_meters`:: Atmosphere attributes by altitude (m). Grouped by
908
+ `by-geopotential-altitude` and `by-geometric-altitude`. Each entry underneath is
909
+ an `AltitudeAttrs` object. The altitude interval values follow these steps:
910
+ +
911
+ .Step 50 from -5k, 100 from 32k, 200 from 51k to 80k.
417
912
  ----
418
913
  (-5000..31950).step(50) +
419
914
  (32000..50900).step(100) +
420
915
  (51000..80000).step(200)
421
916
  ----
422
917
 
423
- .ISO 2533:2024 atmosphere values (ft): step 250 from -16500, 200 from -14000, 500 from 105000 to 262500
918
+ `table_atmosphere_feet`:: Atmosphere attributes by altitude (ft). Grouped by
919
+ `by-geopotential-altitude` and `by-geometric-altitude`. Each entry underneath is
920
+ an `AltitudeAttrs` object. The altitude interval values follow these steps:
921
+ +
922
+ .Step 250 from -16500, 200 from -14000, 500 from 105000 to 262500
424
923
  ----
425
924
  (-16500..-13750).step(250) +
426
925
  (-14000..104800).step(200) +
427
926
  (105000..262500).step(500)
428
927
  ----
429
928
 
430
- Tables 5 to 10 all have height information of the following keys in the hash:
929
+ `table_hypsometrical_altitude`:: Atmosphere attributes by altitude (m). This is
930
+ the same as `table_atmosphere_meters` except with a modified step.
931
+ +
932
+ .Step 1 from -1000 to 4599
933
+ ----
934
+ (-1000..4599).step(1)
935
+ ----
431
936
 
432
- * `geopotential-altitude-m`
433
- * `geopotential-altitude-ft`
434
- * `geometrical-altitude-m`
435
- * `geometrical-altitude-ft`
937
+ `table_hypsometrical_mbar`:: Hypsometrical table by pressure (mbar). This is a
938
+ table that provides altitude values per unit of pressure. Each entry underneath
939
+ is a `PressureAttrs` object. It follows this step schedule:
940
+ +
941
+ .Step 0.01 from 5 to 20, 0.1 from 20 to 1770.9
942
+ ----
943
+ (5.0..19.99).step(0.01) +
944
+ (20.0..1770.9).step(0.1)
945
+ ----
436
946
 
437
- All YAML tables generated contain these two keys which group altitude values
438
- as the ISO 2533 tables are rendered in both types of altitudes:
947
+ .Generating the ISO 2533:2025 tables
948
+ [example]
949
+ ====
950
+ [source,ruby]
951
+ ----
952
+ Atmospheric::Export::Iso25332025.table_atmosphere_meters #=> Lutaml::Model
953
+ Atmospheric::Export::Iso25332025.table_atmosphere_meters.to_yaml #=> YAML
954
+ ----
955
+ ====
956
+
957
+ The above table methods are used as the data sources for the data tables in ISO 2533:2025:
958
+
959
+ * `table_atmosphere_meters`: Table 5 (meters), Table 6 (meters), Table 7
960
+ (meters). This data table is split into 3 tables for readability reasons.
961
+
962
+ * `table_atmosphere_feet`: Table 8 (feet), Table 9 (feet), Table 10 (feet).
963
+ Similarly, this data table is split into 3 tables for readability reasons.
964
+
965
+ * `table_hypsometrical_altitude`: Table 11 (mbar).
966
+
967
+ * `table_hypsometrical_mbar`: Table 12 (geopotential), Table 13 (geometric).
439
968
 
440
- * `by-geopotential-altitude`
441
- * `by-geometric-altitude`
442
969
 
443
970
  ==== Table 5 (meters)
444
971
 
@@ -447,22 +974,9 @@ NOTE: This corresponds to ISO 2533:1975 Table 5 combined with ISO 2533:1975/ADD
447
974
 
448
975
  Title:
449
976
  "_Temperature (T and t), Pressure (p), Density (p) and Acceleration of free fall
450
- (g) in terms of geometrical altitude (h) and geopotential altitude (H)_"
451
-
452
- Provides the following values in addition to geopotential and geometric height:
453
-
454
- * `temperature-K`
455
- * `temperature-C`
456
- * `pressure-mbar`
457
- * `pressure-mmhg`
458
- * `density`
459
- * `acceleration`
977
+ (g) in terms of geometric altitude (h) and geopotential altitude (H)_"
460
978
 
461
- [source,ruby]
462
- ----
463
- Atmospheric::Export::Iso25332024.table_5 #=> Hash
464
- Atmospheric::Export::Iso25332024.table_5_yaml #=> YAML
465
- ----
979
+ This table is a subset of the `table_atmosphere_meters` method.
466
980
 
467
981
  ==== Table 6 (meters)
468
982
 
@@ -472,23 +986,9 @@ NOTE: This corresponds to ISO 2533:1975 Table 6 combined with ISO 2533:1975/ADD
472
986
  Title:
473
987
  "_Relations of p'pn, p/pn and bar(p/pn), Speed of sound (a), Dynamic viscosity
474
988
  (p), Kinematic viscosity (v) and Thermal conductivity (lambda) in terms of
475
- geometrical altitude (h), and geopotential altitude (H)_"
989
+ geometric altitude (h), and geopotential altitude (H)_"
476
990
 
477
- Provides the following values in addition to geopotential and geometric height:
478
-
479
- * `ppn`
480
- * `rhorhon`
481
- * `sqrt-rhorhon`
482
- * `speed-of-sound`
483
- * `dynamic-viscosity`
484
- * `kinematic-viscosity`
485
- * `thermal-conductivity`
486
-
487
- [source,ruby]
488
- ----
489
- Atmospheric::Export::Iso25332024.table_6 #=> Hash
490
- Atmospheric::Export::Iso25332024.table_6_yaml #=> YAML
491
- ----
991
+ This table is a subset of the `table_atmosphere_meters` method.
492
992
 
493
993
  ==== Table 7 (meters)
494
994
 
@@ -498,21 +998,10 @@ NOTE: This corresponds to ISO 2533:1975 Table 7 combined with ISO 2533:1975/ADD
498
998
  Title:
499
999
  "_Pressure scale height (H_p) Specific weight (gamma), Air number density (n),
500
1000
  Mean air-particle speed (v), Air-particle collision frequency (omega) and Mean
501
- free path of air particles (l) in terms of geometrical altitude (h) and
1001
+ free path of air particles (l) in terms of geometric altitude (h) and
502
1002
  geopotential altitude (H)_"
503
1003
 
504
- * `pressure-scale-height`
505
- * `specific-weight`
506
- * `air-number-density`
507
- * `mean-speed`
508
- * `frequency`
509
- * `mean-free-path`
510
-
511
- [source,ruby]
512
- ----
513
- Atmospheric::Export::Iso25332024.table_7 #=> Hash
514
- Atmospheric::Export::Iso25332024.table_7_yaml #=> YAML
515
- ----
1004
+ This table is a subset of the `table_atmosphere_meters` method.
516
1005
 
517
1006
  ==== Table 8 (-16.5kft to 262.5kft)
518
1007
 
@@ -520,7 +1009,7 @@ NOTE: This corresponds to ISO 2533:1975/ADD 2:1997 Table 4.
520
1009
 
521
1010
  Title:
522
1011
  "_Temperature (T and t), pressure (p), density (p) and acceleration of free fall
523
- (g) in terms of geometrical altitude (h) and geopotential altitude (H) --
1012
+ (g) in terms of geometric altitude (h) and geopotential altitude (H) --
524
1013
  Altitudes in feet_"
525
1014
 
526
1015
  Exactly same as ISO 2533:1975 Table 5, but in feet and different range.
@@ -528,11 +1017,7 @@ Exactly same as ISO 2533:1975 Table 5, but in feet and different range.
528
1017
  Pressure at mmHg is not produced, but the implementation still provides it
529
1018
  for completeness.
530
1019
 
531
- [source,ruby]
532
- ----
533
- Atmospheric::Export::Iso25332024.table_8 #=> Hash
534
- Atmospheric::Export::Iso25332024.table_8_yaml #=> YAML
535
- ----
1020
+ This table is a subset of the `table_atmosphere_feet` method.
536
1021
 
537
1022
  ==== Table 9 (-16.5kft to 262.5kft)
538
1023
 
@@ -541,15 +1026,11 @@ NOTE: This corresponds to ISO 2533:1975/ADD 2:1997 Table 5.
541
1026
  Title:
542
1027
  "_Relations of p'pn, p/pn and bar(p/pn), Speed of sound (a), Dynamic viscosity
543
1028
  (p), Kinematic viscosity (v) and Thermal conductivity (lambda) in terms of
544
- geometrical altitude (h), and geopotential altitude (H) -- Altitudes in feet_"
1029
+ geometric altitude (h), and geopotential altitude (H) -- Altitudes in feet_"
545
1030
 
546
1031
  Exactly same as ISO 2533:1975 Table 6, but in feet and different range.
547
1032
 
548
- [source,ruby]
549
- ----
550
- Atmospheric::Export::Iso25332024.table_9 #=> Hash
551
- Atmospheric::Export::Iso25332024.table_9_yaml #=> YAML
552
- ----
1033
+ This table is a subset of the `table_atmosphere_feet` method.
553
1034
 
554
1035
  ==== Table 10 (-16.5kft to 262.5kft)
555
1036
 
@@ -558,19 +1039,15 @@ NOTE: This corresponds to ISO 2533:1975/ADD 2:1997 Table 6.
558
1039
  Title:
559
1040
  "_Pressure scale height (H_p) Specific weight (gamma), Air number density (n),
560
1041
  Mean air-particle speed (v), Air-particle collision frequency (omega) and Mean
561
- free path of air particles (l) in terms of geometrical altitude (h) and
1042
+ free path of air particles (l) in terms of geometric altitude (h) and
562
1043
  geopotential altitude (H) -- Altitudes in feet_"
563
1044
 
564
1045
  Exactly same as ISO 2533:1975 Table 7, but in feet and different range.
565
1046
 
566
- [source,ruby]
567
- ----
568
- Atmospheric::Export::Iso25332024.table_10 #=> Hash
569
- Atmospheric::Export::Iso25332024.table_10_yaml #=> YAML
570
- ----
1047
+ This table is a subset of the `table_atmosphere_feet` method.
571
1048
 
572
1049
 
573
- ==== Table 11 (hPa)
1050
+ ==== Table 11 (mbar)
574
1051
 
575
1052
  NOTE: This corresponds to ISO 2533:1975/ADD 1:1985 Table 1 combined with Table 2.
576
1053
 
@@ -584,6 +1061,7 @@ For the range of `(5.0..19.99).step(0.01) + (20.0..1199.9).step(0.1)` in hPa.
584
1061
  Provides:
585
1062
 
586
1063
  * `pressure-mbar`
1064
+ * `pressure-mmhg`
587
1065
  * `geopotential-altitude-m`
588
1066
  * `geopotential-altitude-ft`
589
1067
  * `geometric-altitude-m`
@@ -591,67 +1069,62 @@ Provides:
591
1069
 
592
1070
  [source,ruby]
593
1071
  ----
594
- Atmospheric::Export::Iso25332024.table_11 #=> Hash
595
- Atmospheric::Export::Iso25332024.table_11_yaml #=> YAML
1072
+ Atmospheric::Export::Iso25332025.table_hypsometrical_mbar #=> Lutaml::Model
1073
+ Atmospheric::Export::Iso25332025.table_hypsometrical_mbar.to_yaml #=> YAML
596
1074
  ----
597
1075
 
598
1076
 
599
- ==== Table 12 (hPa)
1077
+ ==== Table 12 (geopotential altitude, m)
600
1078
 
601
- NOTE: This corresponds to ISO 2533:1975/ADD 1:1985 Table 5 but in geometric altitude.
1079
+ NOTE: This corresponds to ISO 2533:1975/ADD 1:1985 Table 5 but in geopotential altitude.
602
1080
 
603
1081
  Title:
604
- "_Barometric pressure, in hectopascals, as a function of geometric altitude
1082
+ "_Barometric pressure, in hectopascals, as a function of geopotential altitude
605
1083
  for -1000 <= H < +4600 m at intervals of 1m_"
606
1084
 
607
- Provides:
608
-
609
- * `geometric-altitude-m`
610
- * `pressure-mbar`
611
- * `pressure-mmhg`
612
-
613
- Range of `(-1000..4599).step(1)`.
1085
+ This table is a subset of the `table_atmosphere_meters` method.
614
1086
 
615
- [source,ruby]
616
- ----
617
- Atmospheric::Export::Iso25332024.table_12 #=> Hash
618
- Atmospheric::Export::Iso25332024.table_12_yaml #=> YAML
619
- ----
620
1087
 
621
- ==== Table 13 (hPa)
1088
+ ==== Table 13 (geometric altitude, m)
622
1089
 
623
- NOTE: This corresponds to ISO 2533:1975/ADD 1:1985 Table 5, in geopotential altitude.
1090
+ NOTE: This corresponds to ISO 2533:1975/ADD 1:1985 Table 5, in geometric altitude.
624
1091
 
625
1092
  Title:
626
- "_Barometric pressure, in hectopascals, as a function of geopotential altitude
1093
+ "_Barometric pressure, in hectopascals, as a function of geometric altitude
627
1094
  for -1000 <= H < +4600 m at intervals of 1m_"
628
1095
 
629
- Provides:
1096
+ This table is a subset of the `table_atmosphere_meters` method.
630
1097
 
631
- * `geopotential-altitude-m`
632
- * `pressure-mbar`
633
- * `pressure-mmhg`
634
1098
 
635
- Range of `(-1000..4599).step(1)`.
636
1099
 
637
- [source,ruby]
1100
+ == Testing
1101
+
1102
+ === General
1103
+
1104
+ [source,sh]
638
1105
  ----
639
- Atmospheric::Export::Iso25332024.table_13 #=> Hash
640
- Atmospheric::Export::Iso25332024.table_13_yaml #=> YAML
1106
+ $ bundle exec rake
641
1107
  ----
642
1108
 
1109
+ === Re-generate fixture tables
643
1110
 
1111
+ The `spec/fixtures/iso*` directories contains YAML files that are used to
1112
+ generate the ISO 2533 tables.
644
1113
 
645
- == Testing
1114
+ To re-generate the tables, run:
646
1115
 
647
1116
  [source,sh]
648
1117
  ----
649
- $ rspec
1118
+ $ bundle exec rake clean generate
650
1119
  ----
651
1120
 
1121
+ These tasks are defined in the `Rakefile`.
1122
+
1123
+ === Algorithms
1124
+
652
1125
  Tests are encoded in `spec/fixtures/tests.yml` in the following format:
653
1126
 
654
- [source,yml]
1127
+ [source,yaml]
655
1128
  ----
656
1129
  - H: -2000.0
657
1130
  h: -1999.0
@@ -687,7 +1160,3 @@ It is used to generate all the other values.
687
1160
 
688
1161
  Copyright Ribose.
689
1162
 
690
-
691
- == TODO
692
-
693
- * expose this as a plugin to LutaML / Metanorma YAML2text