Difference between revisions of "Template:Body data/orbit period"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with "<includeonly>{{#expr: 2*pi*((({{{1}}} + {{{3|{{{1}}}}}})/2)^3/({{G}}*{{CelestialBodyMass|{{{2}}}}}))^(0.5)}}</includeonly> <noinclude>This template calculates the orbital peri...")
 
m (Use new mass template)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#expr: 2*pi*((({{{1}}} + {{{3|{{{1}}}}}})/2)^3/({{G}}*{{CelestialBodyMass|{{{2}}}}}))^(0.5)}}</includeonly>
+
<includeonly>{{#expr: 2*pi*(({{{1}}})^3/({{G}}*({{Body data/Mass|{{{2}}}}})))^(0.5)}}</includeonly><noinclude>This template calculates the orbital period in seconds.
<noinclude>This template calculates the orbital period.
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 7: Line 6:
 
|-
 
|-
 
| 1
 
| 1
| Apoapsis
+
| Semi-major axis (in meters)
 
|-
 
|-
 
| 2
 
| 2
 
| Parent object
 
| Parent object
|-
 
| 3
 
| Periapsis (if not set uses Apoapsis)
 
 
|}
 
|}
  
[[Category:Template|OrbitPeriod]]</noinclude>
+
== Example ==
 +
<pre>{{Body data/orbit period|13599840256|Kerbol}}</pre>
 +
{{Body data/orbit period|13599840256|Kerbol}}
 +
 
 +
[[Category:BodyData Math Templates|orbit period]]</noinclude>

Latest revision as of 12:59, 10 May 2018

This template calculates the orbital period in seconds.

Name Description
1 Semi-major axis (in meters)
2 Parent object

Example

{{Body data/orbit period|13599840256|Kerbol}}

9203544.6175013