Difference between revisions of "Template:Body data/orbit period"
From Kerbal Space Program Wiki
m (*uses Template:BodyData/Mass instead;) |
|||
Line 1: | Line 1: | ||
− | <includeonly>{{#expr: 2*pi*((({{{1}}} + {{{ | + | <includeonly>{{#expr: 2*pi*((({{{1}}} + {{{4|{{{1}}}}}})/2)^3/({{G}}*({{BodyData/Mass|{{{2}}}}} + {{BodyData/Mass|{{{3}}}}})))^(0.5)}}</includeonly> |
<noinclude>This template calculates the orbital period in seconds. | <noinclude>This template calculates the orbital period in seconds. | ||
Line 13: | Line 13: | ||
|- | |- | ||
| 3 | | 3 | ||
+ | | This object | ||
+ | |- | ||
+ | | 4 | ||
| Periapsis (in meters, if not set uses Apoapsis) | | Periapsis (in meters, if not set uses Apoapsis) | ||
|} | |} | ||
== Example == | == Example == | ||
− | <pre>{{OrbitPeriod|13599840256|Kerbol}}</pre> | + | <pre>{{OrbitPeriod|13599840256|Kerbol|Kerbin}}</pre> |
− | {{OrbitPeriod|13599840256|Kerbol}} | + | {{OrbitPeriod|13599840256|Kerbol|Kerbin}} |
[[Category:Templates|OrbitPeriod]]</noinclude> | [[Category:Templates|OrbitPeriod]]</noinclude> |
Revision as of 16:19, 27 June 2013
This template calculates the orbital period in seconds.
Name | Description |
---|---|
1 | Apoapsis (in meters) |
2 | Parent object |
3 | This object |
4 | Periapsis (in meters, if not set uses Apoapsis) |
Example
{{OrbitPeriod|13599840256|Kerbol|Kerbin}}
9203544.6175013