Template:Infobox celestial body: Difference between revisions

From Kerbal Space Program 2 Wiki
Jump to navigation Jump to search
m KiwiShark moved page Template:Infobox celestial bodies to Template:Infobox celestial body without leaving a redirect: Misspelled title
removed unnecessary template data
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude></noinclude>
<templatedata>
<includeonly>{{Infobox
{
| title    = {{PAGENAME}}
"params": {
| image    = [[File:{{#invoke:Data|getData|{{PAGENAME}}|file}}|200px|center]]
"type": {
| caption = {{#invoke:Data|getData|{{PAGENAME}}|subtype}} {{#invoke:Data|getData|{{PAGENAME}}|type}}
"label": "CB Type",
"description": "What kind of celestial body is this?",
"example": "Planet",
"type": "string",
"suggestedvalues": [
"Planet",
"Moon",
"Star"
],
"required": true
},
"subtype": {
"label": "CB Subtype",
"description": "What sub-type is this CB? ",
"example": "Terrestrial",
"type": "string",
"suggestedvalues": [
"Terrestrial",
"Gas giant",
"Oceanic",
"Frozen",
"K-type"
],
"required": true
},
"parent": {
"label": "Parent Body",
"description": "What body does this one orbit?",
"example": "Kerbol",
"type": "string",
"suggestedvalues": [
"Kerbol",
"Eve",
"Kerbin",
"Duna",
"Jool"
],
"suggested": true
},
"system": {
"label": "Star System",
"description": "What star system does this CB belong to?",
"example": "Kerbolar",
"type": "string",
"suggestedvalues": [
"Kerbolar",
"Deb Deb"
],
"required": true
},
"radius": {
"label": "Radius",
"description": "The equatorial radius of the body.",
"type": "string",
"required": true
}
}
}
</templatedata>


{{Infobox
| labelstyle  = width: 50%; text-align: left; vertical-align: text-top; padding: 0.1em;
| name    = Test
| titlestyle =
| title    = Test box
padding: 0.2em 0em 0.2em;
| image    = [[File:Kerbin.png|200px]]
font-size: 22px;
| caption = Test caption
font-weight: bold;
| bodystyle  = width: 23em;
    border: 1px solid #a2a9b1;
    border-spacing: 3px; margin: 0.5em 0 0.5em 1em;
    padding: 0.2em;
    float: right;
    clear: right;
    font-size: 88%;
    line-height: 1.5em;
| headerstyle  = font-weight: bold; font-size: 14px; text-align: left;
| autoheaders = y
| captionstyle = text-align: center; font-style: italic; padding: 0.5em 0 0 0;


| labelstyle  = width: 33%
| bodystyle  = width: 20em
| headerstyle  = font-weight: bold; color: black; background: #f7aa33;


| header1  = General Info
| header1  = General Info


| label2  = Type
| label2  = Type
|  data2  = #
|  data2  = {{#invoke:Data|getData|{{PAGENAME}}|type}}
| label3  = Sub-type
| label3  = Sub-type
|  data3  = #
|  data3  = {{#invoke:Data|getData|{{PAGENAME}}|subtype}}
| label4  = Parent body
| label4  = Parent body
|  data4  = #
|  data4  = {{#invoke:Data|getData|{{PAGENAME}}|parent}}
| label5  = Star system
| label5  = Star system
|  data5  = #
|  data5  = {{#invoke:Data|getData|{{PAGENAME}}|system}}
| label6  = Satellites
|  data6  = {{#invoke:Data|getData|{{PAGENAME}}|satellites}}




| header20 = Physical Characteristics
| header20 = Physical Characteristics


| label21  = Radius
| label21  = Equatorial radius
|  data21  = #
|  data21  = {{#expr: {{#invoke:Data|getData|{{PAGENAME}}|radius}} / 1000}} <small>km</small>
 
| label22  = Equatorial circumference
| label22  = Equatorial circumference
|  data22  = #
|  data22  = {{#expr: 2* pi * {{#invoke:Data|getData|{{PAGENAME}}|radius}} / 1000 round 0}} <small>km</small>
 
| label23  = Surface area
| label23  = Surface area
|  data23  = #
|  data23  = {{Sigfigs
|{{#expr: 4 * pi * ({{#invoke:Data|getData|{{PAGENAME}}|radius}} / 1000)^2 round 0}}
|4}} <small>km<sup>2</sup></small>
 
| label24  = Mass
| label24  = Mass
|  data24  = #
|  data24  = {{Sigfigs
|{{#expr: ((9.812 * ({{#invoke:Data|getData|{{PAGENAME}}|radius}})^2) / .000000000066743)}}
|4}} <small>kg</small>
 
| label25  = Axial tilt
| label25  = Axial tilt
|  data25  = #
|  data25  = {{#ifeq: {{#invoke:Data|getData|{{PAGENAME}}|axial_tilt}} | 0
| 0 | {{Sigfigs | {{#invoke:Data|getData|{{PAGENAME}}|axial_tilt}} | 4}} }}°
 
| label26  = Standard gravitational parameter
|  data26  = {{Sigfigs
|{{#expr: .000000000066743 * {{#invoke:Data|getData|{{PAGENAME}}|mass}}}}
|4}} <small>m<sup>3</sup>/s<sup>2</sup></small>
 
| label27  = Density
|  data27  = {{Sigfigs
|{{#expr: {{#invoke:Data|getData|{{PAGENAME}}|mass}} / (4/3 * pi * ({{#invoke:Data|getData|{{PAGENAME}}|radius}})^3) }}
|4}} <small>kg/m<sup>3</sup></small>
 
| label28  = Volume
|  data28  = {{Sigfigs
|{{#expr: (4/3) * pi * ({{#invoke:Data|getData|{{PAGENAME}}|radius}} / 1000)^3 }}
|4}} <small>km<sup>3</sup></small>
 
| label29  = Surface gravity
|  data29  = {{Sigfigs
|{{#expr: {{#invoke:Data|getData|{{PAGENAME}}|surface_gravity}}*9.80665 }}
|4}} <small>m/s<sup>2</sup> ({{#invoke:Data|getData|{{PAGENAME}}|surface_gravity}} ''g'') </small>
 
| label30  = Escape velocity
|  data30  = {{Sigfigs
|{{#expr: sqrt(2 * .000000000066743 * {{#invoke:Data|getData|{{PAGENAME}}|mass}} / ({{#invoke:Data|getData|{{PAGENAME}}|radius}}) ) }}
|4}} <small>m/s</small>
 
|  label31  = Sidereal rotation period
|  data31  = {{#invoke:Data|getData|{{PAGENAME}}|sidereal_rotation_period}} <small>s <br> {{ExpandTime|{{#invoke:Data|getData|{{PAGENAME}}|sidereal_rotation_period}}}} </small>
 
|  label32  = Sidereal rotational velocity
|  data32  = {{Sigfigs
|{{#expr: 2 * pi * {{#invoke:Data|getData|{{PAGENAME}}|radius}} / {{#invoke:Data|getData|{{PAGENAME}}|sidereal_rotation_period}} }}
|4}} <small>m/s</small>
 
|  label33 = Synchronous orbit
|  data33 = {{Sigfigs
|{{#expr: ((.000000000066743 * {{#invoke:Data|getData|{{PAGENAME}}|mass}} *  {{#invoke:Data|getData|{{PAGENAME}}|sidereal_rotation_period}}^2) / (4 * pi^2))^(1/3) / 1000}}
|5}} <small>km</small>


| header40 = Orbital Characteristics
| header40 = Orbital Characteristics


| label41  = Semi major axis
|  data41  = {{Sigfigs
|{{#expr: {{#invoke:Data|getData|{{PAGENAME}}|sma}} / 1000 }}
|4}} <small>km</small>


| label41  = Semi major axis
|  data41  = #
| label42  = Apoapsis
| label42  = Apoapsis
|  data42  = #
|  data42  = {{Sigfigs
|{{#expr: {{#invoke:Data|getData|{{PAGENAME}}|sma}} / 1000 * (1 + {{#invoke:Data|getData|{{PAGENAME}}|eccentricity}})}}
|4}} <small>km</small>
 
| label43  = Periapsis
| label43  = Periapsis
|  data43  = #
|  data43  = {{Sigfigs
|{{#expr: {{#invoke:Data|getData|{{PAGENAME}}|sma}} / 1000 * (1 - {{#invoke:Data|getData|{{PAGENAME}}|eccentricity}})}}
|4}} <small>km</small>
 
| label44  = Eccentricity
| label44  = Eccentricity
|  data44  = #
|  data44  = {{#invoke:Data|getData|{{PAGENAME}}|eccentricity}}
 
| label45  = Inclination
| label45  = Inclination
|  data45  = #
|  data45  = {{#invoke:Data|getData|{{PAGENAME}}|inclination}}°


| header60 = Atmospheric Characteristics
| label46  = Argument of periapsis
|  data46  = {{#invoke:Data|getData|{{PAGENAME}}|arg_pe}}°
 
| label47  = Longitude of the ascending node
|  data47  = {{#invoke:Data|getData|{{PAGENAME}}|long_an}}°
 
| label48  = Mean anomaly
|  data48  = {{#invoke:Data|getData|{{PAGENAME}}|anomaly}}°
 
| label49  = Orbital period
|  data49  = {{#ifeq: {{#invoke:Data|getData|{{PAGENAME}}|name}} | Kerbin | N/A | {{ExpandTime|{{#expr: 2 * pi * sqrt( ({{#invoke:Data|getData|{{PAGENAME}}|sma}})^3 / (.000000000066743 * {{#invoke:Data|getData|{{#invoke:Data|getData|{{PAGENAME}}|parent}}|mass}}) ) }} }} }}
 
| label50  = Sidereal orbital period
|  data50  =
 
| label51  = Synodic orbital period
|  data51  =  


| label61   = Atmosphere present
| label52   = Orbital velocity
data61   = #
data52   =  
| label62  = Pressure
|  data62  = #
| label63  = Height
|  data63  = #
| label64  = Oxygen-rich
|  data64  = #
}}
</noinclude>


<includeonly>
{{Infobox
| name    = Test
| title    = Test box
| image    = [[File:Kerbin.png|200px]]
| caption = Test caption


| labelstyle  = width: 33%
| header60 = Atmospheric Characteristics
| bodystyle  = width: 20em
| headerstyle  = font-weight: bold; color: black; background: #f7aa33;


| header1 = General Info
| label61  = Atmosphere present
| data61  = {{#ifexpr: {{#invoke:Data|getData|{{PAGENAME}}|atmo_pressure}} > 0 | ✔ | ✗}}


| label2   = Type
| label62   = Pressure
data2   = #
data62   = {{#number_format: {{#invoke:Data|getData|{{PAGENAME}}|atmo_pressure}} | 0}} <small>kPa</small>
| label3  = Parent body
|  data3  = #
| label4  = Star system
| data4  = #
| label5  = Surface
| data5  = test


| header20 = Physical Characteristics
| label63  = Height
|  data63  = {{#number_format: {{#invoke:Data|getData|{{PAGENAME}}|atmo_height}} | 0}} <small>m</small>


| label21   = Radius
| label64   = Oxygen present
data21  = #
|   data64 = {{#ifeq: {{#invoke:Data|getData|{{PAGENAME}}|atmo_oxygen}} | true | | ✗}}
| label22  = Equatorial circumference
}}</includeonly>
|  data22  = #
| label23  = Surface area
| data23  = #
| label24  = Mass
| data24  = #
| label25  = Axial tilt
| data25  = #
}}
</includeonly>

Latest revision as of 02:11, 12 March 2025