Difference between revisions of "Template:VT"

From Kerbal Space Program Wiki
Jump to: navigation, search
(+allow numbered parameters;)
m (+round;)
Line 8: Line 8:
 
-->            ) * (1.2230948554874 * 0.008) * 0.2 * 1 <!--
 
-->            ) * (1.2230948554874 * 0.008) * 0.2 * 1 <!--
 
-->        ) <!--
 
-->        ) <!--
-->    ) ^ 0.5}}</includeonly><noinclude>
+
-->    ) ^ 0.5 {{#if: {{{3|{{{round|}}}}}}|round {{{3|{{{round}}}}}}}}}}</includeonly><noinclude>
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 21: Line 21:
 
{{Parameter Row|1|name2=planet|The celestial body}}
 
{{Parameter Row|1|name2=planet|The celestial body}}
 
{{Parameter Row|2|name2=alt|The altitude at which the terminal velocity should be calculated.}}
 
{{Parameter Row|2|name2=alt|The altitude at which the terminal velocity should be calculated.}}
 +
{{Parameter Row|3|name2=round|Round to the given number of decimal places.|Not set/Doesn't round}}
 
}}
 
}}
  

Revision as of 12:19, 15 September 2013


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 uses {{BodyData}} with the properties mass, radius, pressure and scale height.

Template:Parameter Table

(M is the mass of the body, r is the body's radius, p0 is pressure at 0 m altitude (“sea level”), a is the altitude above sea level and H is the scale height)

The formula assumes that the coefficient of drag (d) is 0.2 and is used from the atmosphere article.