Difference between revisions of "Template:Infobox/Body"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (Fix stray brace.)
(*calculate orbital period via semi-major axis and mass of the parent body; -orbityorn as Parent not set imply this;)
Line 7: Line 7:
 
| colspan="2" style="text-align: center;" | [[{{{Class|??}}}]] {{#if: {{{Parent|}}}|of [[{{{Parent}}}]]}}
 
| colspan="2" style="text-align: center;" | [[{{{Class|??}}}]] {{#if: {{{Parent|}}}|of [[{{{Parent}}}]]}}
 
|-
 
|-
{{#ifeq: {{{orbityorn|yes}}}|no||
+
{{#if: {{{Parent|}}}
 
{{!}} colspan="2" {{!}} '''{{#switch:{{{1}}}
 
{{!}} colspan="2" {{!}} '''{{#switch:{{{1}}}
 
|=Orbital Characteristics
 
|=Orbital Characteristics
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]]            |{{sigfigs| {{{orbps}}} |8}}|s|f}}
+
{{PlanetBoxRow|[[w:Orbital_Period|Orbital Period]]            |{{sigfigs| {{#expr: {{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}} round 1 }} |8}}|s|f}}
 
{{!}}-
 
{{!}}-
{{!}}{{!}} {{!}}{{!}} <small>{{ExpandTime|{{{orbps}}}}}</small>
+
{{!}}{{!}} {{!}}{{!}} <small>{{ExpandTime|{{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}}}}</small>
{{PlanetBoxRow|[[w:Orbital_speed|Orbital Velocity]]        |{{#ifeq: {{{apoap|}}}|{{{periap|{{{apoap|}}}}}}|{{#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}}|
+
{{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 90: Line 90:
 
|File=Image-needed.png
 
|File=Image-needed.png
 
|Parent=Gilly
 
|Parent=Gilly
|orbityorn=yes
 
 
|apoap=1337000
 
|apoap=1337000
 
|periap=470000
 
|periap=470000
 
|orbinc=7.4
 
|orbinc=7.4
 
|anomaly=4.2
 
|anomaly=4.2
|orbps=36000
 
 
|radius=10000
 
|radius=10000
 
|mass=1e20
 
|mass=1e20
Line 122: Line 120:
 
If the periapsis isn't defined it will assume a circular orbit where the apoapsis is identical to the periapsis.
 
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 <tt><nowiki>{{{orbityorn}}}</nowiki></tt> to <tt>no</tt>. The atmospheric information can be hidden when <tt><nowiki>{{{atmosyorn}}}</nowiki></tt> is set to <tt>no</tt>. On all other values it will show the atmospheric entries.
+
To deactivate orbital information (for example [[Kerbol]]) don't set <tt><nowiki>{{{Parent}}}</nowiki></tt>. The atmospheric information can be hidden when <tt><nowiki>{{{atmosyorn}}}</nowiki></tt> is set to <tt>No</tt>. On all other values it will show the atmospheric entries.
  
 
== Parameters ==
 
== Parameters ==
Line 140: Line 138:
 
| <tt>Parent</tt>
 
| <tt>Parent</tt>
 
| Yes
 
| Yes
| Object which this object does orbit. Default: Not set
+
| Object which this object does orbit. If net set it hides the orbital information. Default: Not set
|-
 
| <tt>orbityorn</tt>
 
| Yes
 
| Does this object orbit another object (usually when Parent is set). '''no''' to hide. Default: Yes
 
 
|-
 
|-
 
| style="padding-left:2em" | <tt>apoap</tt>
 
| style="padding-left:2em" | <tt>apoap</tt>
Line 161: Line 155:
 
| No
 
| No
 
| Mean anomaly in degrees
 
| Mean anomaly in degrees
|-
 
| style="padding-left:2em" | <tt>orbps</tt>
 
| No
 
| Orbital period in seconds
 
 
|-
 
|-
 
| <tt>radius</tt>
 
| <tt>radius</tt>
Line 212: Line 202:
  
 
== Template ==
 
== Template ==
<pre><nowiki>{{Planetbox
+
<pre>{{Planetbox
|Class=?? <!-- Star, Planet, Dwarf Planet, Moon -->
+
|Class=??
 
|File=??
 
|File=??
 
|Parent=??  
 
|Parent=??  
|orbityorn=??
+
|apoap=??
|apoap=?? <!-- in meters -->
+
|periap=??
|periap=?? <!-- in meters -->
+
|orbinc=??
|orbinc=?? <!-- in degrees -->
+
|anomaly=??
|anomaly=?? <!-- in degrees -->
+
|radius=??
|orbps=?? <!-- in seconds -->
+
|mass=??
|radius=?? <!-- in meters -->
+
|sidrot=??
|mass=?? <!-- in kilograms -->
+
|SoI=??
|sidrot=?? <!-- in seconds -->
+
|highest=??
|SoI=?? <!-- in meters -->
 
|highest=?? <!-- in meters (optional) -->
 
 
|atmosyorn=??
 
|atmosyorn=??
 
|atmosatm=??
 
|atmosatm=??
Line 233: Line 221:
 
|T-maxC=??
 
|T-maxC=??
 
|O2yorn=??
 
|O2yorn=??
}}</nowiki></pre>
+
}}</pre>
  
 
== Example ==
 
== Example ==
Line 242: Line 230:
 
|File=Image-needed.png
 
|File=Image-needed.png
 
|Parent=Gilly
 
|Parent=Gilly
|orbityorn=yes
 
 
|apoap=1337000
 
|apoap=1337000
 
|periap=470000
 
|periap=470000

Revision as of 23:33, 20 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.

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
Class No Class of celestial object: Star, Planet, Dwarf Planet or Moon
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
mass No Mass in kilograms
sidrot No Siderial period in seconds
SoI No Sphere of influence in meters. Special value: ∞
highest Yes Highest elevation in meters. Default: Not set
atmosyorn Yes Does this celestial object have a atmosphere? No to hide. Default: Yes
atmosatm No Atmospheric pressure in atm.
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
|Class=??
|File=??
|Parent=?? 
|apoap=??
|periap=??
|orbinc=??
|anomaly=??
|radius=??
|mass=??
|sidrot=??
|SoI=??
|highest=??
|atmosyorn=??
|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
|mass=1e20
|sidrot=3600
|SoI=200000
|highest=2357
|atmosyorn=yes
|atmosatm=1
|atmossh=3000
|T-minC=-42
|T-maxC=47
|O2yorn=no
}}