Difference between revisions of "Template:OrbitAltitude"
From Kerbal Space Program Wiki
m (!default is available as km/m;) |
|||
Line 1: | Line 1: | ||
− | <includeonly>{{formatnum|{{#expr: | + | <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 | ||
+ | |M=/1000000 | ||
+ | |G=/1000000000}}}}|2}}{{#if: {{{suffix}}}| {{{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. | ||
+ | == Parameters == | ||
{| class="wikitable" | {| class="wikitable" | ||
− | ! Usage || | + | ! Name/# |
+ | ! Optional | ||
+ | ! Description | ||
+ | {{ParameterRow|period|Period of the orbit in seconds (Old parametername: <tt>{{{period_s}}}</tt>)}} | ||
+ | {{ParameterRow|mass|Mass of central body in kilograms (Old parametername: <tt>{{{mass_kg}}}</tt>)}} | ||
+ | {{ParameterRow|radius|Radius of central body in meters (Old parameternames: <tt>{{{radius_m}}}</tt>, <tt>{{{radius_km}}}</tt> (in km!))}} | ||
+ | {{ParameterRow|factor|Factor in which the altitude should be shown. Available values: None (m), '''k''' (km), '''M''' (Mm), '''G''' (Gm). If the radius was given kilometers it uses the factor '''k'''.|None}} | ||
+ | |} | ||
+ | |||
+ | == Examples == | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Usage || Result | ||
|- | |- | ||
− | | <pre | + | | <pre>{{OrbitAltitude | period=64980 | mass=4.515e21 | radius_km=320}}</pre> || {{OrbitAltitude | period=64980 | mass=4.515e21 | radius_km=320}} |
|- | |- | ||
− | | <pre | + | | <pre>{{OrbitAltitude | period=64980 | mass=4.515e21 | radius=320000}}</pre> || {{OrbitAltitude | period=64980 | mass=4.515e21 | radius=320000}} |
|} | |} | ||
− | |||
− | |||
[[Category:Templates|OrbitAltitude]]</noinclude> | [[Category:Templates|OrbitAltitude]]</noinclude> |
Revision as of 20:24, 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.
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 |