Difference between revisions of "Template:OrbitVelocity/Core"
From Kerbal Space Program Wiki
(Created page with "{{#expr: <!-- --> ( <!-- --> {{G}} * {{{2}}} / {{OrbitAltitude/Core|{{{1}}}|{{{2}}}|0}} <!-- --> ) ^ 0.5 {{#if: {{{3|}}}|round 3}}<!-- --> }}<noinclude> {| cl...") |
(+allow body instead of separate values; *merge content from the main template;) |
||
Line 1: | Line 1: | ||
− | {{#expr: <!-- | + | <includeonly>{{#expr: <!-- |
--> ( <!-- | --> ( <!-- | ||
− | --> {{G}} * {{{2}}} / {{OrbitAltitude/Core|{{{1}}}|{{{2}}}|0}} <!-- | + | --> {{G}} * {{#if: {{{2|}}}{{#if: {{{b|}}}||1}}|{{{2}}}|{{BodyData|{{{b}}}|mass}}}} / {{OrbitAltitude/Core|{{{1|}}}|{{{2|}}}|0|b={{{b|}}}|pf={{{pf|}}}}} <!-- |
− | --> ) ^ 0.5 {{#if: {{{3|}}}|round 3}}<!-- | + | --> ) ^ 0.5 {{#switch: {{{f|}}} |
− | --> }}<noinclude> | + | |k=/1000 |
+ | |M=/1000000 | ||
+ | |G=/1000000000}} {{#if: {{{3|}}}|round 3}}<!-- | ||
+ | --> }}</includeonly><noinclude> | ||
− | {| | + | {{Parameter Table|parameters= |
− | + | {{Parameter Row|1|Period of the orbit in seconds}} | |
− | + | {{Parameter Row|2|Mass of central body in kilograms}} | |
− | | | + | {{Parameter Row|3|Round to the number of decimal places.|Doesn't round}} |
− | | | + | {{Parameter Row|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|b|Uses the sidereal rotation period, mass and radius as default from the given body. Can be overwritten.|Not set (makes the first two 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>}} |
− | | | + | }} |
− | | | ||
− | |- | ||
− | | 3 | ||
− | |||
− | |||
[[Category:Templates]]</noinclude> | [[Category:Templates]]</noinclude> |