“Celestial Bodies” in Space

Overview

A Celestial Body is an object in space around which another object can rotate. As such, it should have certain properties to enable operations such as coordinate transformations and propagation.

Celestial bodies in SatMAD are defined with the CelestialBody class. A celestial body stores its relevant values (e.g Gravitational Constant \(GM\)) for various calculations such as force models within orbit propagation. As such, each CelestialBody object is a central repository of information for that body.

The celestial_bodies module defines the default Celestial Bodies, which are instances of the CelestialBody class. These default celestial bodies are currently EARTH, MOON and SUN. The properties of these Celestial bodies are defined using certain standards and established values (e.g. IERS Technical Note No. 36 [TCF1]). However, they are different from the standard values offered by Astropy. A simple usage example is:

>>> from satmad.core.celestial_bodies import SUN
>>> SUN.mu
<Quantity 1.32712442e+11 km3 / s2>
>>> from satmad.core.celestial_bodies import EARTH
>>> EARTH.ellipsoid.re
<Quantity 6378137. m>

A CelestialBody object should include, as a minimum, name, info and mu (Gravitational Constant). In addition, it can have an ellipsoid (e.g. GRS80 for the Earth) as well as default coordinate definitions inert_coord and body_fixed_coord. The inertial coordinate definition (inert_coord) is required to be able to run a propagation around this central body. For the Earth, this is set to GCRS. The body fixed coordinate (body_fixed_coord) is required for conversions between the inertial and body fixed coordinate frames (for example, to be able to compute where the satellite sensor is pointing at on the ground). For the Earth, this is set to ITRS.

Apart from the properties that can be queried, the CelestialBody object offers the get_coord_list() method. This method provides positions (and velocities) of planets and other celestial bodies. For example, the following code snippet computes the position of the Sun in Barycentric (ICRS) frame every hour for a day:

>>> from astropy.time import Time
>>> from astropy import units as u
>>> time_list = Time("2020-01-01T11:30:00", scale="utc") + range(0, 24, 1) * u.hour
>>> pv_list = SUN.get_coord_list(time_list, velocity=True, ephemeris="builtin")
>>> pv_list_gcrs = pv_list.transform_to("gcrs")

This is just a convenience method to wrap the get_body_barycentric_posvel() method and return a SkyCoord object. Then the results can be converted to another coordinate system (in this example, to GCRS). Velocity output, or the ephemeris type (e.g. builtin or jpl) can also be specified.

Reference/API

Defines a Celestial Body, which acts as the central repository of information for the planets or similar Central Bodies.

satmad.core.celestial_bodies_lib.EARTH = <satmad.core.celestial_body.CelestialBody object>

Default Earth Model.

satmad.core.celestial_bodies_lib.EARTH_ELLIPSOID_GRS80 = <satmad.core.celestial_body.CelestialBodyEllipsoid object>

Earth Ellipsoid defined in Geodetic Reference System GRS80.

(See IERS Technical Note No. 36 (2010) Table 1.2 [TCF1] in References).

satmad.core.celestial_bodies_lib.EARTH_ELLIPSOID_IERS2003 = <satmad.core.celestial_body.CelestialBodyEllipsoid object>

Earth Ellipsoid defined in IERS 2010 Numerical Standards.

(See IERS Technical Note No. 36 (2010) Table 1.1 [TCF1] in References).

satmad.core.celestial_bodies_lib.EARTH_ELLIPSOID_WGS84 = <satmad.core.celestial_body.CelestialBodyEllipsoid object>

Earth Ellipsoid defined in World Geodetic System WGS84.

(See WGS84 definition).

satmad.core.celestial_bodies_lib.GM_earth = <Quantity 3.98600442e+14 m3 / s2>

Geocentric gravitational constant (TCG-compatible value). Also compatible with the WGS84 coordinate system. Includes mass of the atmosphere.

(See IERS Technical Note No. 36 (2010) Table 1.1 [TCF1] in:doc:References <../references>)

