Difference between revisions of "Template:OrbitVelocity"
From Kerbal Space Program Wiki
(Add optional "round" and "suffix" arguments.) |
(-radius_km isn't needed; +use OrbitAltitude/Core;) |
||
Line 1: | Line 1: | ||
{{#expr: <!-- | {{#expr: <!-- | ||
--> ( <!-- | --> ( <!-- | ||
− | --> {{G}} * {{{mass_kg}}} / | + | --> {{G}} * {{{mass_kg}}} / {{OrbitAltitude/Core|{{{period_s}}}|{{{mass_kg}}}|0}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
--> ) ^ 0.5 <!-- | --> ) ^ 0.5 <!-- | ||
--> {{{round|}}} }} {{{suffix|m/s}}}<noinclude> | --> {{{round|}}} }} {{{suffix|m/s}}}<noinclude> | ||
Line 14: | Line 8: | ||
! Usage || Produces | ! Usage || Produces | ||
|- | |- | ||
− | | <pre><nowiki>{{OrbitVelocity | period_s=64980 | mass_kg=4.515e21 | + | | <pre><nowiki>{{OrbitVelocity | period_s=64980 | mass_kg=4.515e21}}</nowiki></pre> || {{OrbitVelocity | period_s=64980 | mass_kg=4.515e21}} |
|- | |- | ||
− | | <pre><nowiki>{{OrbitVelocity | period_s=64980 | mass_kg=4.515e21 | + | | <pre><nowiki>{{OrbitVelocity | period_s=64980 | mass_kg=4.515e21 | round=round2}}</nowiki></pre> || {{OrbitVelocity | period_s=64980 | mass_kg=4.515e21 | round=round2}} |
|- | |- | ||
− | | <pre><nowiki>{{OrbitVelocity | period_s=64980 | mass_kg=4.515e21 | + | | <pre><nowiki>{{OrbitVelocity | period_s=64980 | mass_kg=4.515e21 | round=round2 | suffix=}}</nowiki></pre> || {{OrbitVelocity | period_s=64980 | mass_kg=4.515e21 | round=round2 | suffix=}} |
|} | |} | ||
− | This template calculates the velocity of an orbit, given the mass of the planet (in kg) | + | This template calculates the velocity of an orbit, given the mass of the planet (in kg) and the period of the orbit (in seconds). |
[[Category:Templates|OrbitVelocity]] | [[Category:Templates|OrbitVelocity]] | ||
</noinclude> | </noinclude> |
Revision as of 19:21, 22 April 2013
Expression error: Unrecognized punctuation character "{". m/s
Usage | Produces |
---|---|
{{OrbitVelocity | period_s=64980 | mass_kg=4.515e21}} |
0.00 m/s |
{{OrbitVelocity | period_s=64980 | mass_kg=4.515e21 | round=round2}} |
0.00 m/s |
{{OrbitVelocity | period_s=64980 | mass_kg=4.515e21 | round=round2 | suffix=}} |
0.00 m/s |
This template calculates the velocity of an orbit, given the mass of the planet (in kg) and the period of the orbit (in seconds).