2. Propagator#
- class Propagator(main_body: Body, state_vector: StateArray, tspan: EpochArray, third_body: bool = False, cannonball_SRP: bool = False, nPlate_SRP: bool = False, sph_harm: bool = False, sph_harm_info=None, finite_burn: bool = False, impulsive_burn_approx=False, point_masses: list = [], atol: float = 2.220446049250313e-14, rtol: float = 2.220446049250313e-14, integrator: str = 'DOP853', propagate_STM: bool = True, STM0=None, look_event: str = None, base_frame: Frame = None, convert_to_original_frame: bool = False)#
Bases:
object
Scarabaeus’ interface to propagators.
Supports numerical integration via two different algorithms:
Using one of these algorithms, integrates the ordinary differential equations (ODEs) that describe the system’s dynamics.
- Parameters:
main_body (
Body
) – The body to be propagated.state_vector (
StateArray
) – The initial state vector of the body to be propagated.tspan (
EpochArray
) – The timespan over which the propagation should occur.third_body (
bool
, optional) – Indicates whether thirdy body accelerations should be incorporated into the dynamics of the propagation. Defaults toFalse
.cannonball_SRP (
bool
, optional) – Indicates whether SRP accelerations should be incorporated into the dynamics of the propagation via the cannonball model. Defaults toFalse
.nPlate_SRP (
bool
, optional) – Indicates whether SRP accelerations should be incorporated into the dynamics of the propagation via the N-Plate model. Defaults toFalse
.sph_harm (
bool
, optional) – Indicates whether accelerations due to spherical harmonics should be incorporated into the dynamics of the propagation. Defaults toFalse
.sph_harm_info (
dict optional
) – Necessary information to define spherical harmonics. Defaults toNone
.finite_burn (
bool
, optional) – Indicates whether accelerations due to a finite burn or multiple finite burns should be incorporated into the dynamics of the propagation. Defaults toFalse
.impulsive_burn_approx (
bool
, optional) – Defaults toFalse
.point_masses (
list[str]
, optional) – List of all point masses to be included in the dynamics of the propagation. Unused ifthird_body
is set toFalse
. Defaults to[]
.atol (
float
, optional) – The absolute tolerance of the propagator. Defaults to2.220446049250313e-14
.rtol (
float
, optional) – The relative tolerance of the propagator. Defaults to2.220446049250313e-14
.integrator (
str
, optional) –The integrator to be used in the propagation. Can select from:
'PyASA'
- WORK IN PROGRESS'DOP853'
- the current supported numerical integrator.
Defaults to
'DOP853'
.propagate_STM (
bool
, optional) – Indicates if the initial STM should be propagated. Defaults toTrue
.STM0 (
numpy.ndarray
, optional) – Initial State Transition Matrix. Defaults toNone
.look_event (
str
, optional) – WORK IN PROGRESS. Defaults toNone
.base_frame (
Frame
, optional) – DESC. Ifbase_frame = None
, defaults to the J2000 frame.
See also
scarabaeus.ForceModel
,scarabaeus.CannonballSRP
,scarabaeus.nPlateSRP
,scarabaeus.SphericalHarmonicsGravity
,sccarabaeus.ThreeBodyGravity
Notes
References
Attributes
Dynamic Matrices of the propagated state.
State Transition Matrix array corresponding to the propagated solution.
The initial State Transition Matrix (STM).
The frame ratios of the State Transition Matrix (STM).
The units of the State Transition Matrix (STM).
Absolute tolerance for numerical integration.
The base reference frame for propagation.
List of active dynamics modes during propagation.
Indicates whether finite burns are considered.
Force model used for propagation.
The state vector associated with the propagation.
The state vector not associated with the propagation, but with the original frames.
Indicates whether impulsive burns are included.
Indicates whether impulsive burns are approximated.
The numerical integrator used for propagation.
The event type for the propagator.
The primary celestial body for the propagator.
The origin body in the reference frame.
List of point masses for third-body gravitational effects.
Indicates whether the State Transition Matrix (STM) is propagated.
State array corresponding to the propagated solution.
The state vector not associated propagated, but with the original frames.
The state vector associated with the propagation.
Relative tolerance for numerical integration.
Spherical harmonics information for gravity modeling.
State array corresponding to the propagated solution.
The frames of the State.
The units of the State .
The initial epoch for propagation.
Time array corresponding to the propagated solution.
The time span over which propagation occurs.
The time span over which propagation occurs in the original frame.
Numerical solution of the propagated state.
Methods
convert_to_original_frames
(propagated_state)Converts the propagated state back to the original frames.
from_dict
(data)Creates a Propagator instance from a dictionary.
ode
(epoch, Y, reduced_indices_map, ...)Compute the time derivative of the state and the Jacobian (STM derivative) for integration by the propagator.
Precompute and return indices for position, reduced state, and full state vectors.
Propagates the state of the system using numerical integration.
reinitialize
([main_body, state_vector, ...])Reinitializes the Propagator object with new or updated attribute values.
to_dict
()Returns all attributes of the Propagator class as a dictionary.
- classmethod from_dict(data: dict) Propagator #
Creates a Propagator instance from a dictionary.
- Parameters:
data (
dict
) – A dictionary representation of a Propagator instance.- Returns:
A new instance of the Propagator class.
- Return type:
- convert_to_original_frames(propagated_state)#
Converts the propagated state back to the original frames.
- Parameters:
propagated_state (
StateArray
) – The state array after propagation in the base frame.- Returns:
A new state array with components converted back to their original frames.
- Return type:
- ode(epoch: float, Y: array, reduced_indices_map, reduced_indices_dot_map, indices_map, indices_dot_map)#
Compute the time derivative of the state and the Jacobian (STM derivative) for integration by the propagator.
- Parameters:
epoch – Current epoch (float)
Y – Concatenated state vector and STM (np.array)
- Returns:
Time derivative of state and Jacobian to be integrated (np.array)
- precompute_indices()#
Precompute and return indices for position, reduced state, and full state vectors.
- Returns:
A tuple of dictionaries containing precomputed indices.
- propagate()#
Propagates the state of the system using numerical integration.
This method integrates the ordinary differential equations (ODEs) that describe the system’s dynamics using the specified integration method. The integration is performed over the time span defined by the initial and final times of the system’s time vector.
- Returns:
None
- Raises:
None –
- reinitialize(main_body: Body = None, state_vector: scbt.StateArray = None, tspan: EpochArray = None, third_body: bool = None, cannonball_SRP: bool = None, nPlate_SRP: bool = None, sph_harm: bool = None, sph_harm_info: dict = None, finite_burn: bool = None, impulsive_burn_approx: bool = None, point_masses: list[str] = None, atol: float = None, rtol: float = None, integrator: str = None, propagate_STM: bool = None, STM0: ndarray = None, look_event: str = None, base_frame: Frame = None, convert_to_original_frame: bool = None) Propagator #
Reinitializes the Propagator object with new or updated attribute values.
- Parameters:
main_body (
scb.Body
, optional) – The primary celestial body for the propagator.state_vector (
scbt.StateArray
, optional) – Updated state vector.tspan (
scb.EpochArray
, optional) – Updated time span for propagation.third_body (
bool
, optional) – Flag for third-body effects.cannonball_SRP (
bool
, optional) – Flag for cannonball SRP model.nPlate_SRP (
bool
, optional) – Flag for n-Plate SRP model.sph_harm (
bool
, optional) – Flag for spherical harmonics gravity model.sph_harm_info (
dict
, optional) – Updated spherical harmonics information.finite_burn (
bool
, optional) – Flag for finite-burn thrust modeling.point_masses (
list[str]
, optional) – Updated point masses for third-body effects.atol (
float
, optional) – Absolute tolerance for integration.rtol (
float
, optional) – Relative tolerance for integration.integrator (
str
, optional) – Integrator type (e.g., ‘DOP853’ or ‘PyASA’).propagate_STM (
bool
, optional) – Flag for propagating STM.STM0 (
np.ndarray
, optional) – Updated initial State Transition Matrix.look_event (
str
, optional) – Event type for the propagator.base_frame (
str
, optional) – Base reference frame for propagation.
- Returns:
A new instance of the Propagator class with updated attributes.
- Return type:
- to_dict() dict #
Returns all attributes of the Propagator class as a dictionary.
- Returns:
A dictionary representation of the Propagator instance.
- Return type:
- property As#
Dynamic Matrices of the propagated state.
- Base:
Propagator
- Type:
np.ndarray
- property STM#
State Transition Matrix array corresponding to the propagated solution.
- Base:
Propagator
- Type:
np.ndarray
- property STM0#
The initial State Transition Matrix (STM).
- Base:
Propagator
- Type:
np.ndarray
- property STM_frame#
The frame ratios of the State Transition Matrix (STM).
- Base:
Propagator
- Type:
np.ndarray
- property STM_units#
The units of the State Transition Matrix (STM).
- Base:
Propagator
- Type:
np.ndarray
- property dynamics_mode_list#
List of active dynamics modes during propagation.
- property force_model#
Force model used for propagation.
- Base:
Propagator
- Type:
scb.ForceModel
- property full_state_vector#
The state vector associated with the propagation.
- Base:
Propagator
- Type:
scbt.StateArray
- property full_state_vector_original_frames#
The state vector not associated with the propagation, but with the original frames.
- Base:
Propagator
- Type:
scbt.StateArray
- property impulsive_burn#
Indicates whether impulsive burns are included.
- Base:
Propagator
- Type:
- property impulsive_burn_approx#
Indicates whether impulsive burns are approximated.
- Base:
Propagator
- Type:
- property main_body#
The primary celestial body for the propagator.
- Base:
Propagator
- Type:
scb.Body
- property origin#
The origin body in the reference frame.
- Base:
Propagator
- Type:
scb.Body
- property point_masses#
List of point masses for third-body gravitational effects.
- property propagate_STM#
Indicates whether the State Transition Matrix (STM) is propagated.
- Base:
Propagator
- Type:
- property propagated_state_array#
State array corresponding to the propagated solution.
- Base:
Propagator
- Type:
np.ndarray
- property propagated_state_array_original_frame#
The state vector not associated propagated, but with the original frames.
- Base:
Propagator
- Type:
scbt.StateArray
- property reduced_state_vector#
The state vector associated with the propagation.
- Base:
Propagator
- Type:
scbt.StateArray
- property sph_harm_info#
Spherical harmonics information for gravity modeling.
- Base:
Propagator
- Type:
- property state#
State array corresponding to the propagated solution.
- Base:
Propagator
- Type:
np.ndarray
- property state_frames#
The frames of the State.
- Base:
Propagator
- Type:
np.ndarray
- property state_units#
The units of the State .
- Base:
Propagator
- Type:
np.ndarray
- property t0#
The initial epoch for propagation.
- Base:
Propagator
- Type:
scb.EpochArray
- property times#
Time array corresponding to the propagated solution.
- Base:
Propagator
- Type:
np.ndarray
- property tspan#
The time span over which propagation occurs.
- Base:
Propagator
- Type:
scb.EpochArray
- property tspan_original_frame#
The time span over which propagation occurs in the original frame.
- Base:
Propagator
- Type:
scb.EpochArray
- property ys#
Numerical solution of the propagated state.
- Base:
Propagator
- Type:
np.ndarray