2. FilterOD#

class FilterOD(trajectory: Trajectory, initial_covariance: CovarianceMatrix, measurement_data, dataset_names: list[str])#

Bases: object

Implements an orbit determination filter for spacecraft trajectory estimation.

The filter estimates the spacecraft state and uncertainty by processing propagated trajectory data and incorporating measurement observables. It refines the estimated state statistically using a selected filtering process.

Supports both mission sequence trajectory segments (primarily for introducing delta-v maneuvers) and non-sequence trajectories. Manages various parameter types, including static/dynamic and estimated/considered parameters.

This implementation ensures a robust and adaptable framework for spacecraft orbit determination across different mission scenarios.

Parameters:
  • trajectory (Trajectory) – The trajectory passed to the filter.

  • initial_covariance (CovarianceMatrix) – The initial covariance passed to the filter.

  • measurement_data (???) – DESC

  • dataset_names (list of str) – The names of the datasets passed to the filter.

Notes

Designed to handle both sequence and non-sequence spacecraft trajectory data.

Measurement data must be consistent with the trajectory’s state definitions, and the filter will validate these data sources.

References

Tapley, B. D., Schutz, B. E., & Born, G. H. (2004). Statistical orbit determination. Elsevier.

Methods

map_covariance_definition_node(...[, ...])

Adjusts the covariance matrix to match a new state vector definition.

map_deviation_definition_node(...[, ...])

Adjusts the deviation vector to align with a new state vector definition.

map_stm_definition_node(counter_events, old_STM)

Adjusts the State Transition Matrix (STM) to match a new state definition.

observability_test([print_obs, threshold, ...])

Performs an observability analysis on the system by computing the information matrix.

unwrap_residuals(postfit_residuals, ...)

Organizes postfit residuals into a dictionary categorized by dataset.

validate_sequence_batch()

Validates consistency in state vector definitions across sequential estimation legs.

map_covariance_definition_node(counter_events: int, old_covariance: ndarray, flag_augment: bool = True) ndarray#

Adjusts the covariance matrix to match a new state vector definition.

Parameters:
  • counter_events (int) – Index of the current sequence event for state transition.

  • old_covariance (numpy.ndarray) – Previous covariance matrix to be updated.

  • flag_augment (bool, optional) – If True, expands the covariance matrix; otherwise, reduces it. Defaults to True.

Returns:

updated_covar – Updated covariance matrix reflecting the new state definition.

Return type:

numpy.ndarray

map_deviation_definition_node(counter_events: int, old_deviation: ndarray, flag_augment: bool = True) ndarray#

Adjusts the deviation vector to align with a new state vector definition.

Parameters:
  • counter_events (int) – Index of the current sequence event for state transition.

  • old_deviation (numpy.ndarray) – Previous state deviation vector.

  • flag_augment (bool, optional) – If True, expands the deviation vector; otherwise, reduces it. Defaults to True.

Returns:

updated_dev – Updated deviation vector reflecting the new state definition.

Return type:

numpy.ndarray

map_stm_definition_node(counter_events: int, old_STM: ndarray, flag_augment: bool = True) ndarray#

Adjusts the State Transition Matrix (STM) to match a new state definition.

Parameters:
  • counter_events (int) – Index of the current sequence event for state transition.

  • old_STM (numpy.ndarray) – Previous STM to be updated.

  • flag_augment (bool, optional) – If True, expands the STM; otherwise, reduces it. Defaults to True.

Returns:

updated_stm – Updated State Transition Matrix reflecting the new state definition.

Return type:

numpy.ndarray

observability_test(print_obs=False, threshold=0.1, meas_corr=None)#

Performs an observability analysis on the system by computing the information matrix.

Checks whether the system’s observability matrix has full rank and determines the positive definiteness of the information matrix.

Parameters:
  • print_obs (bool, optional) – If True, prints details of the observability analysis.

  • threshold (float, optional) – Minimum eigenvalue threshold for checking positive definiteness.

  • meas_corr (list, optional) – Measurement covariance correction factors.

Returns:

info_matrix, obs_matrix – A tuple with the following values corresponding to their respective indices:

  • [0] = info_matrixnumpy.ndarray

    The computed information matrix.

  • [1] = obs_matrixnumpy.ndarray

    The observability matrix constructed from measurement partials.

Return type:

tuple[numpy.ndarray, numpy.ndarray]

unwrap_residuals(postfit_residuals: list, dataset_names: list[str]) dict#

Organizes postfit residuals into a dictionary categorized by dataset.

Parameters:
  • postfit_residuals (list) – List of residuals and associated metadata.

  • dataset_names (list) – List of dataset names corresponding to different measurements.

Returns:

unwrapped_residuals – Dictionary mapping dataset names to corresponding residuals and sigmas.

Return type:

dict

validate_sequence_batch()#

Validates consistency in state vector definitions across sequential estimation legs.

Ensures that each state vector in a sequence contains all necessary elements from previous legs.

Return type:

None