NumericalPropagator¶
Generic numerical propagator for arbitrary dynamical systems. Unlike NumericalOrbitPropagator which has built-in orbital force models, NumericalPropagator accepts user-defined dynamics functions, making it suitable for attitude propagation, chemical kinetics, population models, or any ODE system.
Note
For conceptual explanations and usage examples, see Generic Dynamics in the User Guide.
NumericalPropagator ¶
NumericalPropagator(epoch: Epoch, state: ndarray, dynamics: callable, propagation_config: NumericalPropagationConfig, params: Union[ndarray, None] = None, initial_covariance: Union[ndarray, None] = None, control_input: Any = None)
Generic numerical propagator for arbitrary N-dimensional dynamical systems.
This propagator accepts a user-defined Python dynamics function and can be applied to any system of ODEs: attitude dynamics, chemical kinetics, population models, control systems, etc.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epoch | Epoch | Initial epoch. | required |
state | ndarray | Initial state vector (N-dimensional). | required |
dynamics | callable | Dynamics function: f(t, state, params) -> derivative. Should accept (float, np.ndarray, Optional[np.ndarray]) and return np.ndarray. | required |
propagation_config | NumericalPropagationConfig | Propagation configuration. | required |
params | ndarray or None | Optional parameter vector for the dynamics function. | None |
initial_covariance | ndarray or None | Optional initial covariance matrix (enables STM). | None |
Attributes:
| Name | Type | Description |
|---|---|---|
current_epoch | Epoch | Current propagation time |
initial_epoch | Epoch | Initial epoch from propagator creation |
state_dim | int | Dimension of state vector |
step_size | float | Current integration step size in seconds |
Example
Initialize instance.
add_event_detector method descriptor ¶
add_event_detector(event: Union[TimeEvent, ValueEvent, BinaryEvent]) -> Any
Add an event detector to this propagator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event | TimeEvent or ValueEvent or BinaryEvent | Event detector | required |
clear_events method descriptor ¶
clear_events() -> Any
Clear all detected events from the event log.
event_log method descriptor ¶
event_log() -> list[DetectedEvent]
Get the event log (list of detected events).
Returns:
| Type | Description |
|---|---|
list[DetectedEvent] | list[DetectedEvent]: List of events detected during propagation. |
events_by_detector_index method descriptor ¶
events_by_detector_index(index: int) -> list[DetectedEvent]
Get events by detector index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
index | int | Detector index (0-based, in order of add_event_detector calls). | required |
Returns:
| Type | Description |
|---|---|
list[DetectedEvent] | list[DetectedEvent]: Events from the specified detector. |
events_by_name method descriptor ¶
events_by_name(name: str) -> list[DetectedEvent]
Get events by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | Event name to filter by. | required |
Returns:
| Type | Description |
|---|---|
list[DetectedEvent] | list[DetectedEvent]: Events matching the given name. |
events_in_range method descriptor ¶
events_in_range(start: Epoch, end: Epoch) -> list[DetectedEvent]
Get events in time range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start | Epoch | Start of time range. | required |
end | Epoch | End of time range. | required |
Returns:
| Type | Description |
|---|---|
list[DetectedEvent] | list[DetectedEvent]: Events within the given time range. |
generate_uuid method descriptor ¶
generate_uuid() -> Any
Generate a new UUID and set it in-place (mutating).
get_covariance_interpolation_method method descriptor ¶
Get the current covariance interpolation method.
Returns:
| Name | Type | Description |
|---|---|---|
CovarianceInterpolationMethod | CovarianceInterpolationMethod | The current covariance interpolation method. |
get_interpolation_method method descriptor ¶
get_interpolation_method() -> InterpolationMethod
Get the current interpolation method.
Returns:
| Name | Type | Description |
|---|---|---|
InterpolationMethod | InterpolationMethod | The current interpolation method. |
latest_event method descriptor ¶
latest_event() -> DetectedEvent
Get latest detected event, if any.
Returns:
| Type | Description |
|---|---|
DetectedEvent | DetectedEvent or None: The most recently detected event. |
propagate_steps method descriptor ¶
propagate_steps(num_steps) -> Any
Propagate forward by specified number of steps.
propagate_to method descriptor ¶
propagate_to(target_epoch) -> Any
Propagate to a specific target epoch.
query_events method descriptor ¶
query_events() -> EventQuery
Create an event query builder for filtering detected events.
Returns an EventQuery that allows chainable filtering of detected events. Call .collect() on the query to get the final list of events.
Returns:
| Name | Type | Description |
|---|---|---|
EventQuery | EventQuery | Query builder for filtering events |
Example
reset_termination method descriptor ¶
reset_termination() -> Any
Reset the termination flag to allow continued propagation.
set_covariance_interpolation_method method descriptor ¶
set_covariance_interpolation_method(method: CovarianceInterpolationMethod) -> Any
Set the covariance interpolation method in-place.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method | CovarianceInterpolationMethod | The covariance interpolation method to use. | required |
set_eviction_policy_max_age method descriptor ¶
set_eviction_policy_max_age(max_age) -> Any
Set trajectory eviction policy based on maximum age.
set_eviction_policy_max_size method descriptor ¶
set_eviction_policy_max_size(max_size) -> Any
Set trajectory eviction policy based on maximum size.
set_id method descriptor ¶
Set the numeric ID in-place (mutating).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id | int or None | Numeric ID to assign, or None to clear. | required |
set_identity method descriptor ¶
set_interpolation_method method descriptor ¶
set_interpolation_method(method: InterpolationMethod) -> Any
Set the interpolation method in-place.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method | InterpolationMethod | The interpolation method to use. | required |
set_name method descriptor ¶
Set the name in-place (mutating).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str or None | Name to assign, or None to clear. | required |
set_uuid method descriptor ¶
Set the UUID in-place (mutating).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uuid_str | str or None | UUID string to assign, or None to clear. | required |
terminated method descriptor ¶
terminated() -> bool
Check if propagator is terminated due to a terminal event.
Returns:
| Name | Type | Description |
|---|---|---|
bool | bool | True if propagation was stopped by a terminal event. |
trajectory_mode method descriptor ¶
with_covariance_interpolation_method method descriptor ¶
with_covariance_interpolation_method(method: CovarianceInterpolationMethod) -> Any
Set the covariance interpolation method using builder pattern. Note: Returns None as Python doesn't support returning mutable self with borrowed args. Use method chaining via separate calls or use set_covariance_interpolation_method instead.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method | CovarianceInterpolationMethod | The covariance interpolation method to use. | required |
with_identity method descriptor ¶
with_identity(name: Union[str, None], uuid_str: Union[str, None], id: Union[int, None]) -> NumericalPropagator
Set all identity fields at once and return self (consuming constructor pattern).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str or None | Optional name to assign. | required |
uuid_str | str or None | Optional UUID string to assign. | required |
id | int or None | Optional numeric ID to assign. | required |
Returns:
| Name | Type | Description |
|---|---|---|
NumericalPropagator | NumericalPropagator | Self with identity set. |
with_interpolation_method method descriptor ¶
with_interpolation_method(method: InterpolationMethod) -> Any
Set the interpolation method using builder pattern. Note: Returns None as Python doesn't support returning mutable self with borrowed args. Use method chaining via separate calls or use set_interpolation_method instead.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method | InterpolationMethod | The interpolation method to use. | required |
See Also¶
- NumericalOrbitPropagator - Orbit propagator with built-in force models
- Event Detection - Event detection system
- Numerical Propagation Guide - User guide documentation