Difference between revisions of "Template:OrbitAltitude"
From Kerbal Space Program Wiki
m (!divide to get from m to km;) |
m (!one opening bracket to many;) |
||
Line 1: | Line 1: | ||
− | <includeonly>{{formatnum|{{#expr: | + | <includeonly>{{formatnum|{{#expr:(({{{period_s}}}^2 * {{G}} * {{{mass_kg}}}/(4 * pi^2)) ^ (1/3)) {{#if: {{{radius_km|}}}|/1000}} - {{#if: {{{radius_km|}}}|{{{radius_km}}}|{{{radius_m}}}}}}}|2}}{{#if: {{{suffix|}}}| {{#if: {{{radius_km|}}}|km|m}}}}</includeonly><noinclude> |
{| class="wikitable" | {| class="wikitable" |
Revision as of 19:44, 6 April 2013
Usage | Produces |
---|---|
{{OrbitAltitude | period_s=64980 | mass_kg=4.515e21 | radius_km=320}} |
0.00 m |
{{OrbitAltitude | period_s=64980 | mass_kg=4.515e21 | radius_m=320000}} |
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 or m), and the period of the orbit (in seconds).