Difference between revisions of "Template:OrbitAltitude/Core"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (+allow formulas for the period parameter;)
(*merge from the BodyData template;)
Line 1: Line 1:
<includeonly>{{#expr:((({{{1}}})^2 * {{G}} * {{{2}}}/(4 * pi^2)) ^ (1/3)) - {{{3|0}}}}}</includeonly><noinclude>Calcuates the orbital height without any formatting.
+
<includeonly>{{#expr:(((({{#if: {{{1|}}}{{#if: {{{b|}}}||1}}|{{{1}}}|{{BodyData|{{{b}}}|sidrot}}}}{{#if: {{{pf|}}}|*{{{pf}}}}})^2 * {{G}} * {{#if: {{{2|}}}{{#if: {{{b|}}}||1}}|{{{2}}}|{{BodyData|{{{b}}}|mass}}}}/(4 * pi^2)) ^ (1/3)) - {{#if: {{{3|}}}{{#if: {{{b|}}}||1}}|{{#if: {{{3|}}}|{{{3}}}|0}}|{{BodyData|{{{b}}}|mass}}}}) {{#switch: {{{factor|}}}
 +
|k=/1000
 +
|M=/1000000
 +
|G=/1000000000}}}}</includeonly><noinclude>Calculates the orbital height without any formatting.
  
{| class="wikitable"
+
{{Parameter Table
! #
+
{{Parameter Row|1|Period of the orbit in seconds}}
! Description
+
{{Parameter Row|2|Mass of central body in kilograms}}
|-
+
{{Parameter Row|3|Radius of central body in meters|0}}
| 1
+
{{Parameter Row|f|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}}
| Period (s)
+
{{Parameter Row|b|Uses the sidereal rotation period, mass and radius as default from the given body. Can be overwritten.|Not set (makes the first three parameters mandatory)}}
|-
+
{{Parameter Row|pf|2=Multiplies the period with this value. Useful to easily calculate semi-synchronous orbits (<tt>pf=1/2</tt> then).|3=<tt>1</tt>}}
| 2
 
| Mass (kg)
 
|-
 
| 3
 
| Radius (m), Default is 0 m.
 
 
|}
 
|}
  
[[Category:Templates|OrbitAltitude/Core]]</noinclude>
+
[[Category:Templates]]</noinclude>

Revision as of 15:37, 16 September 2013

Calculates the orbital height without any formatting.

{{Parameter Table Template:Parameter Row Template:Parameter Row Template:Parameter Row Template:Parameter Row Template:Parameter Row Template:Parameter Row |}