Difference between revisions of "Template:OrbitAltitude/Core"
From Kerbal Space Program Wiki
m (*replace 'Parameter Row' and 'ParameterRow' by 'Parameter row';) |
m (Use new mass template) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 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|{{{b}}} | + | <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 row|1|Period of the orbit in seconds}} | {{Parameter row|1|Period of the orbit in seconds}} | ||
{{Parameter row|2|Mass of central body in kilograms}} | {{Parameter row|2|Mass of central body in kilograms}} |
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 |