Difference between revisions of "Template:Infobox/Body"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (!orbital velocity calculation for circular orbits;)
(*more advanced orbital period time;)
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}}
+
{{PlanetBoxRow|[[w:Orbital_Period|Orbital Period]]            |{{sigfigs| {{{orbps}}} |8}} s |}}
{{PlanetBoxRow|                                              |{{sigfigs|{{#expr: {{{orbps}}} / 3600}}|8}} |hours}}
+
|-
 +
|
 +
| <small>{{#ifexpr: 156992040 > 86400|{{formatnum: {{#expr: trunc(156992040 / 86400)}}}} d|}} {{#ifexpr: 156992040 > 3600|{{#expr: 156992040 / 3600 mod 24}} h|}} {{#ifexpr: 156992040 > 60|{{#expr: 156992040 / 60 mod 60}} m|}} {{#expr: 156992040 mod 60}} s</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}}}/{{{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}}|
 
}}
 
}}
Line 110: Line 112:
 
|O2yorn=no
 
|O2yorn=no
 
}}
 
}}
 
  
 
== Dependencies ==
 
== Dependencies ==

Revision as of 20:25, 18 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

It will also calculate the Atmospheric Pressure from atm to kPa and vice versa. 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 {{{orbityorn}}} to no. The atmospheric information can be hidden when {{{atmosyorn}}} is set to no. On all other values it will show the atmospheric entries.

Template

{{Planetbox
|Class=??
|File=??
|Parent=??
|orbityorn=??
|apoap=??
|periap=??
|orbinc=??
|anomaly=??
|orbps=??
|radius=??
|mass=??
|sidrot=??
|SoI=??
|highest=??
|atmosyorn=??
|atmoskPa=??
|atmosatm=??
|atmossh=??
|T-minC=??
|T-maxC=??
|O2yorn=??
}}

Example

Example used on this page:

{{Planetbox
|Class=Planet
|File=Image-needed.png
|Parent=Gilly
|orbityorn=yes
|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
}}