Difference between revisions of "Template:VT"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (Cleanup.)
(Simplify the template by specifying a planet instead of mass, radius, etc.)
Line 1: Line 1:
<includeonly>{{#expr: </includeonly><!--
+
<includeonly>{{#expr</includeonly>: <!--
 
-->    ( <!--
 
-->    ( <!--
-->        2 * {{G}} * {{{M}}} / <!--
+
-->        2 * {{G}} * {{#ifeq: {{{planet}}} | Moho  | 3.6747079E+21 | <!-- mass
 +
-->                    {{#ifeq: {{{planet}}} | Eve    | 1.2244127E+23 | <!--
 +
-->                    {{#ifeq: {{{planet}}} | Kerbin | 5.2915793E+22 | <!--
 +
-->                    {{#ifeq: {{{planet}}} | Duna  | 4.5154812E+21 | <!--
 +
-->                    {{#ifeq: {{{planet}}} | Jool  | 4.2332635E+24 | <!--
 +
-->                    {{#ifeq: {{{planet}}} | Laythe | 2.9397663E+22 | <!--
 +
-->                    }} }} }} }} }} }} <!--
 
-->        ( <!--
 
-->        ( <!--
-->            {{{r}}}^2 * {{{pressure}}} * 0.01225 * 0.2 * 1 <!--
+
-->            ({{{alt}}} + {{#ifeq: {{{planet}}} | Moho  |  250000 | <!-- planet radius
 +
-->                          {{#ifeq: {{{planet}}} | Eve    |  700000 | <!--
 +
-->                          {{#ifeq: {{{planet}}} | Kerbin |  600000 | <!--
 +
-->                          {{#ifeq: {{{planet}}} | Duna  |  320000 | <!--
 +
-->                          {{#ifeq: {{{planet}}} | Jool  | 6000000 | <!--
 +
-->                          {{#ifeq: {{{planet}}} | Laythe |  500000 | <!--
 +
-->                          }} }} }} }} }} }} <!--
 +
-->            )^2 * <!--
 +
-->            ( {{#ifeq: {{{planet}}} | Moho  |  0.005 * e^(-{{{alt}} / 2000) | <!-- atmospheric pressure
 +
-->              {{#ifeq: {{{planet}}} | Eve    |  5    * e^(-{{{alt}} / 7000) | <!--
 +
-->              {{#ifeq: {{{planet}}} | Kerbin |  1    * e^(-{{{alt}} / 5000) | <!--
 +
-->              {{#ifeq: {{{planet}}} | Duna  |  0.2  * e^(-{{{alt}} / 3000) | <!--
 +
-->              {{#ifeq: {{{planet}}} | Jool  | 15    * e^(-{{{alt}} / 9000) | <!--
 +
-->              {{#ifeq: {{{planet}}} | Laythe |  0.8  * e^(-{{{alt}} / 4000) | <!--
 +
-->              }} }} }} }} }} }} <!--
 +
-->            ) * 0.01225 * 0.2 * 1 <!--
 
-->        ) <!--
 
-->        ) <!--
 
-->    ) ^ 0.5<includeonly>}}</includeonly><noinclude>
 
-->    ) ^ 0.5<includeonly>}}</includeonly><noinclude>
Line 10: Line 31:
 
! Usage || Produces
 
! Usage || Produces
 
|-
 
|-
| <pre><nowiki>{{VT | M=5.2915793E+22 | r=600000 | pressure=1}}</nowiki></pre> || {{VT | M=5.2915793E+22 | r=600000 | pressure=1}}
+
| <pre><nowiki>{{VT | planet = Kerbin | alt = 0}}</nowiki></pre> || {{VT | planet = Kerbin | alt = 0}}
 
|}
 
|}
  
This template calculates terminal velocity of an object given a planet's mass (''M''), the distance from the object to the planet's center (''r''), and the atmospheric pressure (''pressure'') at the object's location, specified in units of 1 atm (the pressure at sea level on Kerbin). It assumes that the coefficient of drag is 0.2 and that the cross-sectional area is 1 m<sup>2</sup>.
+
This template calculates terminal velocity of an object given the planet and the altitude from the planet's surface. It assumes that the coefficient of drag is 0.2 and that the cross-sectional area is 1 m<sup>2</sup>.
  
 
[[Category:Templates|VT]]
 
[[Category:Templates|VT]]
 
</noinclude>
 
</noinclude>

Revision as of 21:18, 2 November 2012

( 2 * 6.67408e-11 * ( ({{{alt}}} + )^2 * ( ) * 0.01225 * 0.2 * 1 ) ) ^ 0.5
Usage Produces
{{VT | planet = Kerbin | alt = 0}}
100.1288989294

This template calculates terminal velocity of an object given the planet and the altitude from the planet's surface. It assumes that the coefficient of drag is 0.2 and that the cross-sectional area is 1 m2.