Struct nyx_space::od::noise::gauss_markov::GaussMarkov
source · pub struct GaussMarkov {
pub tau: Duration,
pub bias_sigma: f64,
pub steady_state_sigma: f64,
pub bias: Option<f64>,
pub epoch: Option<Epoch>,
}
Expand description
A first order Gauss-Markov process for modeling biases as described in section 5.2.4 of the NASA Best Practices for Navigation Filters (D’Souza et al.).
The process is defined by the following stochastic differential equation:
\dot{b(t)} = -1/τ * b(t) + w(t)
Programmatically, it’s calculated as follows:
b(t + Δt) = b(t) * exp(-Δt / τ) + q * (1 - exp(-Δt / τ)) * w(t)
Where w(t) ~ 𝓝(0, σ_{ss}) is a zero-mean white noise process with standard deviation σ_ss, the steady state sigma.
§Important
If the time constant is greater than 366 days, then the process is actually modeled as a white noise process. This allows the users to model a white noise process without having to change the process type.
Fields§
§tau: Duration
The time constant, tau gives the correlation time, or the time over which the intensity of the time correlation will fade to 1/e of its prior value. (This is sometimes incorrectly referred to as the “half-life” of the process.)
bias_sigma: f64
Standard deviation (or covariance) of the zero-mean white noise of the initial bias, noted σ_b
.
steady_state_sigma: f64
The steady-state sigma is the zero-mean white noise as t → ∞, noted σ_q
, and sometimes called the “constant”.
bias: Option<f64>
Latest bias, unset prior to the sample call and one will be generated from a zero mean normal distribution with standard deviation bias_sigma
.
epoch: Option<Epoch>
Epoch of the latest sample of the process.
Implementations§
source§impl GaussMarkov
impl GaussMarkov
sourcepub fn new(
tau: Duration,
bias_sigma: f64,
steady_state_sigma: f64
) -> Result<Self, ConfigError>
pub fn new( tau: Duration, bias_sigma: f64, steady_state_sigma: f64 ) -> Result<Self, ConfigError>
Create a new first order Gauss-Markov process.
§Arguments
tau
- The time constant, tau gives the correlation time, or the time over which the intensity of the time correlation will fade to 1/e of its prior value.bias_sigma
- Standard deviation (or covariance) of the zero-mean white noise of the initial bias.steady_state_sigma
- The steady-state sigma is the zero-mean white noise as t → ∞, notedq
, and sometimes called the “constant”.
sourcepub fn white_noise(sigma: f64) -> Self
pub fn white_noise(sigma: f64) -> Self
Create a new GaussMarkov
process as if it were purely a white noise (zero mean), i.e. without any time correlation.
sourcepub fn next_bias<R: Rng>(&mut self, epoch: Epoch, rng: &mut R) -> f64
pub fn next_bias<R: Rng>(&mut self, epoch: Epoch, rng: &mut R) -> f64
Return the next bias sample.
sourcepub fn default_range_km() -> Self
pub fn default_range_km() -> Self
Typical noise on the ranging data from a non-high-precision ground station.
sourcepub fn default_doppler_km_s() -> Self
pub fn default_doppler_km_s() -> Self
Typical noise on the Doppler data from a non-high-precision ground station.
sourcepub fn high_precision_range_km() -> Self
pub fn high_precision_range_km() -> Self
Example noise on the ranging data from a high-precision ground station, e.g. NASA Deep Space Network (DSN).
sourcepub fn high_precision_doppler_km_s() -> Self
pub fn high_precision_doppler_km_s() -> Self
Example noise on the Doppler data from a high-precision ground station, e.g. NASA Deep Space Network (DSN).
sourcepub fn from_pr_n0(pr_n0: f64, bandwidth_hz: f64) -> Self
pub fn from_pr_n0(pr_n0: f64, bandwidth_hz: f64) -> Self
Initializes a new Gauss Markov process as a time-uncorrelated white noise process, using only the Pr/N0 value and the bandwidth. This returns a white noise sigma in kilometers.
§Equation
σ = c / (2 * B * √(Pr/N0))
Where c is the speed of light, B is the bandwidth in Hz, and the Pr/N0 is the signal-to-noise ratio.
sourcepub fn from_default(kind: String) -> Result<Self, NyxError>
pub fn from_default(kind: String) -> Result<Self, NyxError>
Initializes a new Gauss Markov process for the provided kind of model.
Available models are: Range
, Doppler
, RangeHP
, Doppler HP
(HP stands for high precision).
source§impl GaussMarkov
impl GaussMarkov
sourcepub fn simulate(
&self,
path: String,
runs: Option<u32>,
unit: Option<String>
) -> Result<(), NyxError>
pub fn simulate( &self, path: String, runs: Option<u32>, unit: Option<String> ) -> Result<(), NyxError>
Simulate a Gauss Markov model and store the bias in a parquet file.
Python: call as simulate(path, runs=25, unit=None)
where the path is the output Parquet file, runs is the number of runs, and unit is the unit of the bias, reflected only in the headers of the parquet file.
The unit is only used in the headers of the parquet file.
This will simulate the model with “runs” different seeds, sampling the process 500 times for a duration of 5 times the time constant.
Trait Implementations§
source§impl Clone for GaussMarkov
impl Clone for GaussMarkov
source§fn clone(&self) -> GaussMarkov
fn clone(&self) -> GaussMarkov
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl ConfigRepr for GaussMarkov
impl ConfigRepr for GaussMarkov
source§fn load<P>(path: P) -> Result<Self, ConfigError>
fn load<P>(path: P) -> Result<Self, ConfigError>
source§fn load_many<P>(path: P) -> Result<Vec<Self>, ConfigError>
fn load_many<P>(path: P) -> Result<Vec<Self>, ConfigError>
source§fn load_named<P>(path: P) -> Result<BTreeMap<String, Self>, ConfigError>
fn load_named<P>(path: P) -> Result<BTreeMap<String, Self>, ConfigError>
source§fn loads_many(data: &str) -> Result<Vec<Self>, ConfigError>
fn loads_many(data: &str) -> Result<Vec<Self>, ConfigError>
source§fn loads_named(data: &str) -> Result<BTreeMap<String, Self>, ConfigError>
fn loads_named(data: &str) -> Result<BTreeMap<String, Self>, ConfigError>
source§impl Debug for GaussMarkov
impl Debug for GaussMarkov
source§impl<'de> Deserialize<'de> for GaussMarkov
impl<'de> Deserialize<'de> for GaussMarkov
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Display for GaussMarkov
impl Display for GaussMarkov
source§impl Mul<f64> for GaussMarkov
impl Mul<f64> for GaussMarkov
source§impl PartialEq for GaussMarkov
impl PartialEq for GaussMarkov
source§fn eq(&self, other: &GaussMarkov) -> bool
fn eq(&self, other: &GaussMarkov) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for GaussMarkov
impl Serialize for GaussMarkov
impl Copy for GaussMarkov
impl StructuralPartialEq for GaussMarkov
Auto Trait Implementations§
impl Freeze for GaussMarkov
impl RefUnwindSafe for GaussMarkov
impl Send for GaussMarkov
impl Sync for GaussMarkov
impl Unpin for GaussMarkov
impl UnwindSafe for GaussMarkov
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
source§impl<T> FromDhall for Twhere
T: DeserializeOwned,
impl<T> FromDhall for Twhere
T: DeserializeOwned,
fn from_dhall(v: &Value) -> Result<T, Error>
§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.