Skip to content

Documentation / @interstellar-tools/constants / PLANETS

Variable: PLANETS ​

ts
const PLANETS: PlanetsType;

Defined in: bodies/planets.ts:32

Represents a dataset of planets and planetoids in the solar system.

INFO

  • Units: a (au), period (days), radius (km); coordinates x,y,z in au.

  • orbit.angle is the true anomaly at J2000 (2000-01-01 12:00 TT). x,y,z are the heliocentric position at J2000 in the J2000 ecliptic frame, x towards the equinox.

  • Both are computed from the J2000 elements in JPL's "Approximate Positions of the Planets" (Table 1), and for Ceres and Pluto from the JPL Small-Body Database, using this dataset's a and e.

  • period is always positive; retrograde orbits have retrograde: true.

  • Sources: compiled from public references, mainly NASA, NASA JPL, ESA and Wikipedia. See data sources.

Full list of planets in the dataset ​

This list is not an exhaustive list, and addition/changes will be added over time.

idnametypecategoryparentorbit.aorbit.eorbit.periodorbit.retrogradeorbit.angleradiusmu (m³/s²)display.colorxyz
mercuryMercurysilicate planetplanetsun0.387 au0.205687.969 d3.0803772440 km2.2031868551e+13#8B8B8B-0.1301 au-0.4472 au-0.0246 au
venusVenussilicate planetplanetsun0.723 au0.0068224.701 d0.889776052 km3.24858592e+14#E49B0F-0.718 au-0.0327 au0.041 au
earthEarthsilicate planetplanetsun1 au0.0167365.256 d6.2385496371 km3.98600435507e+14#1E90FF-0.1772 au0.9672 au0 au
marsMarsdesert planetplanetsun1.524 au0.0934686.98 d0.4080153389 km4.282837362e+13#D14A281.3909 au-0.0134 au-0.0345 au
ceresCeresice planetplanetoidsun2.766 au0.0791680.5 d0.106686469.7 km6.26284e+10#C0C0C0-2.3475 au0.8788 au0.4603 au
jupiterJupitergas giantplanetsun5.203 au0.04894332.59 d0.37818569911 km1.266865319e+17#C088503.9953 au2.9459 au-0.1016 au
saturnSaturngas giantplanetsun9.537 au0.056510759.22 d5.45824758232 km3.793120623e+16#D2B48C6.4288 au6.5083 au-0.3691 au
uranusUranusice giantplanetsun19.191 au0.046330687.15 d2.53745925362 km5.7939513e+15#78D6FF14.4012 au-13.7439 au-0.2377 au
neptuneNeptuneice giantplanetsun30.069 au0.008660190.03 d4.51947524622 km6.83509997e+15#0053D616.8038 au-24.9923 au0.1274 au
plutoPlutoice planetplanetoidsun39.482 au0.248890560 d0.4368921188 km8.693e+11#B0A99F-9.984 au-27.916 au5.8767 au

Example item in dataset:

ts
{
  id: 'mercury',
  name: 'Mercury',
  type: 'silicate planet',
  category: 'planet',
  parent: 'sun',
  orbit: {
    /** Semi-major axis in AU */
    a: { value: 0.387, unit: 'au' },
    /** Orbital eccentricity */
    e: 0.2056,
    /** Orbital period in days */
    period: { value: 87.969, unit: 'd' },
    /** True anomaly at J2000 */
    angle: 3.080377 as Radians
  },
  /** Radius in km */
  radius: { value: 2440, unit: 'km' },
  mu: 2.2031868551e13,
  display: {
    /** Visual representation color */
    color: '#8B8B8B'
  },
  /** Heliocentric position at J2000 (J2000 ecliptic frame) in au */
  x: { value: -0.1301, unit: 'au' },
  y: { value: -0.4472, unit: 'au' },
  z: { value: -0.0246, unit: 'au' }
},

See ​

PlanetsType.

Example ​

ts
console.log(PLANETS[0].name); // "Mercury"