ADCS.estimators.estimator_helpers.estimator_helpers module¶
- class ADCS.estimators.estimator_helpers.estimator_helpers.EstimatedArray(val, cov=<factory>, int_cov=<factory>)[source]¶
Bases:
objectRepresents an estimated vector with associated covariance and integrated covariance.
This structure is commonly used for parameter estimation where the state is a generic vector rather than a specific orbital state.
- Parameters:
val (np.ndarray) – The estimated state or parameter vector \(\hat{\mathbf{x}}\).
cov (np.ndarray) – The covariance matrix \(P\) representing uncertainty in
val. Must be square and match the dimensions ofval.int_cov (np.ndarray) – The integrated process covariance \(Q_{int}\) (e.g., accumulated process noise over time).
- copy()[source]¶
Creates a deep copy of the EstimatedArray.
- Returns:
A new instance with independent data copies.
- Return type:
- pull_indices(inds_mask, cov_missing_inds=None)[source]¶
Extracts a sub-estimate and associated covariance blocks based on a mask.
This is useful for isolating specific parameters from a larger state vector.
- Parameters:
inds_mask (list or np.ndarray) – Indices of the values to extract.
cov_missing_inds (list or np.ndarray, optional) – Indices to exclude from the covariance extraction (optional). If None,
inds_maskis used for covariance as well.
- Returns:
A new EstimatedArray containing only the selected elements.
- Return type:
- set_indices(inds_mask, val, cov, int_cov, cov_missing_inds=None)[source]¶
Inserts values and covariance blocks back into this estimate.
- Parameters:
inds_mask (list or np.ndarray) – Indices in the full vector where data should be inserted.
val (np.ndarray) – The sub-vector of values to insert.
cov (np.ndarray) – The covariance block corresponding to the inserted values.
int_cov (np.ndarray) – The integrated covariance block to insert.
cov_missing_inds (list or np.ndarray, optional) – Indices to exclude from the covariance insertion mapping (optional).
- cov: ndarray¶
- int_cov: ndarray¶
- val: ndarray¶
- class ADCS.estimators.estimator_helpers.estimator_helpers.EstimatedOrbital_State(os, P=<factory>, Q=<factory>)[source]¶
Bases:
objectA container for an Orbital State and its associated estimation uncertainty.
This class wraps the physical
Orbital_Statewith estimation statistics, specifically the state covariance \(P\) and process noise \(Q\).- Parameters:
os (Orbital_State) – The estimated physical state (Position \(\mathbf{r}\) and Velocity \(\mathbf{v}\)).
P (np.ndarray) – The \(6 \times 6\) state covariance matrix. .. math:: P = E[(hat{x} - x)(hat{x} - x)^T]
Q (np.ndarray) – The \(6 \times 6\) process noise covariance matrix.
- copy()[source]¶
Creates a deep copy of the EstimatedOrbital_State.
- Returns:
A new instance with deep-copied state and matrices.
- Return type:
- pull_indices(inds_mask, cov_missing_inds=None)[source]¶
Extracts a partial state estimate based on indices mapping to [R, V].
The mapping is linear: indices 0-2 correspond to Position (R), and 3-5 to Velocity (V).
- Parameters:
inds_mask (list or np.ndarray) – The indices of the 6-element state vector to extract.
cov_missing_inds (list or np.ndarray, optional) – Indices to exclude from covariance slicing (optional).
- Returns:
A new EstimatedOrbital_State containing the subset of state and covariance. Note: The underlying Orbital_State will have 0.0 in unselected components.
- Return type:
- set_indices(inds_mask, val, P, Q, cov_missing_inds=None)[source]¶
Inserts values and covariance blocks back into the full 6-state estimate.
- Parameters:
inds_mask (list or np.ndarray) – Indices in the full 6-element vector where data should be inserted.
val (np.ndarray) – The values to insert into Position/Velocity.
P (np.ndarray) – The covariance block \(P_{sub}\) to insert.
Q (np.ndarray) – The process noise block \(Q_{sub}\) to insert.
cov_missing_inds (list or np.ndarray, optional) – Indices to exclude from covariance insertion (optional).
- P: ndarray¶
- Q: ndarray¶
- os: Orbital_State¶