Difference between revisions of "Template:Infobox/Body"
From Kerbal Space Program Wiki
m (!avoid sqrt usage;) |
m (*better name for highest surface; !fix orbital velocity calculation;) |
||
Line 21: | Line 21: | ||
{{PlanetBoxRow|[[w:Orbital_Inclination|Orbital Inclination]] |{{{orbinc|??}}} |°}} | {{PlanetBoxRow|[[w:Orbital_Inclination|Orbital Inclination]] |{{{orbinc|??}}} |°}} | ||
{{PlanetBoxRow|[[w:Mean_Anomaly|Mean Anomaly]] |{{{anomaly|??}}}|°}} | {{PlanetBoxRow|[[w:Mean_Anomaly|Mean Anomaly]] |{{{anomaly|??}}}|°}} | ||
− | {{PlanetBoxRow|[[w:Orbital_Period|Orbital Period]] | + | {{PlanetBoxRow|[[w:Orbital_Period|Orbital Period]] |{{sigfigs| {{{orbps}}} |8}} |s}} |
− | {{PlanetBoxRow| | + | {{PlanetBoxRow| |{{sigfigs|{{#expr: {{{orbps}}} / 3600}}|8}} |hours}} |
− | {{PlanetBoxRow|[[w:Orbital_speed|Orbital Velocity]] |{{#ifeq: {{{apoap|}}}|{{{periap|}}}|{{#expr: 2*pi*{{{apoap}}}/{{{orbps}}} round 1}}|{{formatnum: {{#expr: pi*({{{apoap}}}+{{{periap}}})/{{{orbps}}}*({{{periap}}}/{{{apoap}}})^(0.5) round 1}}}} to {{formatnum: {{#expr: pi*({{{apoap}}}+{{{periap}}})/{{{orbps}}}*({{{apoap}}}/{{{periap}}})^(0.5) round 1 | + | {{PlanetBoxRow|[[w:Orbital_speed|Orbital Velocity]] |{{#ifeq: {{{apoap|}}}|{{{periap|}}}|{{#expr: 2*pi*{{{apoap}}}/{{{orbps}}} round 1}}|{{formatnum: {{#expr: pi*({{{apoap}}}+{{{periap}}})/{{{orbps}}}*({{{periap}}}/{{{apoap}}})^(0.5) round 1}}}} to {{formatnum: {{#expr: pi*({{{apoap}}}+{{{periap}}})/{{{orbps}}}*({{{apoap}}}/{{{periap}}})^(0.5) round 1}}}}}} |m/s}}| |
}} | }} | ||
|- | |- | ||
Line 64: | Line 64: | ||
|{{#ifeq: {{{SoI|}}}|∞|∞|{{#if: {{{SoI|}}}|{{sigfigs|{{{SoI}}}|8}}|??}} m}} | |{{#ifeq: {{{SoI|}}}|∞|∞|{{#if: {{{SoI|}}}|{{sigfigs|{{{SoI}}}|8}}|??}} m}} | ||
|- | |- | ||
− | {{#if: {{{highest|} | + | {{#if: {{{highest|}}}|{{!}} Highest elevation {{!}}{{!}} {{{highest|??}}} m}} |
|- | |- | ||
| colspan="2" | '''{{#switch:{{{1}}} | | colspan="2" | '''{{#switch:{{{1}}} |
Revision as of 15:43, 18 February 2013
Dependencies
Some values are calculated automatically:
- Periapsis: Semi-major axis, Orbital eccentricity, Orbital velocity
- Apoapsis: Semi-major axis, Orbital eccentricity, Orbital velocity
- Orbital period: Orbital velocity
- Radius: Surface Area, Density, Surface Gravity, Synchronous Orbit
- Mass: Gravitational Parameter, Density, Surface Gravity, Synchronous Orbit
- Sidereal Rotation Period: Sidereal Rotational Velocity, Synchronous Orbit
- Scale Height: Atmospheric Height
It will also calculate the Atmospheric Pressure from atm to kPa and vice versa. If the periapsis isn't defined it will assume a circular orbit where the apoapsis is identical to the periapsis.
To deactivate orbital information (for example Kerbol) set {{{orbityorn}}} to no. The atmospheric information can be hidden when {{{atmosyorn}}} is set to no. On all other values it will show the atmospheric entries.
Template
{{Planetbox |Class=?? |File=?? |Parent=?? |orbityorn=?? |apoap=?? |periap=?? |orbinc=?? |anomaly=?? |orbps=?? |radius=?? |mass=?? |sidrot=?? |SoI=?? |highest=?? |atmosyorn=?? |atmoskPa=?? |atmosatm=?? |atmossh=?? |T-minC=?? |T-maxC=?? |O2yorn=?? }}
Example
Example used on this page:
{{Planetbox |Class=Planet |File=Image-needed.png |Parent=Gilly |orbityorn=yes |apoap=1337000 |periap=470000 |orbinc=7.4 |anomaly=4.2 |orbps=36000 |radius=10000 |mass=1e20 |sidrot=3600 |SoI=200000 |highest=2357 |atmosyorn=yes |atmosatm=1 |atmossh=3000 |T-minC=-42 |T-maxC=47 |O2yorn=no }}