Difference between revisions of "Template:Infobox/Body"

From Kerbal Space Program Wiki
Jump to: navigation, search
(*removed some unneeded parameters;)
(+readd “parent”; !make two if statements working; -remove unused parameters; !show GSO only if sufficient data available; *show info if GSO is outside of SoI;)
Line 5: Line 5:
 
| colspan="2" style="text-align: center;" | <small>{{{Name|{{PAGENAME}}}}} as seen from orbit.</small>
 
| colspan="2" style="text-align: center;" | <small>{{{Name|{{PAGENAME}}}}} as seen from orbit.</small>
 
|-
 
|-
| colspan="2" style="text-align: center;" | <small>''[[{{{Class|??}}}]]''</small>
+
| colspan="2" style="text-align: center;" | <small>[[{{{Class|??}}}]]{{#if: {{{Parent|}}}|of {{{Parent}}}}}</small>
 
|-
 
|-
 
| colspan="2" | '''{{#switch:{{{1}}}
 
| colspan="2" | '''{{#switch:{{{1}}}
Line 36: Line 36:
 
|-
 
|-
 
| [[w:Surface Area|Surface Area]]
 
| [[w:Surface Area|Surface Area]]
| {{#if {{{radius|}}}|{{sigfigs|{{#expr: 4 * pi * {{{radius}}}^2}}|8}}|??}} m<sup>2</sup>
+
| {{#if: {{{radius|}}}|{{sigfigs|{{#expr: 4 * pi * {{{radius}}}^2}}|8}}|??}} m<sup>2</sup>
 
|-
 
|-
 
| [[w:Mass|Mass]]
 
| [[w:Mass|Mass]]
Line 48: Line 48:
 
|-
 
|-
 
| [[w:Surface_gravity|Surface Gravity]]
 
| [[w:Surface_gravity|Surface Gravity]]
| {{#if: {{{mass|}}}|{{#if {{{radius|}}}|{{sigfigs|{{#expr: {{{mass}}} * {{G}} / ({{{radius}}}^2)}}|3}}|??}}|??}} m/s<sup>2</sup>
+
| {{#if: {{{mass|}}}|{{#if: {{{radius|}}}|{{sigfigs|{{#expr: {{{mass}}} * {{G}} / ({{{radius}}}^2)}}|3}}|??}}|??}} m/s<sup>2</sup>
 
{{PlanetBoxRow|[[w:Escape_velocity|Escape Velocity]]                  <!--
 
{{PlanetBoxRow|[[w:Escape_velocity|Escape Velocity]]                  <!--
 
-->    |{{#expr: (2 * {{G}} * {{{mass|0}}} / {{{radius|1}}})^0.5 round2 }}|m/s}}
 
-->    |{{#expr: (2 * {{G}} * {{{mass|0}}} / {{{radius|1}}})^0.5 round2 }}|m/s}}
 
{{PlanetBoxRow|[[w:Rotation_period|Sidereal Rotation Period]]        |{{#if: {{{sidrot|}}}|{{sigfigs|{{{sidrot}}}|8}}|??}}|s}}
 
{{PlanetBoxRow|[[w:Rotation_period|Sidereal Rotation Period]]        |{{#if: {{{sidrot|}}}|{{sigfigs|{{{sidrot}}}|8}}|??}}|s}}
 
{{PlanetBoxRow|[[w:Sidereal_time|Sidereal Rotational Velocity]]      |{{#if: {{{sidrot|}}}|{{sigfigs|{{#expr: {{{radius}}} * 2 * pi / {{{sidrot}}}}}|5}}|??}}|m/s}}
 
{{PlanetBoxRow|[[w:Sidereal_time|Sidereal Rotational Velocity]]      |{{#if: {{{sidrot|}}}|{{sigfigs|{{#expr: {{{radius}}} * 2 * pi / {{{sidrot}}}}}|5}}|??}}|m/s}}
{{PlanetBoxRow|[[w:Synchronous_orbit|Synchronous Orbit]]              |{{#ifeq: {{{SoI}}}|N/A|N/A|<!--
+
{{PlanetBoxRow|[[w:Synchronous_orbit|Synchronous Orbit]]              |{{#if: {{{radius|}}}|{{#if: {{{mass|}}}|{{#if: {{{sidrot}}}|{{#ifeq: {{{SoI}}}|N/A|N/A|<!--
--> {{#ifexpr:    {{OrbitAltitude | radius_m={{{radius|1}}} | mass_kg={{{mass|9999999}}} | period_s={{{sidrot|9999999}}} | suffix= }} < {{{SoI|0}}} <!--
+
--> {{#ifexpr:    {{OrbitAltitude | radius_m={{{radius}}} | mass_kg={{{mass}}} | period_s={{{sidrot}}} | suffix= }} < {{{SoI|0}}} <!--
-->    |{{sigfigs|{{OrbitAltitude | radius_m={{{radius|1}}} | mass_kg={{{mass|9999999}}} | period_s={{{sidrot|9999999}}} | suffix= }}|8}} <!--
+
-->    |{{sigfigs|{{OrbitAltitude | radius_m={{{radius}}} | mass_kg={{{mass}}} | period_s={{{sidrot}}} | suffix= }}|8}} <!--
-->    |N/A<!--
+
-->    |Outside sphere of influence<!--
--> }}}} <!--
+
--> }}}}|??}}|??}}|??}} <!--
 
--> |m}}
 
--> |m}}
 
|-
 
|-
Line 86: Line 86:
 
== Dependencies ==
 
== Dependencies ==
 
Some values are calculated automatically:
 
Some values are calculated automatically:
* Radius: Surface Area, Density, Surface Gravity
+
* Radius: Surface Area, Density, Surface Gravity, Synchronous Orbit
* Mass: Gravitational Parameter, Density, Surface Gravity
+
* Mass: Gravitational Parameter, Density, Surface Gravity, Synchronous Orbit
* Sidereal Rotation Period: Sidereal Rotational Velocity
+
* Sidereal Rotation Period: Sidereal Rotational Velocity, Synchronous Orbit
 
* Scale Height: Atmospheric Height
 
* Scale Height: Atmospheric Height
  
Line 105: Line 105:
 
|anomaly=??
 
|anomaly=??
 
|orbps=??
 
|orbps=??
|orbph=??
 
 
|orbv=??
 
|orbv=??
 
|radius=??
 
|radius=??
 
|mass=??
 
|mass=??
 
|sidrot=??
 
|sidrot=??
|geosync=??
 
 
|SoI=??
 
|SoI=??
 
|atmosyorn=??
 
|atmosyorn=??

Revision as of 00:39, 16 February 2013

Infobox/Body
Planet image
Infobox/Body as seen from orbit.
??
Orbital Characteristics

Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow

Physical Characteristics
Equatorial Radius ?? m
Surface Area  ?? m2
Mass ?? kg
Gravitational Parameter ?? m3/s2
Density  ?? kg/m3
Surface Gravity  ?? m/s2

Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow

Sphere of Influence ?? m
Atmospheric Characteristics

Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow Template:PlanetBoxRow

Dependencies

Some values are calculated automatically:

  • 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.

Template

{{Planetbox
|Class=??
|File=??
|Parent=??
|smaxis=??
|apoap=??
|periap=??
|orbecc=??
|orbinc=??
|anomaly=??
|orbps=??
|orbv=??
|radius=??
|mass=??
|sidrot=??
|SoI=??
|atmosyorn=??
|atmoskPa=??
|atmosatm=??
|atmossh=??
|T-minC=??
|T-maxC=??
|O2yorn=??
}}