poliastro.bodies

Bodies of the Solar System.

Contains some predefined bodies of the Solar System:

  • Sun (☉)

  • Earth (♁)

  • Moon (☾)

  • Mercury (☿)

  • Venus (♀)

  • Mars (♂)

  • Jupiter (♃)

  • Saturn (♄)

  • Uranus (⛢)

  • Neptune (♆)

  • Pluto (♇)

and a way to define new bodies (Body class).

Data references can be found in constants

Module Contents

Classes

Body

Built-in immutable sequence.

SolarSystemPlanet

Built-in immutable sequence.

Attributes

Sun

Mercury

Venus

Earth

Mars

Jupiter

Saturn

Uranus

Neptune

Pluto

Moon

class poliastro.bodies.Body

Bases: namedtuple('_Body', ['parent', 'k', 'name', 'symbol', 'R', 'R_polar', 'R_mean', 'rotational_period', 'J2', 'J3', 'mass'])

Built-in immutable sequence.

If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.

If the argument is a tuple, the return value is the same object.

__slots__ = []
property angular_velocity(self)
__str__(self)

Return str(self).

__reduce__(self)

Helper for pickle.

__repr__(self)

Return repr(self).

classmethod from_parameters(cls, parent, k, name, symbol, R, **kwargs)
classmethod from_relative(cls, reference, parent, k, name, symbol=None, R=0, **kwargs)
class poliastro.bodies.SolarSystemPlanet

Bases: Body

Built-in immutable sequence.

If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.

If the argument is a tuple, the return value is the same object.

plot(self, epoch=None, label=None, use_3d=False, interactive=False, plane=Planes.EARTH_ECLIPTIC)

Plots the body orbit.

Parameters
  • epoch (astropy.time.Time, optional) – Epoch of current position.

  • label (str, optional) – Label for the orbit, defaults to empty.

  • use_3d (bool, optional) – Produce a 3D plot, default to False.

  • interactive (bool, optional) – Produce an interactive (rather than static) image of the orbit, default to False. This option requires Plotly properly installed and configured for your environment.

  • plane (Planes) – Reference plane of the coordinates.

poliastro.bodies.Sun
poliastro.bodies.Mercury
poliastro.bodies.Venus
poliastro.bodies.Earth
poliastro.bodies.Mars
poliastro.bodies.Jupiter
poliastro.bodies.Saturn
poliastro.bodies.Uranus
poliastro.bodies.Neptune
poliastro.bodies.Pluto
poliastro.bodies.Moon