Difference between revisions of "Template:OrbitAltitude/Core"
From Kerbal Space Program Wiki
m (!parameter table;) |
m (Use new mass template) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{#expr:(((({{#if: {{{1|}}}{{#if: {{{b|}}}||1}}|{{{1}}}|{{ | + | <includeonly>{{#expr:(((({{#if: {{{1|}}}{{#if: {{{b|}}}||1}}|{{{1}}}|{{Body data|{{{b}}}|sidrot}}}}{{#if: {{{pf|}}}|*{{{pf}}}}})^2 * {{G}} * {{#if: {{{2|}}}{{#if: {{{b|}}}||1}}|{{{2}}}|{{Body data/Mass|{{{b}}}}}}}/(4 * pi^2)) ^ (1/3)) - {{#if: {{{3|}}}{{#if: {{{b|}}}||1}}|{{#if: {{{3|}}}|{{{3}}}|0}}|{{Body data|{{{b}}}|radius}}}}) {{#switch: {{{f|}}} |
|k=/1000 | |k=/1000 | ||
|M=/1000000 | |M=/1000000 | ||
|G=/1000000000}}}}</includeonly><noinclude>Calculates the orbital height without any formatting. | |G=/1000000000}}}}</includeonly><noinclude>Calculates the orbital height without any formatting. | ||
− | {{Parameter | + | {{Parameter table|parameters= |
− | {{Parameter | + | {{Parameter row|1|Period of the orbit in seconds}} |
− | {{Parameter | + | {{Parameter row|2|Mass of central body in kilograms}} |
− | {{Parameter | + | {{Parameter row|3|Radius of central body in meters|0}} |
− | {{Parameter | + | {{Parameter row|f|Factor in which the altitude should be shown. Available values: None (m), '''k''' (km), '''M''' (Mm), '''G''' (Gm). If the radius was given kilometers it uses the factor '''k'''.|None}} |
− | {{Parameter | + | {{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 three parameters mandatory)}} |
− | {{Parameter | + | {{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>}} |
}} | }} | ||
[[Category:Templates]]</noinclude> | [[Category:Templates]]</noinclude> |
Latest revision as of 13:01, 10 May 2018
Calculates the orbital height without any formatting.
# | Optional | Description | Default |
---|---|---|---|
1 | No | Period of the orbit in seconds | |
2 | No | Mass of central body in kilograms | |
3 | Yes | Radius of central body in meters | 0 |
f | Yes | Factor in which the altitude should be shown. Available values: None (m), k (km), M (Mm), G (Gm). If the radius was given kilometers it uses the factor k. | None |
b | Yes | Uses the sidereal rotation period, mass and radius as default from the given body. Can be overwritten. | Not set (makes the first three parameters mandatory) |
pf | Yes | Multiplies the period with this value. Useful to easily calculate semi-synchronous orbits (pf=1/2 then). | 1 |