ADCS.orbits.orbit module

class ADCS.orbits.orbit.Orbit(os0, end_time=None, dt=None, use_J2=True, fast=True, verbose=True)[source]

Bases: object

Time-ordered container and propagator for orbital states.

Notes

The fast argument is accepted for backward compatibility but is ignored: this implementation always computes real environment vectors (Sun and magnetic field) and full frame transforms for each stored Orbital_State.

Performance

For propagated orbits, this constructor propagates the translational dynamics using pure NumPy and then batch-computes the expensive environment quantities (Skyfield frames / Sun vector and ppigrf geomagnetic field) for the full time array once, before constructing individual Orbital_State objects.

param os0:

Initial orbital state or list of orbital states.

type os0:

Orbital_State or list[Orbital_State]

param end_time:

Final propagation time in J2000 centuries.

type end_time:

float or None

param dt:

Propagation time step in seconds.

type dt:

float or None

param use_J2:

Enable or disable the J2 gravitational perturbation.

type use_J2:

bool

param fast:

Backward-compatible parameter (ignored).

type fast:

bool

param verbose:

Enable progress bar output during propagation.

type verbose:

bool

raises ValueError:

If input arguments are inconsistent or unsupported.

ecef_to_eci_orbit(b_ecef_vec)[source]

Convert ECEF vectors to ECI coordinates along the orbit.

Parameters:

b_ecef_vec (numpy.ndarray) – Vectors expressed in the ECEF frame.

Returns:

Vectors expressed in the ECI frame.

Return type:

numpy.ndarray

geocentric_to_ecef_orbit(b_vec)[source]

Convert geocentric spherical vectors to ECEF coordinates along the orbit.

Parameters:

b_vec (numpy.ndarray) – Geocentric vector components (b_r, b_theta, b_phi).

Returns:

Vectors expressed in the ECEF frame.

Return type:

numpy.ndarray

get_b_eci_orbit()[source]

Compute the geomagnetic field in the ECI frame along the orbit.

If per-state magnetic field vectors are already available, they are returned directly.

Returns:

Geomagnetic field vectors in ECI coordinates [Tesla].

Return type:

numpy.ndarray

get_os(J2000)[source]

Retrieve or interpolate the orbital state at a given epoch.

Parameters:

J2000 (float) – Requested epoch in J2000 centuries.

Returns:

Orbital state at the specified time.

Return type:

Orbital_State

Raises:

ValueError – If the requested time lies outside the orbit span.

get_range(t_0, t_1, dt=None)[source]

Extract a sub-orbit over a specified time interval.

Parameters:
  • t_0 (float) – Start time in J2000 centuries.

  • t_1 (float) – End time in J2000 centuries.

  • dt (float or None) – Optional sampling interval in seconds.

Returns:

New orbit or orbital state(s) within the given time range.

Return type:

Orbit or Orbital_State

Raises:

ValueError – If the time bounds are invalid or outside the orbit span.

get_vecs()[source]

Return commonly used orbit-related vectors.

Returns:

Lists of vectors [R, V, B, S, rho] over the orbit.

Return type:

list[list[numpy.ndarray]]

max_time()[source]

Return the latest epoch in the orbit.

Returns:

Maximum J2000 time.

Return type:

float

min_time()[source]

Return the earliest epoch in the orbit.

Returns:

Minimum J2000 time.

Return type:

float

new_orbit_from_times(time_list)[source]

Construct a new orbit sampled at specific epochs.

Parameters:

time_list (list[float]) – List of epochs in J2000 centuries.

Returns:

New orbit containing interpolated states.

Return type:

Orbit

Raises:

ValueError – If any requested time lies outside the orbit span.

next_state(input)[source]

Return the next available orbital state after a given time.

Parameters:

input (Orbital_State or float) – Reference time or orbital state.

Returns:

Next orbital state in chronological order.

Return type:

Orbital_State

Raises:

ValueError – If the input time lies outside the orbit span.

time_in_span(t)[source]

Check whether a time lies within the orbit span.

Parameters:

t (float) – Time in J2000 centuries.

Returns:

True if the time is within the orbit span.

Return type:

bool

Parameters: