6. SolutionOD#

class SolutionOD(filter: FilterOD, covariance_history)#

Bases: object

Stores and manages the results of an orbit determination process. Allows for the retrieval of estimated state deviations, covariance history, and postfit residuals from a filter object (e.g., Kalman Filter). Also provides methods to calculate the estimated trajectory for a given set of epochs and to map state deviations across different epochs.

Encapsulates key outputs from an orbit determination process and integrates with other parts of the Scarabaeus software to handle spacecraft orbit determination.

Notes

Relies heavily on the FilterOD object, which performs orbit determination.

Covariance history and postfit residuals are useful for assessing the quality of the solution.

The map_state_deviation_to_epoch method is important for iterating through multiple solutions.

Interacts with measurement data and can refresh measurements after detecting and removing outliers.

References

Thorne, A., & Miele, A. (2016). Spacecraft Trajectory Optimization. Cambridge University Press. Lewis, H. G. (2014). The Mathematics of Spacecraft Navigation. Springer.

Attributes

covariance_history

The history of covariance values.

filter

The filter object used for orbit determination.

postfit_residuals

The postfit residuals (if covariance analysis is disabled).

state_deviation_history

The history of state deviations (if covariance analysis is disabled).

Methods

estimated_trajectory(epochs)

Computes the estimated trajectory (position, velocity, parameters) for a given set of epochs.

map_state_deviation_to_epoch([map_back_sequence])

Maps the state deviation at the current epoch to the prior epoch using the state transition matrix.

refresh_measurements_after_outliers(Orbiter, ...)

Refreshes measurement data by removing outliers and updating the remaining epochs.

sync_survived_indices(curr_outlier_ind)

Syncs the indices of survived epochs after removing outliers.

estimated_trajectory(epochs: EpochArray)#

Computes the estimated trajectory (position, velocity, parameters) for a given set of epochs.

Parameters:

epochs (EpochArray) – The epochs for which the estimated trajectory is computed.

Returns:

estimated_pos, estimated_vel, estimated_params – A tuple with the following values corresponding to their respective indices:

  • [0] = estimated_posnumpy.ndarray

    The estimated position at each epoch.

  • [1] = estimated_velnumpy.ndarray

    The estimated velocity at each epoch.

  • [2] = estimated_paramsnumpy.ndarray or list or None

    The estimated parameters if available, otherwise None.

Return type:

tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]

map_state_deviation_to_epoch(map_back_sequence=True)#

Maps the state deviation at the current epoch to the prior epoch using the state transition matrix.

Parameters:

map_back_sequence (bool, optional) – If True, maps deviations back through the sequence; otherwise, maps only the last leg.

Returns:

mapped – The mapped prior state deviation.

Return type:

numpy.ndarray

refresh_measurements_after_outliers(Orbiter: Spacecraft, observed_value, outlier_ind: list) tuple[EpochArray, RangeIdeal | RangeRateIdeal, dict]#

Refreshes measurement data by removing outliers and updating the remaining epochs.

Parameters:
  • GS1_object (RangeIdeal or RangerateIdeal) – The measurement object storing ideal range or range rate data.

  • Orbiter (Spacecraft) – The spacecraft for which the measurements are updated.

  • observed_value (Range_GS1 or Rangerate_GS1) – The original observed measurement data.

  • outlier_ind (list) – List of indices of outliers to be removed.

Returns:

epochs_after_outlier, obs_new, epoch_values – A tuple with the following values corresponding to their respective indices:

  • [0] = epochs_array_after_outlierEpochArray

    Array of epochs after removing outliers.

  • [1] = observed_newRangeIdeal or RangeRateIdeal

    Updated measurement object after outlier removal.

  • [2] = epoch_value_dictdict

    Dictionary mapping updated epoch indices to original values.

Return type:

tuple[EpochArray, Type[GS1_object], dict]

sync_survived_indices(curr_outlier_ind: list) dict#

Syncs the indices of survived epochs after removing outliers.

Parameters:
  • prev_dict (dict) – Dictionary containing epoch indices and corresponding values before outlier removal.

  • curr_outlier_ind (list) – List of indices representing removed outliers.

Returns:

updated – Updated dictionary with outliers removed and remaining indices synced.

Return type:

dict

property covariance_history: list#

The history of covariance values.

property filter: FilterOD#

The filter object used for orbit determination.

property postfit_residuals: list#

The postfit residuals (if covariance analysis is disabled).

property state_deviation_history: list#

The history of state deviations (if covariance analysis is disabled).