Difference between revisions of "Template:Infobox/Body"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (!show Yes when atmosphere is present;)
(-atmosyorn left overs; +Name in template; !place period captions before both values;)
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]]            |{{#expr: {{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}} round 1 }} |s|f}}
 
 
{{!}}-
 
{{!}}-
{{!}}{{!}} {{!}}{{!}} <small>{{ExpandTime|{{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}}}}</small>
+
{{!}} valign="top" rowspan="2" {{!}} [[w:Orbital_Period|Orbital Period]]
 +
{{!}} {{formatnum: {{#expr: {{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}} round 1 }}}} s
 +
{{!}}-
 +
{{!}} <small>{{ExpandTime|{{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}}}}</small>
 
{{PlanetBoxRow|[[w:Orbital_speed|Orbital Velocity]]        |{{#ifeq: {{{apoap|}}}|{{{periap|{{{apoap|}}}}}}|{{#expr: 2*pi*{{{apoap}}}/{{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}} round 1}}|{{formatnum: {{#expr: pi*({{{apoap}}}+{{{periap}}})/{{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}}*({{{periap}}}/{{{apoap}}})^(0.5) round 1}}}} to {{formatnum: {{#expr: pi*({{{apoap}}}+{{{periap}}})/{{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}}*({{{apoap}}}/{{{periap}}})^(0.5) round 1}}}}}}  |m/s}}|
 
{{PlanetBoxRow|[[w:Orbital_speed|Orbital Velocity]]        |{{#ifeq: {{{apoap|}}}|{{{periap|{{{apoap|}}}}}}|{{#expr: 2*pi*{{{apoap}}}/{{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}} round 1}}|{{formatnum: {{#expr: pi*({{{apoap}}}+{{{periap}}})/{{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}}*({{{periap}}}/{{{apoap}}})^(0.5) round 1}}}} to {{formatnum: {{#expr: pi*({{{apoap}}}+{{{periap}}})/{{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}}*({{{apoap}}}/{{{periap}}})^(0.5) round 1}}}}}}  |m/s}}|
 
}}
 
}}
Line 54: Line 56:
 
{{PlanetBoxRow|[[w:Escape_velocity|Escape Velocity]]                  <!--
 
{{PlanetBoxRow|[[w:Escape_velocity|Escape Velocity]]                  <!--
 
-->    |{{#expr: (2 * {{G}} * {{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} / {{{radius|1}}})^0.5 round2 }}|m/s}}
 
-->    |{{#expr: (2 * {{G}} * {{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} / {{{radius|1}}})^0.5 round2 }}|m/s}}
{{PlanetBoxRow|[[w:Rotation_period|Sidereal Rotation Period]]         |{{sigfigs|{{{sidrot}}}|8}}|s}}
+
|-
{{!}}-
+
| valign="top" rowspan="2" | [[w:Rotation_period|Sidereal Rotation Period]]
{{!}}{{!}} {{!}}{{!}} <small>{{ExpandTime|{{{sidrot}}}}}</small>
+
| {{sigfigs|{{{sidrot}}}|8}} s
 +
|-
 +
| <small>{{formatnum: {{ExpandTime|{{{sidrot}}}}}}}</small>
 
{{PlanetBoxRow|[[w:Sidereal_time|Sidereal Rotational Velocity]]      |{{sigfigs|{{#expr: {{{radius}}} * 2 * pi / {{{sidrot}}}}}|5}}|m/s}}
 
{{PlanetBoxRow|[[w:Sidereal_time|Sidereal Rotational Velocity]]      |{{sigfigs|{{#expr: {{{radius}}} * 2 * pi / {{{sidrot}}}}}|5}}|m/s}}
 
{{PlanetBoxRow|[[w:Synchronous_orbit|Synchronous Orbit]]              |{{#if: {{#ifeq: {{{SoI}}}|∞|1}}{{#ifexpr: {{OrbitAltitude | radius_m={{{radius}}} | mass_kg={{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} | period_s={{{sidrot}}} | suffix= }} < {{{SoI}}}|1}}|{{sigfigs|{{OrbitAltitude | radius_m={{{radius}}} | mass_kg={{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} | period_s={{{sidrot}}} | suffix=  }}|8}} m|Outside sphere of influence}}}}
 
{{PlanetBoxRow|[[w:Synchronous_orbit|Synchronous Orbit]]              |{{#if: {{#ifeq: {{{SoI}}}|∞|1}}{{#ifexpr: {{OrbitAltitude | radius_m={{{radius}}} | mass_kg={{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} | period_s={{{sidrot}}} | suffix= }} < {{{SoI}}}|1}}|{{sigfigs|{{OrbitAltitude | radius_m={{{radius}}} | mass_kg={{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} | period_s={{{sidrot}}} | suffix=  }}|8}} m|Outside sphere of influence}}}}
Line 96: Line 100:
 
|SoI=200000
 
|SoI=200000
 
|highest=2357
 
|highest=2357
|atmosyorn=Yes
 
 
|atmosatm=1
 
|atmosatm=1
 
|atmossh=3000
 
|atmossh=3000
Line 196: Line 199:
 
== Template ==
 
== Template ==
 
<pre>{{Planetbox
 
<pre>{{Planetbox
|Class=??
+
|Name=
|File=??
+
|Class=
|Parent=??
+
|File=
|apoap=??
+
|Parent=  
|periap=??
+
|apoap=
|orbinc=??
+
|periap=
|anomaly=??
+
|orbinc=
|radius=??
+
|anomaly=
|sidrot=??
+
|radius=
|SoI=??
+
|sidrot=
|highest=??
+
|SoI=
|atmosyorn=??
+
|highest=
|atmosatm=??
+
|atmosatm=
|atmossh=??
+
|atmossh=
|T-minC=??
+
|T-minC=
|T-maxC=??
+
|T-maxC=
|O2yorn=??
+
|O2yorn=
 
}}</pre>
 
}}</pre>
  
Line 230: Line 233:
 
|SoI=200000
 
|SoI=200000
 
|highest=2357
 
|highest=2357
|atmosyorn=yes
 
 
|atmosatm=1
 
|atmosatm=1
 
|atmossh=3000
 
|atmossh=3000

Revision as of 13:23, 25 February 2013

Template:Planetbox

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
  • Atmospheric pressure (in atm): Atmospheric pressure (in kPa)

If the periapsis isn't defined it will assume a circular orbit where the apoapsis is identical to the periapsis. For the mass it uses {{CelestialBodyMass}}

To deactivate orbital information (for example Kerbol) don't set {{{Parent}}}. The atmospheric information can be hidden when {{{atmosyorn}}} is set to No. On all other values it will show the atmospheric entries.

Parameters

Name Optional Description
Name Yes Name of celestial body. Used to determine mass. Default: {{BASEPAGENAME}}
Class No Class of celestial body
File No Filename to image of the celestial object
Parent Yes Object which this object does orbit. If net set it hides the orbital information. Default: Not set
apoap No Apoapsis in meters
periap Yes Periapsis in meters. Default: Apoapsis
orbinc No Orbital inclination in degrees.
anomaly No Mean anomaly in degrees
radius No Radius in meters
sidrot No Siderial period in seconds
SoI No Sphere of influence in meters. Special value: ∞
highest Yes Highest elevation in meters. Default: Not set
atmosatm Yes Atmospheric pressure in atm. If this celestial body doesn't have an atmosphere don't set this value. Default: Not set
atmossh No Atmospheric scale height in meters
T-minC No Lowest temperature in degrees celsius
T-maxC No Highest temperature in degrees celsius
O2yorn No Is oxygen present?

Template

{{Planetbox
|Name=
|Class=
|File=
|Parent= 
|apoap=
|periap=
|orbinc=
|anomaly=
|radius=
|sidrot=
|SoI=
|highest=
|atmosatm=
|atmossh=
|T-minC=
|T-maxC=
|O2yorn=
}}

Example

Example used on this page:

{{Planetbox
|Class=Planet
|File=Image-needed.png
|Parent=Gilly
|apoap=1337000
|periap=470000
|orbinc=7.4
|anomaly=4.2
|orbps=36000
|radius=10000
|sidrot=3600
|SoI=200000
|highest=2357
|atmosatm=1
|atmossh=3000
|T-minC=-42
|T-maxC=47
|O2yorn=no
}}

Translating

At the moment only the captions of each “subsection” (like “Orbital Characteristics”) are translated. For each column description (like “Semi-Major Axis“) it is a little more complex but they will be implemented.