Skip to main content

load_solar_system

load_solar_system(moon=True, pluto=True)

Load the solar system, ready to simulate.

Builds a system with the Sun at rest at the origin and the eight planets on their real orbits, using the same masses and orbital elements as add_planet(). The Moon (in orbit around the Earth) and Pluto are included unless you switch them off. Every body starts at periapsis, its closest point to the body it orbits.

The result is an ordinary system, so you can add to it, remove bodies from it, or simulate it straight away.

Parameters

Name Type Description Default
moon bool Whether to include the Moon, in orbit around the Earth. Default True. True
pluto bool Whether to include Pluto. Default True. True

Returns

Name Type Description
OrbitSystem A system with the bodies in this order: Sun, Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, then Moon and Pluto if requested. That is 11 bodies with the defaults.

See Also

Notes

Because every body starts at periapsis, the planets are not where they were on any particular date. The orbits have the right size, shape and orientation, but this is not an ephemeris.

A time step that suits the planets is too coarse for the Moon, whose orbit takes about 27 days. Use a step of an hour or so if the Moon is included, or pass moon=False.

Examples

import pyorbiter as orb

system = orb.load_solar_system()
system
───────────────────────────────── orbit_system ─────────────────────────────────
G: 6.6743e-11 (standard)
Bodies: 11

     id         mass             x             y             z            vx            vy          vz
    Sun 1.989000e+30  0.000000e+00  0.000000e+00  0.000000e+00      0.000000      0.000000    0.000000
Mercury 3.301000e+23  1.012086e+10  4.479358e+10  2.728321e+09 -57286.619869  12561.113880 6279.625812
  Venus 4.867000e+24 -7.114253e+10  8.037591e+10  5.197731e+09 -26353.863664 -23403.981810 1199.695283
  Earth 5.972000e+24 -3.296559e+10  1.433603e+11  0.000000e+00 -29520.187051  -6788.143346    0.000000
   Mars 6.417000e+23  1.887900e+11 -8.370696e+10 -6.395443e+09  10749.771467  24226.116460  243.021783
Jupiter 1.898000e+27  7.172068e+11  1.832269e+11 -1.676011e+10  -3393.917437  13286.760668   20.998410
 Saturn 5.683000e+26 -7.381497e+10  1.350805e+12 -2.069093e+10 -10158.213515   -548.755373  414.022983
 Uranus 8.681000e+25 -2.707453e+12  4.181380e+11  3.654544e+10  -1086.589920  -7034.677635  -11.641166
Neptune 1.024000e+26  3.145881e+12  3.136179e+12 -1.370573e+11  -3880.187319   3892.602856    9.446879
   Moon 7.342000e+22 -3.292356e+10  1.437205e+11 -2.175733e+07 -30585.853990  -6659.462622   71.933632
  Pluto 1.309000e+22 -3.014974e+12 -3.026468e+12  1.197383e+12   4153.180664  -4425.697169 -728.672130

The planets only, simulated for one year and drawn from above (three_d=False gives the flat view of the x-y plane).

import pyorbiter as orb

sim = orb.load_solar_system(moon=False, pluto=False).simulate(
    time_step=orb.seconds_per_day, duration=orb.seconds_per_year
)
orb.plot_orbits(sim, three_d=False)