Difference between revisions of "Template:VT"

From Kerbal Space Program Wiki
Jump to: navigation, search
(*mass, radius, pressure and scale height from subtemplates to parameters; *rewritten documentation according to the newest findings on the atmosphere article;)
(+allow numbered parameters;)
Line 1: Line 1:
 
<includeonly>{{#expr: <!--
 
<includeonly>{{#expr: <!--
 
-->    ( <!--
 
-->    ( <!--
-->        2 * {{G}} * {{BodyData|{{{planet}}}|mass}} <!--
+
-->        2 * {{G}} * {{BodyData|{{{planet|{{{1}}}}}}|mass}} <!--
 
-->        / ( <!--
 
-->        / ( <!--
-->            ({{{alt}}} + {{BodyData|{{{planet}}}|radius}} <!--
+
-->            ({{{alt|{{{2}}}}}} + {{BodyData|{{{planet|{{{1}}}}}}|radius}} <!--
 
-->            )^2 * <!--
 
-->            )^2 * <!--
-->            ( {{BodyData|{{{planet}}}|pressure}} * e^(-{{{alt}}}/{{BodyData|{{{planet}}}|scale height}}) <!--
+
-->            ( {{BodyData|{{{planet|{{{1}}}}}}|pressure}} * e^(-{{{alt|{{{2}}}}}}/{{BodyData|{{{planet|{{{1}}}}}}|scale height}}) <!--
 
-->            ) * (1.2230948554874 * 0.008) * 0.2 * 1 <!--
 
-->            ) * (1.2230948554874 * 0.008) * 0.2 * 1 <!--
 
-->        ) <!--
 
-->        ) <!--
Line 17: Line 17:
  
 
This template calculates terminal velocity of an object given the planet and the altitude from the planet's surface. It uses {{Tl|BodyData}} with the properties <tt>mass</tt>, <tt>radius</tt>, <tt>pressure</tt> and <tt>scale height</tt>.
 
This template calculates terminal velocity of an object given the planet and the altitude from the planet's surface. It uses {{Tl|BodyData}} with the properties <tt>mass</tt>, <tt>radius</tt>, <tt>pressure</tt> and <tt>scale height</tt>.
 +
 +
{{Parameter Table|name=both|parameters=
 +
{{Parameter Row|1|name2=planet|The celestial body}}
 +
{{Parameter Row|2|name2=alt|The altitude at which the terminal velocity should be calculated.}}
 +
}}
  
 
: <math>v_T = \sqrt{\frac{250 \frac{\text{kg}}{\text{m}^2} \cdot GM}{(a+r)^2 \cdot \rho \cdot d}}</math>
 
: <math>v_T = \sqrt{\frac{250 \frac{\text{kg}}{\text{m}^2} \cdot GM}{(a+r)^2 \cdot \rho \cdot d}}</math>

Revision as of 11:48, 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.