Skip to content

Commit

Permalink
feat: add geometric altitude and feet values for 2024 table 11
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldtse committed Mar 30, 2024
1 parent b54fd00 commit b98bcbf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ Atmospheric::Export::Iso25332024.table_10_yaml #=> YAML
NOTE: This corresponds to ISO 2533:1975/ADD 1:1985 Table 1 combined with Table 2.

Title:
"_Geopotential altitude as a function of barometric pressure
"_Geometric and geopotential altitude as a function of barometric pressure
for 5 <= p < 20 hPa at intervals of 0.01 hPa and
20 <= p < 1200 hPa at intervals of 0.1 hPa__"

Expand All @@ -554,6 +554,9 @@ Provides:

* `pressure-mbar`
* `geopotential-altitude-m`
* `geopotential-altitude-ft`
* `geometric-altitude-m`
* `geometric-altitude-ft`

[source,ruby]
----
Expand Down
4 changes: 4 additions & 0 deletions lib/atmospheric/export/iso_25332024.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ def row(p, unit:)
method_name = "geopotential_altitude_from_pressure_#{unit}"
gp_h_m = Isa.send(method_name, p)
gp_h_ft = m_to_ft(gp_h_m)
gm_h_m = Isa.geometric_altitude_from_geopotential(p)
gm_h_ft = m_to_ft(gm_h_m)
{
"pressure-#{unit}" => p,
"geopotential-altitude-m" => gp_h_m.round(1),
"geopotential-altitude-ft" => gp_h_ft.round,
"geometric-altitude-m" => gm_h_m.round(1),
"geometric-altitude-ft" => gm_h_ft.round,
}
end
end
Expand Down

0 comments on commit b98bcbf

Please sign in to comment.