Difference between revisions of "Template:OrbitAltitude"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (!close radius parameter;)
Line 1: Line 1:
<includeonly>{{formatnum|{{#expr: {{OrbitAltitude/Core|{{{period|{{{period_s}}}}}}|{{{mass|{{{mass_kg}}}}}}|{{{radius|{{{radius_m|{{#expr: {{{radius_km}}}*1000}}}}}} {{#switch: {{{factor|{{#if: {{{radius_km|}}}|k}}}}}
+
<includeonly>{{formatnum|{{#expr: {{OrbitAltitude/Core|{{{period|{{{period_s}}}}}}|{{{mass|{{{mass_kg}}}}}}|{{{radius|{{{radius_m|{{#expr: {{{radius_km}}}*1000}}}}}}}} {{#switch: {{{factor|{{#if: {{{radius_km|}}}|k}}}}}
 
|k=/1000
 
|k=/1000
 
|M=/1000000
 
|M=/1000000
|G=/1000000000}}}}|2}}{{#if: {{{suffix}}}|&nbsp;{{{suffix|{{{factor|{{#if: {{{radius_km|}}}|k}}}}}m}}}}}</includeonly><noinclude>This template calculates the altitude of an orbit, given the mass of the planet, the planet's radius and the period of the orbit.
+
|G=/1000000000}}}}|2}}{{#if: {{{suffix}}}|&nbsp;{{{suffix|{{{factor|{{#if: {{{radius_km|}}}|k}}}}}m}}}}}</includeonly><noinclude>This template calculates the altitude of an orbit, given the mass of the planet, the planet's radius and the period of the orbit. To calculate the orbit's altitude without any fancy stuff (like decimal separator) use {{Tl|OrbitAltitude/Core}}.
  
 
== Parameters ==
 
== Parameters ==

Revision as of 20:28, 6 April 2013

This template calculates the altitude of an orbit, given the mass of the planet, the planet's radius and the period of the orbit. To calculate the orbit's altitude without any fancy stuff (like decimal separator) use {{OrbitAltitude/Core}}.

Parameters

Name/# Optional Description

Template:ParameterRow Template:ParameterRow Template:ParameterRow Template:ParameterRow

Examples

Usage Result
{{OrbitAltitude | period=64980 | mass=4.515e21 | radius_km=320}}
3 182 362.24 m
{{OrbitAltitude | period=64980 | mass=4.515e21 | radius=320000}}
2 862 362.24 m