Difference between revisions of "Template:Body data/alt at pressure"
From Kerbal Space Program Wiki
m (XZise moved page Template:PressureAltitude to Template:Body data/alt at pressure: more descriptive name) |
m (*moved templates;) |
||
Line 1: | Line 1: | ||
− | <includeonly>{{#ifexpr: {{ | + | <includeonly>{{#ifexpr: {{Body data|{{{body}}}|pressure}}>0|{{#expr: -{{Body data|{{{body}}}|scale height}} * ln({{{pressure}}} / {{Body data|{{{body}}}|pressure}})}}|0}}</includeonly> |
<noinclude>Calculates the height at which the specified pressure is in meters. Returns 0 if the celestial body hasn't any atmosphere. For example 0.000001 atm (or 10<sup>-6</sup> atm) are at the following altitudes: | <noinclude>Calculates the height at which the specified pressure is in meters. Returns 0 if the celestial body hasn't any atmosphere. For example 0.000001 atm (or 10<sup>-6</sup> atm) are at the following altitudes: | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 7: | Line 7: | ||
|- | |- | ||
| [[Eve]] | | [[Eve]] | ||
− | | <tt><nowiki>{{ | + | | <tt><nowiki>{{Body data/alt at pressure|pressure=10^-6|body=Eve}}</nowiki></tt> |
− | | {{ | + | | {{Body data/alt at pressure|pressure=10^-6|body=Eve}} |
|- | |- | ||
| [[Kerbin]] | | [[Kerbin]] | ||
− | | <tt><nowiki>{{ | + | | <tt><nowiki>{{Body data/alt at pressure|pressure=10^-6|body=Kerbin}}</nowiki></tt> |
− | | {{ | + | | {{Body data/alt at pressure|pressure=10^-6|body=Kerbin}} |
|- | |- | ||
| [[Duna]] | | [[Duna]] | ||
− | | <tt><nowiki>{{ | + | | <tt><nowiki>{{Body data/alt at pressure|pressure=10^-6|body=Duna}}</nowiki></tt> |
− | | {{ | + | | {{Body data/alt at pressure|pressure=10^-6|body=Duna}} |
|- | |- | ||
| [[Jool]] | | [[Jool]] | ||
− | | <tt><nowiki>{{ | + | | <tt><nowiki>{{Body data/alt at pressure|pressure=10^-6|body=Jool}}</nowiki></tt> |
− | | {{ | + | | {{Body data/alt at pressure|pressure=10^-6|body=Jool}} |
|- | |- | ||
| [[Laythe]] | | [[Laythe]] | ||
− | | <tt><nowiki>{{ | + | | <tt><nowiki>{{Body data/alt at pressure|pressure=10^-6|body=Laythe}}</nowiki></tt> |
− | | {{ | + | | {{Body data/alt at pressure|pressure=10^-6|body=Laythe}} |
|} | |} | ||
− | This template uses {{Tl| | + | This template uses {{Tl|Body data}} with the <tt>scale height</tt> and <tt>pressure</tt> properties. |
== Parameters == | == Parameters == | ||
Line 41: | Line 41: | ||
|} | |} | ||
− | [[Category:Templates]]</noinclude> | + | [[Category:BodyData Math Templates]]</noinclude> |
Revision as of 11:59, 27 August 2014
Calculates the height at which the specified pressure is in meters. Returns 0 if the celestial body hasn't any atmosphere. For example 0.000001 atm (or 10-6 atm) are at the following altitudes:
Body | Code | Result |
---|---|---|
Eve | {{Body data/alt at pressure|pressure=10^-6|body=Eve}} | 111059.62898687 |
Kerbin | {{Body data/alt at pressure|pressure=10^-6|body=Kerbin}} | 77366.8591246 |
Duna | {{Body data/alt at pressure|pressure=10^-6|body=Duna}} | 63312.524205789 |
Jool | {{Body data/alt at pressure|pressure=10^-6|body=Jool}} | 495706.82367555 |
Laythe | {{Body data/alt at pressure|pressure=10^-6|body=Laythe}} | 106437.47971453 |
This template uses {{Body data}} with the scale height and pressure properties.
Parameters
Name | Description |
---|---|
body | Celestial body which is referenced |
pressure | Searched pressure in atm |