Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing gas giant atmospheres #5728

Merged
merged 4 commits into from
Jan 31, 2024

Conversation

sturnclaw
Copy link
Member

This PR resolves an oversight/issue introduced with the System Editor series of PRs which resulted in randomly-generated gas giants not correctly computing an atmospheric density and the Sol system gas giants not having explicitly-set atmospheric densities.

This additionally fixes #5677 and partially addresses #4222 by defining the surface level for gas giants (which corresponds to the physical collision sphere below which a ship cannot pass) as being the "upper cloud deck" level. The density at cloud deck level is estimated using the expression 2𝑒 * density at 1 bar, based on real-world data published by NASA regarding the solar system gas giants. I've correspondingly introduced a new generation expression for gas giant surface density using bounds fitted to real-world gas giant density, rather than the previous fixed 14kg/m³.

This definition for the surface density and height is necessary due to a) the lack of scientific data establishing cloud deck pressure or density, and b) the inability of ships in Pioneer to pass below the "surface" of a gas giant at this time without significant changes to the physics engine and autopilot code.

This PR additionally renames the Lua attribute SystemBody.volatileGas to SystemBody.atmosDensity (matching the name presented to the user in the SystemEditor) and adds a SystemBody.surfacePressure attribute which can be used to compute the mean atmospheric pressure at the defined surface of the body.

@sturnclaw
Copy link
Member Author

sturnclaw commented Jan 30, 2024

Note: a consequence of this PR is that it's unlikely for any ship to require Heavy Atmospheric Shielding (as naturally-generated gas giants will likely not exceed 10atm of surface pressure), and ships are likely to impact the "surface" of a gas giant (which will trigger an impact warning well beforehand) before suffering pressure damage with any atmospheric shielding equipped. It's possible now to scoop from a large portion of Jupiter's atmosphere in a Coronatrix without requiring any shielding, for example.

This should be addressed in a more holistic manner by adding a proper exponential density increase the further below "sea level" the player travels through the gas giant as well as adding proper atmospheric cloud rendering to gas giants instead of depending on a textured surface when in close proximity to the gas giant.

For now, it can simply be handwaved as e.g. the gas giant's cloud layer causes catastrophic malfunction in the ship's navigation system, or some similar reason for not being able to fly through the cloud layer of the atmosphere.

@impaktor
Copy link
Member

Note: a consequence of this PR is that it's unlikely for any ship to require Heavy Atmospheric Shielding (as naturally-generated gas giants will likely not exceed 10atm of surface pressure),

Might be worth considering temporarily commenting out the line for that equip, for this release

- Atmospheric density data is extrapolated from real-world gas giants
- For now, the player is more likely to hit the "surface" of a gas giant than they are to die from overpressure
- Add hand-set density for Sol system gas giants, derived from recorded density-at-one-bar values and extrapolated by factor 3e
- Rename misleading volatileGas field to atmospheric density (its real value)
- Add surfacePressure field
- With "proper" atmospheric density definitions for gas giants, there is less variance in most body's atmospheric density.
- Heavy atmospheric shielding on an AC33 still supports a maximum static pressure exceeding that of real-world nuclear submarines
@sturnclaw
Copy link
Member Author

Note: a consequence of this PR is that it's unlikely for any ship to require Heavy Atmospheric Shielding (as naturally-generated gas giants will likely not exceed 10atm of surface pressure),

Might be worth considering temporarily commenting out the line for that equip, for this release

Addressed this by increasing the estimation factor to 3𝑒, and significantly reducing the effectiveness of atmospheric shielding. The AC33 previously supported a static (i.e. irrespective of any velocity-induced pressure) pressure limit of 150atm with heavy atmospheric shielding, more than three times of the maximum operating depth of modern military submarines.

With the new numbers, an AC33 with heavy atmospheric shielding can now tolerate a static pressure of up to 71.1atm, which is ~3x the effective maximum surface pressure of randomly-generated gas giants, but not quite enough to land on Venus with its real-life 90atm surface pressure (much less in Pioneer, which computes a surface pressure of 130atm at the same atmospheric density).

A Wave with heavy atmospheric shielding can almost land on Venus in Pioneer, supporting ~126atm of static pressure. This is something to address post-release, as Venus is computing its surface pressure from real-world atmospheric surface density and radius/mass estimates.

@sturnclaw sturnclaw merged commit 0bebf4c into pioneerspacesim:master Jan 31, 2024
5 of 6 checks passed
@sturnclaw sturnclaw deleted the fix-gas-giant-atmo branch February 2, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect Density for Gas Giants
2 participants