Planet

Base class of planets.

class pyplanets.planets.planet.Planet(epoch: pyplanets.core.epoch.Epoch, VSOP87_L, VSOP87_B, VSOP87_R, ORBITAL_ELEM, ORBITAL_ELEM_J2000)[source]

Abstract base class for planets.

__init__(epoch: pyplanets.core.epoch.Epoch, VSOP87_L, VSOP87_B, VSOP87_R, ORBITAL_ELEM, ORBITAL_ELEM_J2000)[source]
Initializes an object of type planet for a given date (epoch) with

its orbital parameters (ephemeredes) given by VSOP87.

Parameters

epoch (Epoch) – Epoch to which all computations of this instance refer, as an Epoch object

Raises

TypeError if epoch is of wrong type.

__weakref__

list of weak references to the object (if defined)

abstract aphelion()pyplanets.core.epoch.Epoch[source]

This method computes the time of Aphelion closest to the epoch of initialization. Subclasses are required to implement this method.

Returns

The epoch of the desired Aphelion

Return type

Epoch

apparent_heliocentric_position(nutation=True)[source]

This method computes the apparent heliocentric position of a planet for a given epoch, using the VSOP87 theory.

Parameters

nutation (bool) – Whether the nutation correction will be applied

Returns

A tuple with the heliocentric longitude and latitude (as Angle objects), and the radius vector (as a float, in astronomical units), in that order

Return type

tuple

apparent_planetcentric_sun_position(nutation=True)[source]

Generalization of coordinate transformation applicable to all planets. For Planet Earth, this method returns Sun’s apparent geocentric position, i.e. Sun.apparent_geocentric_position(…) in PyMeeus-Classic. Basically a simple transformation!

Parameters

nutation (bool) – Whether the nutation correction will be applied

Returns

A tuple with Sun’s geocentric longitude and latitude (as Angle objects), and the radius vector (as a float, in astronomical units), in that order

Return type

tuple

geometric_heliocentric_position(tofk5=True)[source]

This method computes the geometric heliocentric position of a planet for a given epoch, using the VSOP87 theory.

Parameters

tofk5 (bool) – Whether or not the small correction to convert to the FK5 system will be applied or not

Returns

A tuple with the heliocentric longitude and latitude (as Angle objects), and the radius vector (as a float, in astronomical units), in that order

Return type

tuple

orbital_elements_j2000()[source]

This method computes the orbital elements of Mars for the standard equinox J2000.0 for a given epoch.

Returns

A tuple containing the following six orbital elements: - Mean longitude of the planet (Angle) - Semimajor axis of the orbit (float, astronomical units) - eccentricity of the orbit (float) - inclination on the plane of the ecliptic (Angle) - longitude of the ascending node (Angle) - argument of the perihelion (Angle)

Return type

tuple

orbital_elements_mean_equinox()[source]

This method computes the orbital elements of Mars for the mean equinox of the date for a given epoch.

Returns

A tuple containing the following six orbital elements: - Mean longitude of the planet (Angle) - Semimajor axis of the orbit (float, astronomical units) - eccentricity of the orbit (float) - inclination on the plane of the ecliptic (Angle) - longitude of the ascending node (Angle) - argument of the perihelion (Angle)

Return type

tuple

passage_nodes(ascending=True) -> (<class 'pyplanets.core.epoch.Epoch'>, <class 'float'>)[source]

This function computes the time of passage by the nodes (ascending or descending) of the planet, nearest to the given epoch.

Parameters

ascending (bool) – Whether the time of passage by the ascending (True) or descending (False) node will be computed

Returns

Tuple containing: - Time of passage through the node (Epoch) - Radius vector when passing through the node (in AU, float)

Return type

tuple

abstract perihelion()pyplanets.core.epoch.Epoch[source]

This method computes the time of Perihelion closest to the epoch of initialization. Subclasses are required to implement this method.

Returns

The epoch of the desired Perihelion

Return type

Epoch