Difference between revisions of "Template:OrbitVelocity"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (Forgot a square root.)
m (*renamed Parameter Table to Parameter table;)
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{#expr: <!--
+
<includeonly>{{formatnum|{{OrbitVelocity/Core|{{{1|{{{period|}}}}}}|{{{2|{{{mass|}}}}}}|b={{{body|{{{b|}}}}}}|f={{{factor|{{{f|}}}}}}|pf={{{period factor|{{{pf|}}}}}}}}|2}}&nbsp;{{Dict|{{{factor|{{{f|}}}}}}}}{{Dict|m}}/{{Dict|s}}</includeonly><noinclude>This template calculates the velocity of an orbit. To calculate further with the orbit's velocity use {{Tl|OrbitVelocity/Core}}.
-->    ( <!--
 
-->        6.6726e-11 * {{{mass_kg}}} / <!--
 
-->        ( <!--
 
-->            ( <!--
 
-->                {{{period_s}}}^2 * 6.6726e-11 * {{{mass_kg}}} <!--
 
-->                / (4 * pi^2) <!--
 
-->            ) ^ (1/3) <!--
 
-->         ) <!--
 
-->     ) ^ 0.5 <!--
 
--> }} m/s<noinclude>
 
  
 +
== Parameters ==
 +
 +
{{Parameter table|name=both|parameters=
 +
{{Parameter row|period|name2=1|Period of the orbit in seconds}}
 +
{{Parameter row|mass|name2=2|Mass of central body in kilograms}}
 +
{{Parameter row|factor|name2=f|Factor in which the velocity should be shown. Available values: None (m/s), '''k''' (km/s), '''M''' (Mm/s), '''G''' (Gm/s).|None}}
 +
{{Parameter row|body|name2=b|Uses the sidereal rotation period and mass as default from the given body. Can be overwritten.|Not set (makes the first two parameters mandatory)}}
 +
{{Parameter row|period factor|name2=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>}}
 +
}}
 +
 +
== Examples ==
 
{| class="wikitable"
 
{| class="wikitable"
 
! Usage || Produces
 
! Usage || Produces
 
|-
 
|-
| <pre><nowiki>{{OrbitVelocity | period_s=64980 | mass_kg=4.515e21 | radius_km=320}}</nowiki></pre> || {{OrbitVelocity | period_s=64980 | mass_kg=4.515e21 | radius_km=320}}
+
| <pre><nowiki>{{OrbitVelocity | period=64980 | mass=4.515e21}}</nowiki></pre> || {{OrbitVelocity | period=64980 | mass=4.515e21}}
 +
|-
 +
| <pre><nowiki>{{OrbitVelocity | 64980 | 4.515e21}}</nowiki></pre> || {{OrbitVelocity | 64980 | 4.515e21}}
 +
|-
 +
| <pre><nowiki>{{OrbitVelocity | 64980 | 4.515e21 | f=k}}</nowiki></pre> || {{OrbitVelocity | 64980 | 4.515e21 | f=k}}
 +
|-
 +
| <pre><nowiki>{{OrbitVelocity | 64980 | 4.515e21 | pf=1/2}}</nowiki></pre> || {{OrbitVelocity | 64980 | 4.515e21 | pf=1/2}}
 +
|-
 +
| <pre><nowiki>{{OrbitVelocity | b=Kerbin}}</nowiki></pre> || {{OrbitVelocity |  b=Kerbin}}
 
|}
 
|}
  
This template calculates the velocity of an orbit, given the mass of the planet (in kg), the planet's radius (in km), and the period of the orbit (in seconds).
+
[[Category:Calculating templates]]
 
+
[[Category:Translating templates]]</noinclude>
[[Category:Templates|OrbitVelocity]]
 
</noinclude>
 

Latest revision as of 12:12, 19 December 2014

This template calculates the velocity of an orbit. To calculate further with the orbit's velocity use {{OrbitVelocity/Core}}.

Parameters

#/Name Optional Description Default
period or 1 No Period of the orbit in seconds
mass or 2 No Mass of central body in kilograms
factor or f Yes Factor in which the velocity should be shown. Available values: None (m/s), k (km/s), M (Mm/s), G (Gm/s). None
body or b Yes Uses the sidereal rotation period and mass as default from the given body. Can be overwritten. Not set (makes the first two parameters mandatory)
period factor or pf Yes Multiplies the period with this value. Useful to easily calculate semi-synchronous orbits (pf=1/2 then). 1

Examples

Usage Produces
{{OrbitVelocity | period=64980 | mass=4.515e21}}
307.72 m/s
{{OrbitVelocity | 64980 | 4.515e21}}
307.72 m/s
{{OrbitVelocity | 64980 | 4.515e21 | f=k}}
0.31 km/s
{{OrbitVelocity | 64980 | 4.515e21 | pf=1/2}}
387.70 m/s
{{OrbitVelocity | b=Kerbin}}
1 009.81 m/s