Difference between revisions of "Template:Infobox/Body"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (*better name for highest surface; !fix orbital velocity calculation;)
m (!orbital velocity calculation for circular orbits;)
Line 23: Line 23:
 
{{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}}
 
{{PlanetBoxRow|                                              |{{sigfigs|{{#expr: {{{orbps}}} / 3600}}|8}} |hours}}
{{PlanetBoxRow|[[w:Orbital_speed|Orbital Velocity]]        |{{#ifeq: {{{apoap|}}}|{{{periap|}}}|{{#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}}|
 
}}
 
}}
 
|-
 
|-

Revision as of 15:46, 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
}}