Difference between revisions of "User:XZise/test"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Replaced content with "<math>y = x^2</math>")
 
(69 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><div style="background: #f6f6f6; border: 1px solid #ccc; float: right; width: 280px; margin-left: 1em">
+
<math>y = x^2</math>
<div style="background: #ccc; font-size: large; padding: .5em; text-align: center">{{{Name|{{BASEPAGENAME}}}}}</div>
 
<div style="background: #000">[[File:{{{File|Image-needed.png}}}|280px|Planet image]]</div>
 
{| style="padding: 0.5em; font-size: 90%"
 
| colspan="2" style="text-align: center; width: 100%;" | <small>{{{Name|{{BASEPAGENAME}}}}} as seen from orbit.</small>
 
|-
 
| colspan="2" style="text-align: center;" | [[{{{Class|??}}}]] {{#if: {{{Parent|}}}|of [[{{{Parent}}}]]}}
 
|-
 
{{#if: {{{Parent|}}}|
 
{{!}} colspan="2" {{!}} '''{{#switch:{{lang}}
 
|=Orbital Characteristics
 
|ru=Орбитальные характеристики
 
|nl=Baan Eigenschappen
 
|fr=Caractéristiques Orbitales
 
|#default=Orbital Characteristics
 
}}'''
 
{{PlanetBoxRow|[[w:Semi-major axis|Semi-Major Axis]]          |{{#expr: ({{{apoap}}} + {{{periap|{{{apoap}}}}}})/2}} |m|f}}
 
{{PlanetBoxRow|[[w:Apoapsis|Apoapsis]]                        |{{{apoap}}}  |m|f}}
 
{{PlanetBoxRow|[[w:Periapsis|Periapsis]]                      |{{{periap|{{{apoap}}}}}} |m|f}}
 
{{PlanetBoxRow|[[w:Orbital_eccentricity|Orbital Eccentricity]]|{{#expr: 1-2/({{{apoap}}}/{{{periap|{{{apoap}}}}}}+1) round 2}} |}}
 
{{PlanetBoxRow|[[w:Orbital_Inclination|Orbital Inclination]]  |{{{orbinc}}} |°}}
 
{{PlanetBoxRow|[[w:Mean_Anomaly|Mean Anomaly]]                |{{{anomaly}}}|°}}
 
{{!}}-
 
{{!}} valign="top" rowspan="2" {{!}} [[w:Orbital_Period|Orbital Period]]
 
{{!}} {{formatnum: {{#expr: {{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}} round 1 }}}} s
 
{{!}}-
 
{{!}} style="font-size:smaller;" {{!}} {{ExpandTime|{{OrbitPeriod|{{{apoap}}}|{{{Parent}}}|{{{periap|{{{apoap}}}}}}}}}}
 
{{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}}|
 
}}
 
|-
 
| colspan="2" | '''{{#switch:{{lang}}
 
|=Physical Characteristics
 
|ru=
 
|nl=Fysieke Eigenschappen
 
|fr=Caractéristiques Physiques
 
|#default=Physical Characteristics
 
}}'''
 
|-
 
| [[w:Radius|Equatorial Radius]]
 
| {{formatnum: {{{radius}}}}} m
 
|-
 
| [[w:Surface Area|Surface Area]]
 
| {{sigfigs|{{#expr: 4 * pi * {{{radius}}}^2}}|8}} m<sup>2</sup>
 
|-
 
| [[w:Mass|Mass]]
 
| {{sigfigs|{{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}}|8}} kg
 
|-
 
| [[w:Standard gravitational parameter|Gravitational Parameter]]
 
| {{sigfigs|{{#expr: {{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} * {{G}}}}|8}} m<sup>3</sup>/s<sup>2</sup>
 
|-
 
| [[w:Density|Density]]
 
| {{sigfigs|{{#expr: {{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} / (4 * pi * {{{radius}}}^3 / 3)}}|8}} kg/m<sup>3</sup>
 
|-
 
| [[w:Surface_gravity|Surface Gravity]]
 
| {{sigfigs|{{#expr: {{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} * {{G}} / ({{{radius}}}^2)}}|3}} m/s<sup>2</sup>
 
{{PlanetBoxRow|[[w:Escape_velocity|Escape Velocity]]                  <!--
 
-->    |{{#expr: (2 * {{G}} * {{CelestialBodyMass|{{{Name|{{BASEPAGENAME}}}}}}} / {{{radius|1}}})^0.5 round2 }}|m/s}}
 
|-
 
| valign="top" rowspan="2" | [[w:Rotation_period|Sidereal Rotation Period]]
 
| {{sigfigs|{{{sidrot}}}|8}} s
 
|-
 
| style="font-size:smaller;" | {{formatnum: {{ExpandTime|{{{sidrot}}}}}}}
 
{{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}}}}
 
|-
 
| [[w:Sphere_of_influence_(astrodynamics)|Sphere of Influence]]
 
| {{#ifeq: {{{SoI|}}}|∞|∞|{{sigfigs|{{{SoI}}}|8}} m}}
 
|-
 
{{#if: {{{highest|}}}|{{!}} Highest elevation {{!}}{{!}} {{{highest}}} m}}
 
|-
 
| colspan="2" | '''{{#switch:{{lang}}
 
|=Atmospheric Characteristics
 
|ru=
 
|nl=Atmosferische Eigenschappen
 
|fr=Caractéristiques Atmosphériques
 
|#default=Atmospheric Characteristics
 
}}'''
 
{{PlanetBoxRow|[[w:atmosphere|Atmosphere Present]]                    |{{#if: {{{atmosatm|}}}|Yes|No}}|}}
 
{{#if: {{{atmosatm|}}}|
 
{{PlanetBoxRow|[[w:Atmospheric_pressure|Atmospheric Pressure]]        |{{sigfigs|{{#expr: {{{atmosatm}}} * 101.327}}|3}} |kPa}}
 
{{PlanetBoxRow|                                                      |{{{atmosatm}}} |atm}}
 
{{PlanetBoxRow|[[w:Scale_height|Scale Height]]                        |{{{atmossh}}}  |m}}
 
{{PlanetBoxRow|[[w:Atmospheric_height|Atmospheric Height]]            |{{sigfigs|{{#expr: ln1e-6 * -{{{atmossh|}}}}}|8}} |m}}
 
{{#if: T-minC|{{PlanetBoxRow|[[w:Atmospheric_temperature|Temperature<sub>min</sub>]]|{{{T-minC|??}}} °C <small>{{#expr: {{{T-minC}}} + 273.15}}|??}} K</small>}}
 
{{#if: T-maxC|{{PlanetBoxRow|[[w:Atmospheric_temperature|Temperature<sub>max</sub>]]|{{{T-maxC|??}}} °C <small>{{#expr: {{{T-maxC}}} + 273.15}}|??}} K</small>}}
 
{{PlanetBoxRow|[[w:Oxygen|Oxygen Present]]                            |{{{O2yorn}}}  |}}
 
}}
 
|}
 
</div></includeonly><noinclude>
 
{{Planetbox
 
|Class=Planet
 
|File=Image-needed.png
 
|Parent=Gilly
 
|apoap=1337000
 
|periap=470000
 
|orbinc=7.4
 
|anomaly=4.2
 
|radius=10000
 
|sidrot=3600
 
|SoI=200000
 
|highest=2357
 
|atmosatm=1
 
|atmossh=3000
 
|T-minC=-42
 
|T-maxC=47
 
|O2yorn=no
 
}}
 
 
 
== 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 <nowiki>{{</nowiki>[[Template:CelestialBodyMass|CelestialBodyMass]]<nowiki>}}</nowiki>
 
 
 
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 ==
 
{| class="wikitable mw-datatable"
 
! Name
 
! Optional
 
! Description
 
|-
 
| <tt>Name</tt>
 
| 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=
 
|anomaly=
 
|radius=
 
|sidrot=
 
|SoI=
 
|highest=
 
|atmosatm=
 
|atmossh=
 
|T-minC=
 
|T-maxC=
 
|O2yorn=
 
}}</pre>
 
 
 
== Example ==
 
Example used on this page:
 
<pre>{{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
 
}}</pre>
 
 
 
== 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.
 
 
 
 
 
</noinclude>
 

Latest revision as of 10:14, 1 May 2015