Struct nyx_space::time::ClockNoise [−][src]
pub struct ClockNoise { /* fields omitted */ }
Expand description
ClockNoise adds true clock drift to a given Duration measurement. For example, if a vehicle is
measuring the time of flight of a signal with high precision oscillator, the engineering
specifications will include the oscillator stability. This specification bounds the preciseness
of time span calculations. On very short time spans, i.e. less than a few minutes, clock drift
is usually negligible. However, in several high fidelity systems the clock drift may lead to
a significant error (e.g. several kilometers in two-way radar ranging). This module allows high
fidelity simulation systems to test the resilience of algorithms with oscillator stability.
The constructors here are specified in parts per million: for a parts per billion specification
simply multiply the value by 1e-3
.
NOTE: Clock stability is not linear. If a clock is rated at stable within 15 ppm per
fifteen minute interval this does not correspond to 1 ppm per minute.
Example
use hifitime::ClockNoise; // The IRIS clock is 1 part per billion over one second let nasa_iris = ClockNoise::with_ppm_over_1sec(1e-3); let ddoor = 8.0 * 60.0; let noisy = nasa_iris.noise_up(ddoor); assert!( (noisy - ddoor).abs() < 1e-3, "Expected a zero deviation for IRIS" );
Implementations
Creates a new ClockNoise generator from the stability characteristics in absolute parts per million The ppm value is assumed to be the 7-sigma deviation.
Creates a new ClockNoise generator from the stability characteristics in parts per million over one second.
Creates a new ClockNoise generator from the stability characteristics in parts per million over one minute (i.e. 60 seconds).
Creates a new ClockNoise generator from the stability characteristics in parts per million over fifteen minutes (i.e. 900 seconds).
From an input set of seconds, returns a random walk number of seconds corresponding to the value plus/minus a drift This is the most accurate method to generate a noisy signal, but it’s extremely slow.
Auto Trait Implementations
impl RefUnwindSafe for ClockNoise
impl Send for ClockNoise
impl Sync for ClockNoise
impl Unpin for ClockNoise
impl UnwindSafe for ClockNoise
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
pub fn vzip(self) -> V