Struct nyx_space::od::estimate::kfestimate::KfEstimate
source · pub struct KfEstimate<T: State>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,{
pub nominal_state: T,
pub state_deviation: OVector<f64, <T as State>::Size>,
pub covar: OMatrix<f64, <T as State>::Size, <T as State>::Size>,
pub covar_bar: OMatrix<f64, <T as State>::Size, <T as State>::Size>,
pub predicted: bool,
pub stm: OMatrix<f64, <T as State>::Size, <T as State>::Size>,
}
Expand description
Kalman filter Estimate
Fields§
§nominal_state: T
The estimated state
state_deviation: OVector<f64, <T as State>::Size>
The state deviation
covar: OMatrix<f64, <T as State>::Size, <T as State>::Size>
The Covariance of this estimate
covar_bar: OMatrix<f64, <T as State>::Size, <T as State>::Size>
The predicted covariance of this estimate
predicted: bool
Whether or not this is a predicted estimate from a time update, or an estimate from a measurement
stm: OMatrix<f64, <T as State>::Size, <T as State>::Size>
The STM used to compute this Estimate
Implementations§
source§impl<T: State> KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
impl<T: State> KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
source§impl KfEstimate<Spacecraft>
impl KfEstimate<Spacecraft>
sourcepub fn disperse_from_diag(
nominal_state: Spacecraft,
params: &[(StateParameter, f64)],
seed: Option<u128>
) -> Self
pub fn disperse_from_diag( nominal_state: Spacecraft, params: &[(StateParameter, f64)], seed: Option<u128> ) -> Self
Generates an initial Kalman filter state estimate dispersed from the nominal state using the provided standard deviation parameters.
The resulting estimate will have a diagonal covariance matrix constructed from the variances of each parameter. Limitation: This method incorrectly assumes all parameters are statistically independent.
sourcepub fn to_random_variable(
&self
) -> Result<MultivariateNormal<Spacecraft>, NyxError>
pub fn to_random_variable( &self ) -> Result<MultivariateNormal<Spacecraft>, NyxError>
Builds a multivariate random variable from this estimate’s nominal state and covariance, zero mean.
sourcepub fn sigma_for(&self, param: StateParameter) -> Result<f64, AstroError>
pub fn sigma_for(&self, param: StateParameter) -> Result<f64, AstroError>
Returns the 1-sigma uncertainty for a given parameter, in that parameter’s unit
This method uses the OrbitDual structure to compute the estimate in the hyperdual space and rotate the nominal covariance into that space.
sourcepub fn keplerian_covar(&self) -> SMatrix<f64, 6, 6>
pub fn keplerian_covar(&self) -> SMatrix<f64, 6, 6>
Returns the 6x6 covariance (i.e. square of the sigma/uncertainty) of the SMA, ECC, INC, RAAN, AOP, and True Anomaly.
Trait Implementations§
source§impl<T: Clone + State> Clone for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
impl<T: Clone + State> Clone for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
source§fn clone(&self) -> KfEstimate<T>
fn clone(&self) -> KfEstimate<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T: Debug + State> Debug for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
impl<T: Debug + State> Debug for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
source§impl<T: State> Display for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
impl<T: State> Display for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
source§impl<T: State> Estimate<T> for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
impl<T: State> Estimate<T> for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
source§fn zeros(nominal_state: T) -> Self
fn zeros(nominal_state: T) -> Self
source§fn nominal_state(&self) -> T
fn nominal_state(&self) -> T
source§fn state_deviation(&self) -> OVector<f64, <T as State>::Size>
fn state_deviation(&self) -> OVector<f64, <T as State>::Size>
source§fn covar(&self) -> OMatrix<f64, <T as State>::Size, <T as State>::Size>
fn covar(&self) -> OMatrix<f64, <T as State>::Size, <T as State>::Size>
source§fn predicted_covar(
&self
) -> OMatrix<f64, <T as State>::Size, <T as State>::Size>
fn predicted_covar( &self ) -> OMatrix<f64, <T as State>::Size, <T as State>::Size>
source§fn predicted(&self) -> bool
fn predicted(&self) -> bool
source§fn stm(&self) -> &OMatrix<f64, <T as State>::Size, <T as State>::Size>
fn stm(&self) -> &OMatrix<f64, <T as State>::Size, <T as State>::Size>
source§fn set_state_deviation(&mut self, new_state: OVector<f64, <T as State>::Size>)
fn set_state_deviation(&mut self, new_state: OVector<f64, <T as State>::Size>)
source§fn set_covar(
&mut self,
new_covar: OMatrix<f64, <T as State>::Size, <T as State>::Size>
)
fn set_covar( &mut self, new_covar: OMatrix<f64, <T as State>::Size, <T as State>::Size> )
fn set_epoch(&mut self, dt: Epoch)
source§fn within_sigma(&self, sigma: f64) -> bool
fn within_sigma(&self, sigma: f64) -> bool
source§fn within_3sigma(&self) -> bool
fn within_3sigma(&self) -> bool
source§impl<T: State> LowerExp for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
impl<T: State> LowerExp for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
fn orbital_state(&self) -> Orbit
source§fn expected_state(&self) -> Orbit
fn expected_state(&self) -> Orbit
source§impl<T: PartialEq + State> PartialEq for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
impl<T: PartialEq + State> PartialEq for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
source§fn eq(&self, other: &KfEstimate<T>) -> bool
fn eq(&self, other: &KfEstimate<T>) -> bool
self
and other
values to be equal, and is used
by ==
.impl<T: Copy + State> Copy for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
impl<T: State> StructuralPartialEq for KfEstimate<T>where
DefaultAllocator: Allocator<f64, <T as State>::Size> + Allocator<f64, <T as State>::Size, <T as State>::Size> + Allocator<usize, <T as State>::Size> + Allocator<f64, <T as State>::VecLength> + Allocator<usize, <T as State>::Size, <T as State>::Size>,
<DefaultAllocator as Allocator<f64, <T as State>::Size>>::Buffer: Copy,
<DefaultAllocator as Allocator<f64, <T as State>::Size, <T as State>::Size>>::Buffer: Copy,
Auto Trait Implementations§
impl<T> !Freeze for KfEstimate<T>
impl<T> !RefUnwindSafe for KfEstimate<T>
impl<T> !Send for KfEstimate<T>
impl<T> !Sync for KfEstimate<T>
impl<T> !Unpin for KfEstimate<T>
impl<T> !UnwindSafe for KfEstimate<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.