ctrans  Coordinate transformation backend¶
CTrans: Module for backend coordinate transformations in SpacePy
This module is primarily intended to provide a backend for the standard
Coords
class rather than direct use, and the
interface is subject to change.
The CTrans
class calculates all of the necessary information
to convert between different coordinate systems at a single time. By
using Coords
the handling of multiple
times is built in, and the calling syntax is backwards compatible with
the legacy IRBEMbacked coordinate transforms.
Coordinate systems supported by this module can broadly be described by two categories. The first category is a broad set of Earthcentered coordinate systems that are specified by astronomical parameters. If we consider the International Celestial Reference Frame to be our starting point, then taking the origin as the center of the Earth instead of the solar barycenter gives us the Geocentric Celestial Reference Frame (GCRF). All coordinate systems described here are righthanded Cartesian systems, except geodetic.
Systems and their relationships:
 ECI2000: EarthCentered Inertial, J2000 epoch
This system can be considered equivalent to the GCRF, to within 10s of milliarcseconds. The zaxis is aligned with the mean celestial pole at the J2000 epoch. The xaxis is aligned with the mean equinox at the J2000 epoch. The yaxis completes and lies in the plane of the celestial equator.
 ECIMOD: EarthCentered Inertial, MeanofDate
This system accounts for precession between the J2000 epoch and the date of interest: The coordinate system is timedependent. The system is defined similarly to ECI2000, but uses the mean equinox and mean equator of the date of interest.
 ECITOD: EarthCentered Inertial, TrueofDate
This system builds on ECIMOD and accounts for the nutation (the short period perturbations on the precession). This system is therefore considered to use the true equator and true equinox of date.
 TEME: EarthCentered Inertial, True Equator Mean Equinox
This system is poorly defined in the literature, despite being used in the SGP4 orbital propagator (note that multiple versions of SGP4 exist, see e.g. Vallado et al. 2006; AIAA 20066753Rev2). The mean equinox here is not the same as the mean equinox used in, e.g., ECIMOD, but lies along the true equator between the origin of the Pseudo Earth Fixed and ECITOD frames. It is highly recommended that TEME coordinates are converted to a standard system (e.g., ECI2000) before passing to other users or to different software.
 GSE: Geocentric Solar Ecliptic
This system is not inertial. It is Earthcentered, with the xaxis pointing towards the Sun. The yaxis lies in the mean ecliptic plane of date, pointing in the antiorbit direction. The zaxis is parallel to the mean ecliptic pole.
 GEO: Geocentric Geographic
This system is not inertial. It is EarthCentered and EarthFixed (also called ECEF), so that the coordinates of a point fixed on (or relative to) the surface of the Earth do not change. The xaxis lies in the Earth’s equatorial plane (zero latitude) and intersects the Prime Meridian (zero longitude; Greenwich, UK). The zaxis points to True North (which is roughly aligned with the instantaneous rotation axis).
 GDZ: Geodetic
This system is not inertial and is defined in terms of altitude above a reference ellipsoid, the geodetic latitude, and geodetic longitude. Geodetic longitude is identical to GEO longitude. Both the altitude and latitude depend on the ellipsoid used. While geodetic latitude is close to geographic latitude, they are not the same. The default here is to use the WGS84 reference ellipsoid.
The remaining coordinate systems are also reference to Earth’s magnetic field. Different versions of these systems exist, but the most common (and those given here) use a centered dipole axis.
 GSM: Geocentric Solar Magnetospheric
This system is similar to GSE, but is defined such that the centered dipole lies in the xz plane. As in all of these systems, z is positive northward. The yaxis is thus perpendicular to both the SunEarth line and the centered dipole axis (of date, defined using the first 3 coefficients of the IGRF/DGRF). GSM is therefore a rotation about the xaxis from the GSE system.
 SM: Solar Magnetic
The zaxis is aligned with the centered dipole axis of date (positive northward), and the yaxis is perpendicular to both the SunEarth line and the dipole axis. As with GSE and GSM, y is positive in the antiorbit direction. The xaxis therefore is not aligned with the SunEarth line and SM is a rotation about the yaxis from the GSM system.
 CDMAG: Geomagnetic
This is a geomagnetic analog of the GEO system. The zaxis is aligned with the centered dipole axis of date. The yaxis is perpendicular to to both the dipole axis and True North, i.e., y is the cross product of the zaxis of the GEO system with the dipole axis. The xaxis completes.
Classes¶

Coordinate transformation class for a single instance in time 

Ellipsoid definition class for geodetic coordinates 
Functions¶

Convert coordinates for N times, where N >= 1 

Convert geodetic (GDZ) coordinates to geocentric geographic 

Convert geocentric geographic (cartesian GEO) to geodetic (spherical GDZ) 

Calculate RLL from geocentric geographic (GEO) coordinates 

Calculate geocentric geographic (GEO) from RLL coordinates 
Submodules¶
IAU 1980 Nutation model 