Difference between revisions of "Template:OrbitVelocity"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (Forgot a square root.)
m (Use Template:G for the gravitational constant.)
Line 1: Line 1:
 
{{#expr: <!--
 
{{#expr: <!--
 
-->    ( <!--
 
-->    ( <!--
-->        6.6726e-11 * {{{mass_kg}}} / <!--
+
-->        {{G}} * {{{mass_kg}}} / <!--
 
-->        ( <!--
 
-->        ( <!--
 
-->            ( <!--
 
-->            ( <!--
-->                {{{period_s}}}^2 * 6.6726e-11 * {{{mass_kg}}} <!--
+
-->                {{{period_s}}}^2 * {{G}} * {{{mass_kg}}} <!--
 
-->                / (4 * pi^2) <!--
 
-->                / (4 * pi^2) <!--
 
-->            ) ^ (1/3) <!--
 
-->            ) ^ (1/3) <!--

Revision as of 00:09, 16 October 2012

Expression error: Unrecognized punctuation character "{". m/s

Usage Produces
{{OrbitVelocity | period_s=64980 | mass_kg=4.515e21 | radius_km=320}}
0.00 m/s

This template calculates the velocity of an orbit, given the mass of the planet (in kg), the planet's radius (in km), and the period of the orbit (in seconds).