Reference API#

All the gory details that you would need to use AstroForge to its fullest.

Constants#

AstroForge exports a few useful constants:

R_earth

Equatorial radius of the Earth (km)

GM

Gravitational parameter of the Earth (km3 / s2)

J2

Oblateness of the Earth

Omega

Rotation rate of the Earth (rad/s)

Rgeo

Orbital radius of the GEO belt (km)

Vgeo

Orbital velocity for a satellite in GEO (km/s)

Ageo

Primary acceleration for a satellite in GEO (km / s2`)

ss_GM

Gravitational parameters for the rest of the solar system (km3 / s2)

c

Speed of light (km/s)

Moon and Sun Positions#

Given an input time in Modified Julian Date (MJD) format, AstroForge can calculate the low fidelity positions of the sun and moon in GCRS or MEMED coordinates:

R_moon(time)

Low fidelity position of Moon in GCRS (Montenbruck & Gill, p.

R_moon_MEMED(time)

Low fidelity position of Moon in MEMED (Montenbruck & Gill, p.

R_sun(time)

Low fidelity position of Sun in GCRS (Montenbruck & Gill, p.

R_sun_MEMED(time)

Low fidelity position of Sun in MEMED (Montenbruck & Gill, p.

Force Models#

AstroForge utilizes Ordinary Differential Equation (ODE) solvers for propagating orbital states through time. In order to do so, one must specify the equations of motion by providing a function that evaluates the derivative of the state. Within the AstroForge, there exist both low-level utilities for creating such a function, as well as a few high-level pre-built force models that can be used off-the-shelf.

The following are the low-level utilities:

F_geo_ITRS(x)

Compute Earth's gravitational potential for a position in ITRS coordinates using an 8x8 spherical harmonics model.

F_geo_MEMED(time, z)

Compute Earth's gravitational potential for a position in ITRS coordinates using an 8x8 spherical harmonics model.

F_J2(z)

Computes the monopole (twobody) acceleration and the J2 perturbing acceleration for Earth.

F_third(r_s, r_p, GM)

Compute the perturbing gravitational acceleration due to a third body.

And these are the high-level, built-in force models:

F_mp(t, y)

A built-in medium-fidelity force model for propagating a satellite.

F_mp_srp(time, xxdot)

A built-in, medium-fidelity force model for propagating an orbital state.

kepler(t, y)

A built-in force model that computes only the two-body acceleration term.

Propagators#

The F_mp() and F_mp_srp() force models can be propagated directly, or a custom force model can be used with propagator():

mp(x0, v0, T, **kwargs)

Propagates an orbital state with a medium-fidelity force model.

mp_srp(x0, v0, alpha, T, **kwargs)

Propagates an orbital state with a medium-fidelity force model which includes solar radiation pressure.

propagator(fm, x0, t, **kwargs)

Propagates an orbital state with a given force model

Coordinate Conversions#

Much of this package is devoted to carefully handling the coordinate conversions necesary for precise orbit determination. Each of the coordinate conversion utilities are summarized below:

CIRSToMEMED(time, X)

Converts a cartesian vector from the Celestial Intermediate Reference System (CIRS) to the Mean Equator Mean Equinox of Date (MEMED) coordinate system.

CIRSToTETED(time, X)

Converts a cartesian vector from the Celestial Intermediate Reference System (CIRS) to the True Equator True Equinox of Date (TETED) coordinate system.

dut1utc(mjd[, bounds_check])

Interpolates the IERS data for the UT1-UTC difference to the time(s) given.

ITRSToMEMED(time, X)

Rotate a cartesian vector from the International Terrestrial Reference System (ITRS) to the Mean Equator Mean Equinox of Date (MEMED) coordinate system.

ITRSToTIRS(mjd, X)

Rotate a cartesian vector from the International Terrestrial Reference System (ITRS) to the Terrestrial Intermediate Reference System(TIRS) coordinate system.

ITRSToTETED(time, X[, V])

Rotate a cartesian vector from the International Terrestrial Reference System (ITRS) to the True Equator True Equinox of Date (TETED) coordinate system.

ITRSToLatLonAlt(z)

Converts a cartesian vector from the International Terrestrial Reference System (ITRS) to geodetic latitute, longitude, and altitude.

ITRSToSEZ(X, X0, lat, lon)

Converts cartesian vector in the International Terrestrial Reference System (ITRS) to a South-East-Zenith (SEZ) relative to a specific geodetic location.

LatLonAltToITRS(lat, lon, alt)

Convert a geodetic latitude, longitude, and altitude to a cartesian position vector in the International Terrestrial Reference System (ITRS).

obliquity(mjd_tdb)

Compute the mean obliquity of the ecliptic based at the time given.

MEMEDToCIRS(time, X)

Converts a cartesian vector from the Mean Equator Mean Equinox of Date (MEMED) coordinate system to the Celestrial Intermediate Reference System (CIRS).

MEMEDToITRS(time, X)

Convert a cartesian vector from the Mean Equator Mean Equinox of Date (MEMED) coordinate system to the Internation Terrestrial Reference System (ITRS).

nutate(mjd)

Compute the nutation of the Earth's rotational axis at the time given.

polarmotion(mjd[, bounds_check])

Computes the motion of the Earth's rotational axis as a function of time.

PosVelConversion(conversion, mjd, X0, V0)

Utility for converting a cartesian position and velocity vectors from one coordinate system to another.

PosVelToFPState(x, v, x_site, v_site)

Compute observables for a target with a given position and velocity as seen by a sensor with a particular position and velocity.

rmat(n, a)

Create a rotation matrix about primary axis n with rotation angle a.

rmfu(n, c, s)

Create a rotation matrix about axis n, given the sine s and cosine c of the rotation angle.

Rx(angle)

Create a rotation matrix about the first axis by the given rotation angle.

Ry(angle)

Create a rotation matrix about the second axis by the given rotation angle.

Rz(angle)

Create a rotation matrix about the third axis by the given rotation angle.

SEZToAzElRange(X)

Compute the azimuth, elevation, and range given a displacement in the SEZ coordinate frame.

shadow(n, z)

Compute whether the satellite is in shadow

TETEDToCIRS(time, X)

Rotate a cartesian vector from the True Equator True Equinox of Date (TETED) coordinate system to the Celestial Intermediate Reference System (CIRS).

TETEDToITRS(time, X)

Rotate a cartesian vector from the True Equator True Equinox of Date (TETED) coordinate system to the International Terrestrial Reference System (ITRS).

TIRSToITRS(mjd, X)

Rotate a cartesian vector from the Terrestrial Intermediate Reference System (TIRS) to the International Terrestrial Reference System (TIRS).

IERS Utilities#

Many of these coordinate conversions rely on precise data about the orientation of the Earth, which is contained within the International Earth Rotation and Reference Systems Service (IERS) Bulletin A file, found here. AstroForge has some utilities for automatically downloading and parsing this data.

download_iers()

Download and save the IERS Bulletin A file.

parse_iers()

Parse the IERS file into more readily usable intermediate files.

setup_iers([download])

Utility function for setting up the IERS utilities.