satmad.core.celestial_bodies_lib.GM_moon = <Quantity 4.90280271e+12 m3 / s2>

Lunar gravitational constant.

The value is derived from “Moon-Earth mass ratio” times “Geocentric gravitational constant” (\(0.0123000371 \times 398600.64418\)).

(See IERS Technical Note No. 36 (2010) Table 1.1 [TCF1] in References).

satmad.core.celestial_bodies_lib.GM_sun = <Quantity 1.32712442e+20 m3 / s2>

Heliocentric gravitational constant (TCB-compatible value, computed from the TDB-compatible value).

(See IERS Technical Note No. 36 (2010) Table 1.1 [TCF1] in References)

satmad.core.celestial_bodies_lib.MOON = <satmad.core.celestial_body.CelestialBody object>

Default Moon Model.

satmad.core.celestial_bodies_lib.MOON_ELLIPSOID_IAUWG2015 = <satmad.core.celestial_body.CelestialBodyEllipsoid object>

Moon Ellipsoid - flattening is zero as the reference value means a perfect sphere.

(See Report of the IAU Working Group on Cartographic Coordinates and Rotational Elements (2015) Table 5 [TCF2] in References).

satmad.core.celestial_bodies_lib.SUN = <satmad.core.celestial_body.CelestialBody object>

Default Sun Model.

Sun Ellipsoid is based on “Mamajek, E.E.; Prsa, A.; Torres, G.; et, al. (2015), “IAU 2015 Resolution B3 on Recommended Nominal Conversion Constants for Selected Solar and Planetary Properties” <https://arxiv.org/pdf/1510.07674.pdf>

Definition of a Celestial Body, which is a celestial body around which an object can rotate.

class satmad.core.celestial_body.CelestialBody(name, info, mu, **kwargs)

Container class for Celestial Bodies and related information.

Parameters
  • name (str) – Name of the body

  • info (str) – Info on the constants etc.

  • mu (Quantity) – GM value (Gravitational constant) of the Celestial body

  • inert_coord (~astropy.coordinates.BaseRepresentation) – Default Inertial Coordinate to run the propagations (e.g. GCRS for Earth)

  • body_fixed_coord (~astropy.coordinates.BaseRepresentation) – Default Central Body Fixed Coordinate to run the propagations (e.g. ITRS for Earth)

property body_fixed_coord_frame

Gets the underlying body fixed coordinate frame class (e.g. ITRS for Earth) or None if no such class exists.

get_coord_list(time_list, velocity=False, ephemeris='builtin')

Computes the set of positions (and velocities, if requested) of the Celestial Body in the ICRS frame. Any further frame transformations can then be carried out.

Default ephemeris is builtin, though it cannot compute the velocity for the Moon. Ephemeris can also be jpl, where the default implementation in Astropy is used. Be warned that the first time this is called, a large file has to be downloaded.

Parameters
  • time_list (~astropy.time.Time) – List of times where position output is requested

  • velocity (bool) – True if velocities are of the celestial body is also requested

  • ephemeris (str, optional) – Ephemeris to use. By default, use the one set with astropy.coordinates.solar_system_ephemeris.set

Returns

Set of cartesian positions (and velocities) in a SkyCoord object

Return type

SkyCoord

property inert_coord_frame

Gets the underlying inertial coordinate frame class (e.g. GCRS for Earth) or None if no such class exists.

class satmad.core.celestial_body.CelestialBodyEllipsoid(name, re, inv_f, **kwargs)

Defines an ellipsoid, the shape of most celestial bodies.

Parameters
  • name (str) – Name of the Ellipsoid

  • re (Quantity) – Equatorial Radius or Semimajor Axis of the Ellipsoid. (km)

  • inv_f (Quantity) – Inverse flattening (\(1/f\)). (dimensionless)

  • j2 (Quantity) – Dynamical form factor

  • om (Quantity) – Nominal mean angular velocity of the celestial body

j2 = None
om = None