Difference between revisions of "Template:Body data/alt at pressure"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with "<includeonly>{{#ifexpr: {{BodyData/Pressure|{{{body}}}}}>0|{{#expr: -{{BodyData/ScaleHeight|{{{body}}}}} * ln({{{pressure}}} / {{BodyData/Pressure|{{{body}}}}} ) }}|0}}</i...")
 
m (+cat; +examples;)
Line 1: Line 1:
 
<includeonly>{{#ifexpr: {{BodyData/Pressure|{{{body}}}}}>0|{{#expr:  -{{BodyData/ScaleHeight|{{{body}}}}} * ln({{{pressure}}} / {{BodyData/Pressure|{{{body}}}}}    ) }}|0}}</includeonly>
 
<includeonly>{{#ifexpr: {{BodyData/Pressure|{{{body}}}}}>0|{{#expr:  -{{BodyData/ScaleHeight|{{{body}}}}} * ln({{{pressure}}} / {{BodyData/Pressure|{{{body}}}}}    ) }}|0}}</includeonly>
<noinclude>Calculates the height at which the specified pressure is in meters. Returns 0 if the celestial body hasn't any atmosphere.
+
<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&nbsp;atm (or 10<sup>-6</sup>&nbsp;atm) are at the following altitudes:
 +
{| class="wikitable"
 +
! Body
 +
! Code
 +
! Result
 +
|-
 +
| [[Eve]]
 +
| <tt><nowiki>{{PressureAltitude|pressure=10^-6|body=Eve}}</nowiki></tt>
 +
| {{PressureAltitude|pressure=10^-6|body=Eve}}
 +
|-
 +
| [[Kerbin]]
 +
| <tt><nowiki>{{PressureAltitude|pressure=10^-6|body=Kerbin}}</nowiki></tt>
 +
| {{PressureAltitude|pressure=10^-6|body=Kerbin}}
 +
|-
 +
| [[Duna]]
 +
| <tt><nowiki>{{PressureAltitude|pressure=10^-6|body=Duna}}</nowiki></tt>
 +
| {{PressureAltitude|pressure=10^-6|body=Duna}}
 +
|-
 +
| [[Jool]]
 +
| <tt><nowiki>{{PressureAltitude|pressure=10^-6|body=Jool}}</nowiki></tt>
 +
| {{PressureAltitude|pressure=10^-6|body=Jool}}
 +
|-
 +
| [[Laythe]]
 +
| <tt><nowiki>{{PressureAltitude|pressure=10^-6|body=Laythe}}</nowiki></tt>
 +
| {{PressureAltitude|pressure=10^-6|body=Laythe}}
 +
|}
  
 
== Parameters ==
 
== Parameters ==
Line 12: Line 37:
 
| pressure
 
| pressure
 
| Searched pressure in atm
 
| Searched pressure in atm
|}</noinclude>
+
|}
 +
 
 +
[[Category:Templates|PressureAltitude]]</noinclude>

Revision as of 20:51, 9 April 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

Parameters

Name Description
body Celestial body which is referenced
pressure Searched pressure in atm