heyoka.model.sgp4#
- heyoka.model.sgp4(inputs: list[expression] | None = None) list[expression] #
Produces the expressions for the SGP4 propagator.
Added in version 5.1.0.
Added in version 7.0.0: This function now optionally accepts a list of input expressions.
Note
This is a low-level function for advanced use cases. If you are looking for a fast, high-level SGP4 propagator supporting parallel and batched operations, please refer to
sgp4_propagator()
.SGP4 is a widely-used analytical propagator for the dynamics of Earth-orbiting satellites, described in detail in the spacetrack report #3 (see also the update from 2006, on which this implementation is based).
SGP4 takes in input a general perturbations element set (GPE), for instance in the form of a two-line element set (aka TLE), and a time delta relative to the epoch in the GPE. It returns the Cartesian state vector (position and velocity) of the spacecraft at the specified time in the True Equator Mean Equinox (TEME) reference frame.
If inputs is provided and it has nonzero length, it must be a list of 8 expressions, which must represent, respectively:
n0
: the mean motion from the GPE (in [rad / min]),e0
: the eccentricity from the GPE,i0
: the inclination from the GPE (in [rad]),node0
: the right ascension of the ascending node from the GPE (in [rad]),omega0
: the argument of perigee from the GPE (in [rad]),m0
: the mean anomaly from the GPE (in [rad]),bstar
: the BSTAR drag term from the GPE (in the same unit as given in the GPE),tsince
: the time elapsed from the GPE epoch (in [min]).
If inputs is not provided or it has a length of zero, 8 variable expressions named
["n0", "e0", "i0", "node0", "omega0", "m0", "bstar", "tsince"]
will be used as inputs.This function will return 7 expressions: the first 6 correspond to the Cartesian state (position and velocity respectively) of the spacecraft according to the SGP4 algorithm, while the last expression represents an error code which, if nonzero, signals the occurrence of an error in the SGP4 propagation routine. The Cartesian coordinates
x, y, z
of the satellite are returned in [km], while the velocitiesvx, vy, vz
are returned in [km / s]. When nonzero, the error code can assume the following values:1: the mean eccentricity is outside the range [0.0, 1.0],
2: the mean mean motion is less than zero,
3: the perturbed eccentricity is outside the range [0.0, 1.0],
4: the semilatus rectum is less than zero,
5: the satellite was underground (NOTE: this error code is no longer in use),
6: the satellite has decayed.
Note
Currently this function does not implement the deep-space part of the SGP4 algorithm (aka SDP4), and consequently it should not be used with satellites whose orbital period is greater than 225 minutes. You can use the
gpe_is_deep_space()
function to check whether a GPE is deep-space or not.See also
- Returns:
a list of 7 expressions representing the Cartesian state vector of an Earth-orbiting satellite and an error code, as functions of the inputs.
- Raises:
ValueError – if the list of inputs has a length other than 0 or 8.