PiecewiseFirstOrderGaussMarkov#

class PiecewiseFirstOrderGaussMarkov(state_array: StateArray, spacecraft: Spacecraft, base_frame: Frame, t0: float, batch_length: float, n_batches: int, default_beta: ndarray | None = None)#

Bases: DynamicModel

Piecewise first-order exponentially correlated Gauss-Markov acceleration model using a single stacked acceleration state.

The propagation arc is divided into \(N_b\) fixed-length time batches. Each batch \(k\) carries an independent empirical acceleration \(\mathbf{a}^{(k)}\) that decays exponentially within the batch:

\[\dot{\mathbf{a}}^{(k)} = -\mathbf{B}^{(k)}\,\mathbf{a}^{(k)}\]

Only the active batch \(k^*\) at the current epoch contributes to the translational dynamics: \(\ddot{\mathbf{r}} = \mathbf{a}_{\mathrm{other}} + \mathbf{a}^{(k^*)}\). The inverse correlation times \(\beta_i^{(k)}\) can be estimated as static parameters via ("beta_pfogm", spice_id) state entries.

The model partitions the propagation arc into fixed-length time batches and assigns one 3D empirical acceleration state to each batch. The full augmented acceleration state is stored as

\[\begin{split}\mathbf a_{pfogm} = \begin{bmatrix} \mathbf a^{(0)} \\ \mathbf a^{(1)} \\ \vdots \\ \mathbf a^{(N_b-1)} \end{bmatrix} \in \mathbb{R}^{3N_b}\end{split}\]

where each batch state is

\[\begin{split}\mathbf a^{(k)} = \begin{bmatrix} a_x^{(k)} \\ a_y^{(k)} \\ a_z^{(k)} \end{bmatrix}\end{split}\]

The translational dynamics are

\[\dot{\mathbf r} = \mathbf v\]
\[\dot{\mathbf v} = \mathbf a^{(k^*)}\]

where \(k^*\) is the active batch index at the current epoch.

Each batch follows first-order Gauss-Markov drift

\[\dot{\mathbf a}^{(k)} = -\mathbf B^{(k)} \mathbf a^{(k)}\]

with

\[\begin{split}\mathbf B^{(k)} = \begin{bmatrix} \beta_x^{(k)} & 0 & 0 \\ 0 & \beta_y^{(k)} & 0 \\ 0 & 0 & \beta_z^{(k)} \end{bmatrix}\end{split}\]

The full stacked dynamics are therefore block diagonal.

Parameters:
  • state_array (StateArray) – State definition containing a_pfogm and optionally beta_pfogm.

  • spacecraft (Spacecraft) – Spacecraft object associated with the propagated body.

  • base_frame (Frame) – Reference frame of the propagator.

  • t0 (float) – Reference epoch at which batch 0 starts.

  • batch_length (float) – Duration of each time batch (same units as t0).

  • n_batches (int) – Number of piecewise time batches.

  • default_beta (np.ndarray, optional) – Default 3-vector of inverse correlation coefficients [beta_x, beta_y, beta_z] used for every batch when beta_pfogm is not provided in the state array.

Raises:

ValueError – If batch_length <= 0 or n_batches < 1.

Notes

The state vector must contain:

  • ("a_pfogm", 3 * n_batches, "estimated", "dynamic", owner, value)

Optionally, if the inverse correlation times are estimated:

  • ("beta_pfogm", 3 * n_batches, "estimated", "static", owner, value)

If beta_pfogm is not provided, default_beta is repeated for all batches.

Only the active batch contributes to compute_acceleration(); all stacked batch states evolve according to their own drift, giving block-diagonal Jacobians and a simple selection matrix.

See also

scarabaeus.FirstOrderGaussMarkov

Single-arc variant of this model.

scarabaeus.StateArray

State vector used to initialize the model.

scarabaeus.Propagator

Propagator that integrates the augmented state.

scarabaeus.DynamicModel

Abstract base class for all force model components.

Attributes:
batch_length

Duration of one batch.

default_beta

Default inverse correlation coefficients used when ‘beta_pfogm’ is not provided.

n_batches

Number of batches.

origin

Celestial body serving as origin of the state vector.

origin_name

Name of the origin body.

ref_frame

Reference frame used by the model.

t0

Reference epoch of the first batch.

Methods

compute_acceleration(position, ...)

Return the active batch Gauss-Markov acceleration applied to the body.

get_active_batch_bounds(epoch)

Return the active batch index and its time bounds.

get_all_batch_accelerations(current_state, body)

Return all batch acceleration states reshaped as (n_batches, 3).

compute_acceleration(position: ndarray, current_state: dict, epoch: float, body: Body) ndarray#

Return the active batch Gauss-Markov acceleration applied to the body.

Parameters:
  • position (np.ndarray) – Spacecraft position vector, unused here but retained for API consistency.

  • current_state (dict) – Dictionary containing the propagated state.

  • epoch (float) – Current propagation epoch.

  • body (Body) – Body for which the acceleration is evaluated.

Returns:

Active batch acceleration vector of shape (3,).

Return type:

np.ndarray

get_active_batch_bounds(epoch: float) tuple[int, float, float]#

Return the active batch index and its time bounds.

Parameters:

epoch (float) – Current epoch.

Returns:

Tuple (batch_idx, batch_start, batch_end).

Return type:

tuple[int, float, float]

get_all_batch_accelerations(current_state: dict, body: Body) ndarray#

Return all batch acceleration states reshaped as (n_batches, 3).

Returns:

Matrix whose k-th row is the acceleration vector of batch k.

Return type:

np.ndarray

property batch_length: float#

Duration of one batch.

property default_beta: ndarray#

Default inverse correlation coefficients used when ‘beta_pfogm’ is not provided.

property n_batches: int#

Number of batches.

property origin: Body#

Celestial body serving as origin of the state vector.

property origin_name: str#

Name of the origin body.

property ref_frame: str#

Reference frame used by the model.

property t0: float#

Reference epoch of the first batch.