ADCS.orbits.sgp4_orbit module

SGP4 propagation from a TLE fitted to the initial state.

The initial osculating state is turned into SGP4 mean elements by a short fixed-point iteration, so that SGP4 evaluated at the epoch reproduces the initial position to within the precision of the TLE format (tens of metres). This is a fit at one instant, not an orbit determination over an arc.

class ADCS.orbits.sgp4_orbit.SGP4Orbit(os0, end_time=None, dt=None, fast=True, verbose=True, zonal_J=0, magnetic_model=None, environment=None, satellite=None, bstar=None, fit_iterations=20, fit_tol_km=0.02)[source]

Bases: Orbit

Attitude-independent SGP4 orbit propagated from an initial state.

SGP4 mean elements are fitted to os0 so that the SGP4 position at the epoch matches os0.R. The fit is a fixed-point iteration on equinoctial elements: each pass propagates the current TLE to the epoch, takes the osculating elements of the result, and corrects the mean elements by the difference to the target. The TLE format limits the agreement to a few tens of metres (four-decimal angles, 1e-7 eccentricity). After the fit SGP4 advances the satellite independently of the attitude loop.

If bstar is omitted and a satellite is provided, B* is estimated from its isotropic average drag area. For faces \(i\) with area \(A_i\) and drag coefficient \(C_{D,i}\),

\[\overline{C_D A} = \frac{1}{4}\sum_i C_{D,i}A_i, \qquad B^* = \frac{1}{2}\rho_0\frac{\overline{C_D A}}{m}.\]

Here \(m\) is satellite mass and \(\rho_0=2.461\times10^{-5}\) is the SGP4 reference-density convention. This is a rough attitude-average estimate; a manually supplied B* takes precedence. Without a drag disturbance B* is 0 and a warning is issued. The SGP4/TLE B* field convention is inverse Earth radii.

Parameters:
  • os0 (ADCS.orbits.orbital_state.Orbital_State) – Initial orbital state; it must define a bound elliptic orbit.

  • end_time (float or None) – Final epoch in J2000 centuries; defaults to os0.J2000.

  • dt (float or None) – Requested node spacing in seconds for the precomputed trajectory.

  • fast (bool) – Backward-compatible argument passed to Orbit.

  • verbose (bool) – Show a tqdm progress bar while precomputing the trajectory.

  • zonal_J (int) – Backward-compatible gravity setting passed to Orbit.

  • magnetic_model (str or None) – Optional magnetic-field model override.

  • environment (ADCS.environment.environment.Environment or None) – Environment used to construct returned orbital states.

  • satellite (ADCS.satellite_hardware.satellite.satellite.Satellite or None) – Satellite geometry used to estimate B* when bstar is omitted.

  • bstar (float or None) – Manual SGP4/TLE B* value, in inverse Earth radii. If supplied, this value overrides the geometry-based estimate.

  • fit_iterations (int) – Maximum fixed-point passes of the mean-element fit.

  • fit_tol_km (float) – Position residual at the epoch below which the fit stops.

Raises:
  • TypeError – If os0 is not one Orbital_State.

  • ValueError – If B* is not finite, geometry-derived B* is invalid, or os0 is not a bound elliptic orbit.

tle

The fitted (line1, line2).

fit_residual_km

Distance between SGP4 at the epoch and os0.R after the fit.

get_os(J2000)[source]

Return the SGP4 state at J2000, including between stored nodes.

Orbit.get_os fills gaps by RK4 propagation with its gravity model. That is appropriate for Orbit but would make this subclass switch dynamics between nodes. Keep the base class’s range checks and exact node handling, then evaluate non-node epochs with the fitted TLE.