Difference between revisions of "Template:OrbitAltitude"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Make a template for calculating the altitude of an orbit with the given period, planet mass, and planet radius.)
 
m (Fix line breaks (?).)
Line 1: Line 1:
{{#expr: \
+
{{#expr: <!--
     ( \
+
-->     ( <!--
         ( \
+
-->         ( <!--
             ( \
+
-->             ( <!--
                 {{{period_s}}}^2 * 6.6726e-11 * {{{mass_kg}}} \
+
-->                 {{{period_s}}}^2 * 6.6726e-11 * {{{mass_kg}}} <!--
                 / (4 * pi^3) \
+
-->                 / (4 * pi^3) <!--
             ) ^ (1/3) \
+
-->             ) ^ (1/3) <!--
         ) / 1000 )
+
-->         ) / 1000 <!--
     ) - {{{radius_km}}} \
+
-->     ) - {{{radius_km}}} <!--
}} km<noinclude>
+
--> }} km<noinclude>
  
 
{| class="wikitable"
 
{| class="wikitable"

Revision as of 23:10, 15 October 2012

Expression error: Unrecognized punctuation character "{". km

Usage Produces
{{OrbitAltitude | period_s=86400 | mass_kg=4.515e21 | radius_km=320}}
0.00 m

This template calculates the altitude 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).