Difference between revisions of "Template:Infobox/Body"

From Kerbal Space Program Wiki
Jump to: navigation, search
(-atmosyorn left overs; +Name in template; !place period captions before both values;)
(Fixed bug: All bodies show synchronous orbit, even when it is outside SOI)
 
(333 intermediate revisions by 34 users not shown)
Line 1: Line 1:
<includeonly><div style="background: #f6f6f6; border: 1px solid #ccc; float: right; width: 280px; margin-left: 1em">
+
<includeonly>{{Infobox|width=280
<div style="background: #ccc; font-size: large; padding: .5em; text-align: center">{{{Name|{{BASEPAGENAME}}}}}</div>
+
|name={{{transcription|{{Body data/Name|{{{name|{{BASEPAGENAME}}}}}}}}}}
<div style="background: #000">[[File:{{{File|Image-needed.png}}}|280px|Planet image]]</div>
+
{{#if: {{{transcription|}}}{{#ifeq: {{Body data/Name|{{{name|{{BASEPAGENAME}}}}}}}|{{{name|{{BASEPAGENAME}}}}}||1}}|({{{name|{{BASEPAGENAME}}}}})}}
{| style="padding: 0.5em; font-size: 90%"
+
|file={{Body data|{{{name|{{BASEPAGENAME}}}}}|file}}
| colspan="2" style="text-align: center; width: 100%;" | <small>{{{Name|{{BASEPAGENAME}}}}} as seen from orbit.</small>
+
|file style=background:black
|-
+
|notes={{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}|<references group="Note">
| colspan="2" style="text-align: center;" | [[{{{Class|??}}}]] {{#if: {{{Parent|}}}|of [[{{{Parent}}}]]}}
+
<ref name="centered">{{Infobox/Body/Dict|note}}</ref></references>}}
|-
+
|lines=
{{#if: {{{Parent|}}}|
+
{{Infobox/Line|{{lang
{{!}} colspan="2" {{!}} '''{{#switch:{{lang}}
+
|en={{{name|{{BASEPAGENAME}}}}} as seen from orbit.
|=Orbital Characteristics
+
|de={{{name|{{BASEPAGENAME}}}}} vom Orbit aus gesehen.
|ru=Орбитальные характеристики
+
|es={{{name|{{BASEPAGENAME}}}}} como se ve desde la órbita.
|nl=Baan Eigenschappen
+
|fr=La planète {{{name|{{BASEPAGENAME}}}}} vue depuis l'orbite.
|fr=Caractéristiques Orbitales
+
|hr=Pogled na {{{name|{{BASEPAGENAME}}}}} iz orbite.
|#default=Orbital Characteristics
+
|hu={{{name|{{BASEPAGENAME}}}}} a pályáról nézve
}}'''
+
|it={{{name|{{BASEPAGENAME}}}}} visto dall'orbita
{{PlanetBoxRow|[[w:Semi-major axis|Semi-Major Axis]]          |{{#expr: ({{{apoap}}} + {{{periap|{{{apoap}}}}}})/2}} |m|f}}
+
|ja=軌道からみた{{Body data/Name|{{{name|{{BASEPAGENAME}}}}}}}
{{PlanetBoxRow|[[w:Apoapsis|Apoapsis]]                        |{{{apoap}}} |m|f}}
+
|ko={{Body data/Name|{{{name|{{BASEPAGENAME}}}}}}} 을 궤도에서 바라본 모습이다.
{{PlanetBoxRow|[[w:Periapsis|Periapsis]]                      |{{{periap|{{{apoap}}}}}} |m|f}}
+
|nl={{{name|{{BASEPAGENAME}}}}} gezien vanuit de ruimte.
{{PlanetBoxRow|[[w:Orbital_eccentricity|Orbital Eccentricity]]|{{#expr: 1-2/({{{apoap}}}/{{{periap|{{{apoap}}}}}}+1) round 2}} |}}
+
|pl={{{name|{{BASEPAGENAME}}}}} widok z orbity.
{{PlanetBoxRow|[[w:Orbital_Inclination|Orbital Inclination]]  |{{{orbinc}}} }}
+
|pt={{{name|{{BASEPAGENAME}}}}} visto de uma órbita
{{PlanetBoxRow|[[w:Mean_Anomaly|Mean Anomaly]]                |{{{anomaly}}}|°}}
+
|ru={{Body data/Name|{{{name|{{BASEPAGENAME}}}}}}} - вид с орбиты.
{{!}}-
+
|tr=Uzaydan görünen haliyle {{{name|{{BASEPAGENAME}}}}}
{{!}} valign="top" rowspan="2" {{!}} [[w:Orbital_Period|Orbital Period]]
+
|zh-cn=从轨道上看{{{name|{{BASEPAGENAME}}}}}
{{!}} {{formatnum: {{#expr: {{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}} round 1 }}}} s
+
}}|style=text-align: center; font-size:smaller;}}
{{!}}-
+
{{Infobox/Line|[[{{Body data|{{{name|{{BASEPAGENAME}}}}}|class}}{{if lang}}|{{#switch: {{Body data|{{{name|{{BASEPAGENAME}}}}}|class}}
{{!}} <small>{{ExpandTime|{{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}}}}</small>
+
|Star={{Celestial/Dict|Star}}
{{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}}|
+
|Planet={{Celestial/Dict|Planet}}
}}
+
|Dwarf planet={{Celestial/Dict|Dwarf}}
|-
+
|Moon={{Celestial/Dict|Moon}}
| colspan="2" | '''{{#switch:{{lang}}
+
|#default={{Body data|{{{name|{{BASEPAGENAME}}}}}|class}}[[Category:Infobox/Body with unrecognized class]]
|=Physical Characteristics
+
}}]] {{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}|{{Infobox/Body/Dict|of}} [[{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}{{if lang}}|{{Celestial/Dict|{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}}}]]
|ru=
+
}}|style=text-align: center;}}
|nl=Fysieke Eigenschappen
+
{{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}|
|fr=Caractéristiques Physiques
+
{{Infobox/Line|'''{{Infobox/Body/Dict|orbital}}'''}}
|#default=Physical Characteristics
+
{{Infobox/Line|{{Infobox/Body/Dict|sma}}
}}'''
+
|2=<span style="white-space:nowrap;">{{formatnum|{{Body data|{{{name|{{BASEPAGENAME}}}}}|semi-major axis}}}}&nbsp;{{Dict|m}} <ref name="centered" group="Note" /></span>}}
|-
+
{{Infobox/Line|{{Infobox/Body/Dict|apo}}
| [[w:Radius|Equatorial Radius]]
+
|2=<span style="white-space:nowrap;">{{formatnum|{{#expr: {{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} round 1}}}}&nbsp;{{Dict|m}} <ref name="centered" group="Note" /></span>}}
| {{formatnum: {{{radius}}}}} m
+
{{Infobox/Line|{{Infobox/Body/Dict|per}}
|-
+
|2=<span style="white-space:nowrap;">{{formatnum|{{#expr: {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}} round 1}}}}&nbsp;{{Dict|m}} <ref name="centered" group="Note" /></span>}}
| [[w:Surface Area|Surface Area]]
+
{{Infobox/Line|{{Infobox/Body/Dict|ecc}}
| {{sigfigs|{{#expr: 4 * pi * {{{radius}}}^2}}|8}} m<sup>2</sup>
+
|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|eccentricity}} round 3}}}}
|-
+
{{Infobox/Line|{{Infobox/Body/Dict|inc}}
| [[w:Mass|Mass]]
+
|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|orbinc}} round 3 }}&nbsp;°}}
| {{sigfigs|{{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}}|8}} kg
+
{{Infobox/Line|{{Infobox/Body/Dict|pe arg}}
|-
+
|{{Body data|{{{name|{{BASEPAGENAME}}}}}|pe arg}}&nbsp;°}}
| [[w:Standard gravitational parameter|Gravitational Parameter]]
+
{{Infobox/Line|{{Infobox/Body/Dict|an arg}}
| {{sigfigs|{{#expr: {{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} * {{G}}}}|8}} m<sup>3</sup>/s<sup>2</sup>
+
|{{Body data|{{{name|{{BASEPAGENAME}}}}}|an arg}}&nbsp;°}}
|-
+
{{Infobox/Line|{{Infobox/Body/Dict|anomaly}}
| [[w:Density|Density]]
+
|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|anomaly}} round 3}}&nbsp;{{Dict|rad}} <small>({{Infobox/Body/Dict|at}})</small>}}
| {{sigfigs|{{#expr: {{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} / (4 * pi * {{{radius}}}^3 / 3)}}|8}} kg/m<sup>3</sup>
+
{{Infobox/Line|{{Infobox/Body/Dict|period}}
|-
+
|{{formatnum|{{#expr: {{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}} round 1 }}}}&nbsp;{{Dict|s}}
| [[w:Surface_gravity|Surface Gravity]]
+
|<small>{{ExpandTime|{{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}}}}</small>}}
| {{sigfigs|{{#expr: {{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} * {{G}} / ({{{radius}}}^2)}}|3}} m/s<sup>2</sup>
+
{{Infobox/Line|{{Infobox/Body/Dict|synodic}}
{{PlanetBoxRow|[[w:Escape_velocity|Escape Velocity]]                  <!--
+
|{{#ifeq: {{{name|{{BASEPAGENAME}}}}}|Kerbin|''{{Infobox/Body/Dict|undefined}}''|{{formatnum|{{#expr: {{OrbitSynodicPeriod|{{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}}|{{#ifeq: {{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}|Kerbol|{{Body data/Sidereal orbit|Kerbin}}|{{Body data/Sidereal orbit|{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}}}}}}} round 1 }}|1}}&nbsp;{{Dict|s}}
-->    |{{#expr: (2 * {{G}} * {{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} / {{{radius|1}}})^0.5 round2 }}|m/s}}
+
|<small>{{#ifeq: {{{name|{{BASEPAGENAME}}}}}|Kerbin||{{ExpandTime|{{OrbitSynodicPeriod|{{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}}|{{#ifeq: {{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}|Kerbol|{{Body data/Sidereal orbit|Kerbin}}|{{Body data/Sidereal orbit|{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}}}}}}}}}</small>}}}}}}
|-
+
{{Infobox/Line|{{Infobox/Body/Dict|velocity}}
| valign="top" rowspan="2" | [[w:Rotation_period|Sidereal Rotation Period]]
+
|{{#ifeq: {{Body data|{{{name|{{BASEPAGENAME}}}}}|eccentricity}}|0|{{formatnum|{{#expr: 2 * pi * {{Body data|{{{name|{{BASEPAGENAME}}}}}|semi-major axis}} / {{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}} round 1 }}}}|{{formatnum|{{#expr: 2 * pi * {{Body data|{{{name|{{BASEPAGENAME}}}}}|semi-major axis}} / {{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}} * ((1 - {{Body data|{{{name|{{BASEPAGENAME}}}}}|eccentricity}}) / (1 + {{Body data|{{{name|{{BASEPAGENAME}}}}}|eccentricity}}))^(0.5) round 1 }}}} - {{formatnum|{{#expr: 2 * pi * {{Body data|{{{name|{{BASEPAGENAME}}}}}|semi-major axis}} / {{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}} * ((1 + {{Body data|{{{name|{{BASEPAGENAME}}}}}|eccentricity}}) / (1 - {{Body data|{{{name|{{BASEPAGENAME}}}}}|eccentricity}}))^(0.5) round 1 }}}}}}&nbsp;{{Dict|m}}/{{Dict|s}}}}
| {{sigfigs|{{{sidrot}}}|8}} s
+
{{#ifeq: {{Body data|{{{name|{{BASEPAGENAME}}}}}|class}}|Moon|{{Infobox/Line|{{Infobox/Body/Dict|eclipsed}}
|-
+
|{{formatnum|{{#expr: ceil(((2 * (({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} + {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}}) / 2) * (({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} * {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}})^0.5)) / ((((2 * {{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} * {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}}) / ({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} + {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}})) * ({{G}} * {{Body data/Mass|{{{name|{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}}}}}}))^0.5)) * ((asin({{Body data|{{{name|{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}}}}|radius}} / (({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} * {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}})^0.5))) + (((({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} - {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}}) / ({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} + {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}})) * {{Body data|{{{name|{{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}}}}|radius}}) / (({{Body data/Apoapsis|{{{name|{{BASEPAGENAME}}}}}}} * {{Body data/Periapsis|{{{name|{{BASEPAGENAME}}}}}}})^0.5))))}}}}&nbsp;{{Dict|s}}}}}}}}
| <small>{{formatnum: {{ExpandTime|{{{sidrot}}}}}}}</small>
+
{{Infobox/Line|'''{{Infobox/Body/Dict|physical}}'''}}
{{PlanetBoxRow|[[w:Sidereal_time|Sidereal Rotational Velocity]]      |{{sigfigs|{{#expr: {{{radius}}} * 2 * pi / {{{sidrot}}}}}|5}}|m/s}}
+
{{Infobox/Line|{{Infobox/Body/Dict|radius}}
{{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}}}}
+
|{{formatnum|{{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}}}}&nbsp;{{Dict|m}}}}
|-
+
{{Infobox/Line|{{Infobox/Body/Dict|circumference}}
| [[w:Sphere_of_influence_(astrodynamics)|Sphere of Influence]]
+
|{{formatnum|{{#expr: 2 * pi * {{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}}}}}}&nbsp;{{Dict|m}}}}
| {{#ifeq: {{{SoI|}}}|∞|∞|{{sigfigs|{{{SoI}}}|8}} m}}
+
{{Infobox/Line|{{Infobox/Body/Dict|area}}
|-
+
|{{sigfigs|{{#expr: 4 * pi * {{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}}^2}}|8}}&nbsp;{{Dict|m}}<sup>2</sup>}}
{{#if: {{{highest|}}}|{{!}} Highest elevation {{!}}{{!}} {{{highest}}} m}}
+
{{Infobox/Line|{{Infobox/Body/Dict|mass}}
|-
+
|{{sigfigs|{{Body data/Mass|{{{name|{{BASEPAGENAME}}}}}}}|8}}&nbsp;{{Dict|k}}{{Dict|g}}}}
| colspan="2" | '''{{#switch:{{lang}}
+
{{Infobox/Line|{{Infobox/Body/Dict|gravpar}}
|=Atmospheric Characteristics
+
|{{sigfigs|{{#expr: {{Body data/Mass|{{{name|{{BASEPAGENAME}}}}}}} * {{G}}}}|8}}&nbsp;{{Dict|m}}<sup>3</sup>/{{Dict|s}}<sup>2</sup>}}
|ru=
+
{{Infobox/Line|{{Infobox/Body/Dict|density}}
|nl=Atmosferische Eigenschappen
+
|{{sigfigs|{{#expr: {{Body data/Mass|{{{name|{{BASEPAGENAME}}}}}}} / (4 * pi * {{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}}^3 / 3)}}|8}}&nbsp;{{Dict|k}}{{Dict|g}}/{{Dict|m}}<sup>3</sup>}}
|fr=Caractéristiques Atmosphériques
+
{{Infobox/Line|{{Infobox/Body/Dict|gravity}}
|#default=Atmospheric Characteristics
+
|{{sigfigs|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|gravity gees}} * 9.80665}}|3}}&nbsp;{{Dict|m}}/{{Dict|s}}<sup>2</sup> <small>({{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|gravity gees}} round 3 }}&nbsp;''{{Dict|g}}'')</small>}}
}}'''
+
{{Infobox/Line|{{Infobox/Body/Dict|escape}}
{{PlanetBoxRow|[[w:atmosphere|Atmosphere Present]]                    |{{#if: {{{atmosatm|}}}|Yes|No}}|}}
+
|{{formatnum|{{#expr: (2 * {{G}} * {{Body data/Mass|{{{name|{{BASEPAGENAME}}}}}}} / {{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}})^0.5}}|2}}&nbsp;{{Dict|m}}/{{Dict|s}}}}
{{#if: {{{atmosatm|}}}|
+
{{Infobox/Line|{{Infobox/Body/Dict|rotation}}
{{PlanetBoxRow|[[w:Atmospheric_pressure|Atmospheric Pressure]]        |{{sigfigs|{{#expr: {{{atmosatm}}} * 101.327}}|3}} |kPa}}
+
|{{sigfigs|{{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}}|8}}&nbsp;{{Dict|s}}
{{PlanetBoxRow|                                                       |{{{atmosatm}}} |atm}}
+
|<small>{{ExpandTime|{{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}}}}</small>}}
{{PlanetBoxRow|[[w:Scale_height|Scale Height]]                        |{{{atmossh}}} |m}}
+
{{#ifeq: {{Body data|{{{name|{{BASEPAGENAME}}}}}|parent}}|Kerbol|
{{PlanetBoxRow|[[w:Atmospheric_height|Atmospheric Height]]            |{{sigfigs|{{#expr: ln1e-6 * -{{{atmossh|}}}}}|8}} |m}}
+
{{Infobox/Line|{{Infobox/Body/Dict|solar}}
{{#if: T-minC|{{PlanetBoxRow|[[w:Atmospheric_temperature|Temperature<sub>min</sub>]]|{{{T-minC|??}}} °C <small>{{#expr: {{{T-minC}}} + 273.15}}|??}} K</small>}}
+
|{{sigfigs|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}} / (1 - {{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}} / {{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}})}}|8}}&nbsp;{{Dict|s}}|<small>{{ExpandTime|({{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}} / (1 - {{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}} / {{Body data/Sidereal orbit|{{{name|{{BASEPAGENAME}}}}}}}))}}</small>}}}}
{{#if: T-maxC|{{PlanetBoxRow|[[w:Atmospheric_temperature|Temperature<sub>max</sub>]]|{{{T-maxC|??}}} °C <small>{{#expr: {{{T-maxC}}} + 273.15}}|??}} K</small>}}
+
{{Infobox/Line|{{Infobox/Body/Dict|sidereal}}
{{PlanetBoxRow|[[w:Oxygen|Oxygen Present]]                            |{{{O2yorn}}}   |}}
+
|{{sigfigs|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}} * 2 * pi / {{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}}}}|5}}&nbsp;{{Dict|m}}/{{Dict|s}}}}
}}
+
{{Infobox/Line|{{Infobox/Body/Dict|sync}}
|}
+
|{{#if: {{#ifexpr: {{OrbitAltitude/Core|{{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}}|{{Body data/Mass|{{{name|{{BASEPAGENAME}}}}}}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}}}} < {{Body data/SOI|{{{name|{{BASEPAGENAME}}}}}}}|1}}|{{OrbitAltitude | radius={{Body data|{{{name|{{BASEPAGENAME}}}}}|radius}} | mass={{Body data/Mass|{{{name|{{BASEPAGENAME}}}}}}} | period={{Body data|{{{name|{{BASEPAGENAME}}}}}|sidrot}}|factor=k}}|{{Infobox/Body/Dict|outside}}}}}}
</div></includeonly><noinclude>
+
{{Infobox/Line|{{Infobox/Body/Dict|soi}}
{{Planetbox
+
|{{#if: {{Body data/SOI|{{{name|{{BASEPAGENAME}}}}}}}|<span style="white-space:nowrap;">{{sigfigs|{{Body data/SOI|{{{name|{{BASEPAGENAME}}}}}}}|8}}&nbsp;{{Dict|m}} <ref name="centered" group="Note" /></span>|∞}}}}
|Class=Planet
+
{{Infobox/Line|'''{{Infobox/Body/Dict|atmospheric}}'''}}
|File=Image-needed.png
+
{{Infobox/Line|{{Infobox/Body/Dict|atmo}}
|Parent=Gilly
+
|{{#ifexpr: {{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}}|0}} > 0|{{Yes}}|{{No}}}}}}
|apoap=1337000
+
{{#ifexpr: {{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}}|0}} > 0|
|periap=470000
+
{{Infobox/Line|{{Infobox/Body/Dict|pressure}}
|orbinc=7.4
+
|{{sigfigs|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}} * 101.325}}|6}}&nbsp;{{Dict|k}}{{Dict|Pa}}
|anomaly=4.2
+
|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}} round 6 }}&nbsp;{{Dict|atm}}}}
|radius=10000
+
{{Infobox/Line|{{Infobox/Body/Dict|height}}
|sidrot=3600
+
|{{formatnum|{{Body data|{{{name|{{BASEPAGENAME}}}}}|atmospheric height}}}}&nbsp;{{Dict|m}}
|SoI=200000
+
|<small>{{sigfigs|{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}} * 1e-6}}|2}}&nbsp;{{Dict|atm}}</small>}}
|highest=2357
+
{{Infobox/Line|{{Infobox/Body/Dict|temp-min}}
|atmosatm=1
+
|{{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|min temp}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|min temp}}&nbsp;°C <small>{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|min temp}} + 273.15}}&nbsp;{{Dict|K}}</small>|{{Dict|Unknown}}}}}}
|atmossh=3000
+
{{Infobox/Line|{{Infobox/Body/Dict|temp-max}}
|T-minC=-42
+
|{{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|max temp}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|max temp}}&nbsp;°C <small>{{#expr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|max temp}} + 273.15}}&nbsp;{{Dict|K}}</small>|{{Dict|Unknown}}}}}}
|T-maxC=47
+
{{Infobox/Line|{{Infobox/Body/Dict|oxygen}}
|O2yorn=no
+
|{{#ifeq: {{uc:{{Body data|{{{name|{{BASEPAGENAME}}}}}|oxygen}}}}|YES|{{Yes}}|{{No}}}}}}}}
}}
+
{{Infobox/Line|'''{{Infobox/Body/Dict|sci}}'''}}
 +
{{Infobox/Line|{{Infobox/Body/Dict|surface}}
 +
|{{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sci landed surf}}|{{#if: {{#ifexpr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sci landed surf}} > 0|1}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|sci landed surf}}|''N/A''}}|''N/A''}}}}
 +
{{Infobox/Line|{{Infobox/Body/Dict|splashed}}
 +
|{{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sci splashed surf}}|{{#if: {{#ifexpr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sci splashed surf}} > 0|1}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|sci splashed surf}}|''N/A''}}|''N/A''}}}}
 +
{{#ifexpr: {{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|pressure}}|0}} > 0|
 +
{{Infobox/Line|{{Infobox/Body/Dict|low-atmo}}
 +
|{{#if: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci lower atmo}}|{{#if: {{#ifexpr: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci lower atmo}} > 0|1}}|{{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci lower atmo}}|''N/A''}}|''N/A''}}}}
 +
{{Infobox/Line|{{Infobox/Body/Dict|up-atmo}}
 +
|{{#if: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci upper atmo}}|{{#if: {{#ifexpr: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci upper atmo}} > 0|1}}|{{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci upper atmo}}|''N/A''}}|''N/A''}}}}}}
 +
{{Infobox/Line|{{Infobox/Body/Dict|near}}
 +
|{{#if: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci near space}}|{{#if: {{#ifexpr: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci near space}} > 0|1}}|{{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci near space}}|''N/A''}}|''N/A''}}}}
 +
{{Infobox/Line|{{Infobox/Body/Dict|outer}}
 +
|{{#if: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci outer space}}|{{#if: {{#ifexpr: {{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci outer space}} > 0|1}}|{{BodyData|{{{name|{{BASEPAGENAME}}}}}|sci outer space}}|''N/A''}}|''N/A''}}}}
 +
{{Infobox/Line|{{Infobox/Body/Dict|recovery}}
 +
|{{#if: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sci recovery}}|{{#if: {{#ifexpr: {{Body data|{{{name|{{BASEPAGENAME}}}}}|sci recovery}} > 0|1}}|{{Body data|{{{name|{{BASEPAGENAME}}}}}|sci recovery}}|''N/A''}}|''N/A''}}}}
 +
}}</includeonly><noinclude>{{Infobox/Body}}
 +
 
 +
== Usage ==
 +
This template don't need any parameters and instead uses only {{Tl|Body data}} to gather the data. Because of this the orbital and physical properties are stored in a subpage named Param.
 +
 
 +
To orbital information is deactivated (for example [[Kerbol]]) when <nowiki>{{Body data}}</nowiki> for the property <tt>parent</tt> returns nothing. The atmospheric information is only visible when <nowiki>{{Body data}}</nowiki> for the property <tt>pressure</tt> returns a value higher than 0.
 +
 
 +
Ingame the apsides are shown from the body surface. But because all values which depend on them needs to be from the center the values must be from the centers of the bodies.
  
 
== Dependencies ==
 
== Dependencies ==
 
Some values are calculated automatically:
 
Some values are calculated automatically:
* Periapsis: Semi-major axis, Orbital eccentricity, Orbital velocity
+
* Semi-major axis & Orbital eccentricity: Apoapsis, Periapsis, Synodic orbital period, Orbital velocity, Solar day, Sphere of influence
* Apoapsis: Semi-major axis, Orbital eccentricity, Orbital velocity
+
* Semi-major axis (km): Sidereal orbital period
* Orbital period: Orbital velocity
+
* Radius & Surface gravity: Mass, Sidereal orbital period, Density, Synchronous orbit, Orbital velocity
* Radius: Surface Area, Density, Surface Gravity, Synchronous Orbit
+
* Radius (km): Surface area
* Mass: Gravitational Parameter, Density, Surface Gravity, Synchronous Orbit
+
* Surface gravity (gees): Gravitational parameter, Sphere of influence
* Sidereal Rotation Period: Sidereal Rotational Velocity, Synchronous Orbit
+
* Sidereal rotation period (s): Sidereal rotational velocity, Synchronous orbit, Solar day
* Scale Height: Atmospheric Height
 
 
* Atmospheric pressure (in atm): Atmospheric pressure (in kPa)
 
* 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 <nowiki>{{</nowiki>[[Template:CelestialBodyMass|CelestialBodyMass]]<nowiki>}}</nowiki>
+
The ''Synodic orbital period'' is not defined for [[Kerbin]].
  
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.
+
== Template ==
 +
<pre>{{Infobox/Body}}</pre>
  
== Parameters ==
+
<pre>{{#switch: {{{1}}}
{| class="wikitable mw-datatable"
+
|name=
! Name
+
|class=
! Optional
+
|file=
! Description
+
|parent=
|-
+
|semi-major axis=
| <tt>Name</tt>
+
|eccentricity=
| Yes
 
| Name of celestial body. Used to determine mass. Default: <nowiki>{{BASEPAGENAME}}</nowiki>
 
|-
 
| <tt>Class</tt>
 
| No
 
| Class of celestial body
 
|-
 
| <tt>File</tt>
 
| No
 
| Filename to image of the celestial object
 
|-
 
| <tt>Parent</tt>
 
| Yes
 
| Object which this object does orbit. If net set it hides the orbital information. Default: Not set
 
|-
 
| style="padding-left:2em" | <tt>apoap</tt>
 
| No
 
| Apoapsis in meters
 
|-
 
| style="padding-left:2em" | <tt>periap</tt>
 
| Yes
 
| Periapsis in meters. Default: Apoapsis
 
|-
 
| style="padding-left:2em" | <tt>orbinc</tt>
 
| No
 
| Orbital inclination in degrees.
 
|-
 
| style="padding-left:2em" | <tt>anomaly</tt>
 
| No
 
| Mean anomaly in degrees
 
|-
 
| <tt>radius</tt>
 
| No
 
| Radius in meters
 
|-
 
| <tt>sidrot</tt>
 
| No
 
| Siderial period in seconds
 
|-
 
| <tt>SoI</tt>
 
| No
 
| Sphere of influence in meters. Special value: ∞
 
|-
 
| <tt>highest</tt>
 
| Yes
 
| Highest elevation in meters. Default: Not set
 
|-
 
| <tt>atmosatm</tt>
 
| Yes
 
| Atmospheric pressure in atm. If this celestial body doesn't have an atmosphere don't set this value. Default: Not set
 
|-
 
| style="padding-left:2em" | <tt>atmossh</tt>
 
| No
 
| Atmospheric scale height in meters
 
|-
 
| style="padding-left:2em" | <tt>T-minC</tt>
 
| No
 
| Lowest temperature in degrees celsius
 
|-
 
| style="padding-left:2em" | <tt>T-maxC</tt>
 
| No
 
| Highest temperature in degrees celsius
 
|-
 
| style="padding-left:2em" | <tt>O2yorn</tt>
 
| No
 
| Is oxygen present?
 
|}
 
 
 
== Template ==
 
<pre>{{Planetbox
 
|Name=
 
|Class=
 
|File=
 
|Parent=
 
|apoap=
 
|periap=
 
 
|orbinc=
 
|orbinc=
 +
|pe arg=
 +
|an arg=
 
|anomaly=
 
|anomaly=
 
|radius=
 
|radius=
 +
|gravity gees=
 
|sidrot=
 
|sidrot=
|SoI=
+
|pressure=
|highest=
+
|atmospheric height=
|atmosatm=
+
|min temp=
|atmossh=
+
|max temp=
|T-minC=
+
|oxygen=
|T-maxC=
+
|sci landed surf=
|O2yorn=
+
|sci splashed surf=
 +
|sci lower atmo=
 +
|sci upper atmo=
 +
|sci border atmo=
 +
|sci near space=
 +
|sci outer space=
 +
|sci border space=
 +
|sci recovery=
 +
|#default={{{2|}}}
 
}}</pre>
 
}}</pre>
  
 
== Example ==
 
== Example ==
Example used on this page:
+
Example param subpage used for this page:
<pre>{{Planetbox
+
{{#tag:pre|{{msgnw:Infobox/Param}}}}
|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
 
}}</pre>
 
  
 
== Translating ==
 
== 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.
+
When using this template, most of it is translated automatically. To translate this template or one of the subtemplates, go to the {{Tl|Infobox/Body/Dict}} template.
  
[[Category:Templates|Planetbox]]
+
[[Category:Infobox templates|Body]]</noinclude>
</noinclude>
 

Latest revision as of 21:39, 15 November 2024

Infobox
Infobox
Infobox as seen from orbit.
Planet of Gilly
Orbital Characteristics
Semi-major axis 1 807 000 m [Note 1]
Apoapsis 2 674 000 m [Note 1]
Periapsis 940 000 m [Note 1]
Orbital eccentricity 0.48
Orbital inclination 7.4 °
Argument of periapsis 4 °
Longitude of the ascending node 7 °
Mean anomaly 4.2 rad (at 0s UT)
Sidereal orbital period 5 300 957 s
245 d 2 h 29 m 16.5 s
Synodic orbital period 419 326.1 s
Orbital velocity 1 - 4 m/s
Physical Characteristics
Equatorial radius 10 000 m
Equatorial circumference 62 832 m
Surface area 1.2566371×109 m2
Mass 1.0000000×1020 kg
Standard gravitational parameter 6.6740800×109 m3/s2
Density 23 873 241 kg/m3
Surface gravity 66.7 m/s2 (6.806 g)
Escape velocity 1 155.34 m/s
Sidereal rotation period 3 600.0000 s
1 h 0 m 0 s
Sidereal rotational velocity 17.453 m/s
Synchronous orbit 119.88 km
Sphere of influence 26 260 587 m [Note 1]
Atmospheric Characteristics
Atmosphere present Yes
Atmospheric pressure 101.325 kPa
1 atm
Atmospheric height 40 000 m
1.0×10-6 atm
Temperaturemin -42 °C 231.15 K
Temperaturemax 47 °C 320.15 K
Oxygen present No
Scientific multiplier
Surface 10
Splashed 6
Lower atmosphere 8
Upper atmosphere 8
Near space 6
Outer space 6
Recovery 5

  1. 1.0 1.1 1.2 1.3 The distances are given from the body's center, not from the surface (unlike ingame)

Usage

This template don't need any parameters and instead uses only {{Body data}} to gather the data. Because of this the orbital and physical properties are stored in a subpage named Param.

To orbital information is deactivated (for example Kerbol) when {{Body data}} for the property parent returns nothing. The atmospheric information is only visible when {{Body data}} for the property pressure returns a value higher than 0.

Ingame the apsides are shown from the body surface. But because all values which depend on them needs to be from the center the values must be from the centers of the bodies.

Dependencies

Some values are calculated automatically:

  • Semi-major axis & Orbital eccentricity: Apoapsis, Periapsis, Synodic orbital period, Orbital velocity, Solar day, Sphere of influence
  • Semi-major axis (km): Sidereal orbital period
  • Radius & Surface gravity: Mass, Sidereal orbital period, Density, Synchronous orbit, Orbital velocity
  • Radius (km): Surface area
  • Surface gravity (gees): Gravitational parameter, Sphere of influence
  • Sidereal rotation period (s): Sidereal rotational velocity, Synchronous orbit, Solar day
  • Atmospheric pressure (in atm): Atmospheric pressure (in kPa)

The Synodic orbital period is not defined for Kerbin.

Template

{{Infobox/Body}}
{{#switch: {{{1}}}
|name=
|class=
|file=
|parent=
|semi-major axis=
|eccentricity=
|orbinc=
|pe arg=
|an arg=
|anomaly=
|radius=
|gravity gees=
|sidrot=
|pressure=
|atmospheric height=
|min temp=
|max temp=
|oxygen=
|sci landed surf=
|sci splashed surf=
|sci lower atmo=
|sci upper atmo=
|sci border atmo=
|sci near space=
|sci outer space=
|sci border space=
|sci recovery=
|#default={{{2|}}}
}}

Example

Example param subpage used for this page:

<noinclude>{{Data template used}}</noinclude>{{#switch: {{{1}}}
|name=Infobox
|class=Planet
|file=Image needed.svg
|parent=Gilly
|semi-major axis=1807000
|eccentricity=0.47980077476480365
|orbinc=7.4
|pe arg=4
|an arg=7
|anomaly=4.2
|radius=10000
|gravity gees=6.805667582711731
|sidrot=3600
|pressure=1
|atmospheric height=40000
|min temp=-42
|max temp=47
|oxygen=no
|sci landed surf=10
|sci splashed surf=6
|sci lower atmo=8
|sci upper atmo=8
|sci border atmo=20000
|sci near space=6
|sci outer space=6
|sci border space=100000
|sci recovery=5
|#default={{{2|}}}
}}

Translating

When using this template, most of it is translated automatically. To translate this template or one of the subtemplates, go to the {{Infobox/Body/Dict}} template.