Trait nyx_space::od::filter::Filter

source ·
pub trait Filter<T, A, M>
where A: DimName, M: DimName, T: State, DefaultAllocator: Allocator<f64, M> + Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<f64, A> + Allocator<f64, M, M> + Allocator<f64, M, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<f64, A, A> + Allocator<f64, <T as State>::Size, A> + Allocator<f64, A, <T as State>::Size>,
{ type Estimate: Estimate<T>; // Required methods fn previous_estimate(&self) -> &Self::Estimate; fn set_previous_estimate(&mut self, est: &Self::Estimate); fn update_h_tilde(&mut self, h_tilde: OMatrix<f64, M, <T as State>::Size>); fn time_update( &mut self, nominal_state: T ) -> Result<Self::Estimate, ODError>; fn measurement_update( &mut self, nominal_state: T, real_obs: &OVector<f64, M>, computed_obs: &OVector<f64, M>, resid_ratio_check: Option<f64> ) -> Result<(Self::Estimate, Residual<M>), ODError>; fn is_extended(&self) -> bool; fn set_extended(&mut self, status: bool); fn set_process_noise(&mut self, snc: SNC<A>); fn measurement_noise(&self, epoch: Epoch) -> &OMatrix<f64, M, M>; }
Expand description

Defines a Filter trait where S is the size of the estimated state, A the number of acceleration components of the EOMs (used for process noise matrix size), M the size of the measurements.

Required Associated Types§

Required Methods§

source

fn previous_estimate(&self) -> &Self::Estimate

Returns the previous estimate

source

fn set_previous_estimate(&mut self, est: &Self::Estimate)

Set the previous estimate

source

fn update_h_tilde(&mut self, h_tilde: OMatrix<f64, M, <T as State>::Size>)

Update the sensitivity matrix (or “H tilde”). This function must be called prior to each call to measurement_update.

source

fn time_update(&mut self, nominal_state: T) -> Result<Self::Estimate, ODError>

Computes a time update/prediction at the provided nominal state (i.e. advances the filter estimate with the updated STM).

Returns an error if the STM was not updated.

source

fn measurement_update( &mut self, nominal_state: T, real_obs: &OVector<f64, M>, computed_obs: &OVector<f64, M>, resid_ratio_check: Option<f64> ) -> Result<(Self::Estimate, Residual<M>), ODError>

Computes the measurement update with a provided real observation and computed observation.

The nominal state is the state used for the computed observation. The real observation is the observation that was actually measured. The computed observation is the observation that was computed from the nominal state.

Returns the updated estimate and the residual. The residual may be zero if the residual ratio check prevented the ingestion of this measurement.

§Arguments
  • nominal_state: the nominal state at which the observation was computed.
  • real_obs: the real observation that was measured.
  • computed_obs: the computed observation from the nominal state.
  • resid_ratio_check: the ratio below which the measurement is considered to be valid.
source

fn is_extended(&self) -> bool

Returns whether the filter is an extended filter (e.g. EKF)

source

fn set_extended(&mut self, status: bool)

Sets the filter to be extended or not depending on the value of status

source

fn set_process_noise(&mut self, snc: SNC<A>)

Sets the process noise matrix of the estimated state

source

fn measurement_noise(&self, epoch: Epoch) -> &OMatrix<f64, M, M>

Returns the measurement noise used at this given epoch

Implementors§

source§

impl<T, A, M> Filter<T, A, M> for KF<T, A, M>
where A: DimName, M: DimName, T: State, DefaultAllocator: Allocator<f64, M> + Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<f64, A> + Allocator<f64, M, M> + Allocator<f64, M, <T as State>::Size> + Allocator<f64, <T as State>::Size, M> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<f64, A, A> + Allocator<f64, <T as State>::Size, A> + Allocator<f64, A, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<usize, <T as State>::Size, <T as State>::Size> + Allocator<f64, Const<1>, M>, <DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy, <DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,