Difference between revisions of "Template:Body data/alt at pressure"
From Kerbal Space Program Wiki
m (+cat; +examples;) |
|||
Line 1: | Line 1: | ||
− | <includeonly>{{#ifexpr: {{BodyData | + | <includeonly>{{#ifexpr: {{BodyData|{{{body}}}|pressure}}>0|{{#expr: -{{BodyData|{{{body}}}|scale height}} * ln({{{pressure}}} / {{BodyData|{{{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 26: | Line 26: | ||
| {{PressureAltitude|pressure=10^-6|body=Laythe}} | | {{PressureAltitude|pressure=10^-6|body=Laythe}} | ||
|} | |} | ||
+ | |||
+ | This template uses {{Tl|BodyData}} with the <tt>scale height</tt> and <tt>pressure</tt> properties. | ||
== Parameters == | == Parameters == | ||
Line 39: | Line 41: | ||
|} | |} | ||
− | [[Category:Templates | + | [[Category:Templates]]</noinclude> |
Revision as of 15:24, 14 September 2013
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 | {{PressureAltitude|pressure=10^-6|body=Eve}} | Template:PressureAltitude |
Kerbin | {{PressureAltitude|pressure=10^-6|body=Kerbin}} | Template:PressureAltitude |
Duna | {{PressureAltitude|pressure=10^-6|body=Duna}} | Template:PressureAltitude |
Jool | {{PressureAltitude|pressure=10^-6|body=Jool}} | Template:PressureAltitude |
Laythe | {{PressureAltitude|pressure=10^-6|body=Laythe}} | Template:PressureAltitude |
This template uses {{BodyData}} with the scale height and pressure properties.
Parameters
Name | Description |
---|---|
body | Celestial body which is referenced |
pressure | Searched pressure in atm |