pub struct PeriodicitySensor { /* private fields */ }Expand description
Detects a periodic OWD cadence (a LEO handover cycle) from binned OWD.
Implementations§
Source§impl PeriodicitySensor
impl PeriodicitySensor
pub fn new() -> Self
Sourcepub fn observe(&mut self, owd_us: f64, t_us: u64)
pub fn observe(&mut self, owd_us: f64, t_us: u64)
Feed one OWD sample (owd_us) observed at monotonic time t_us. Samples
accumulate into the current time bin; a bin closes (its mean is pushed)
once BIN_MS has elapsed.
Sourcepub fn detected_period(&self) -> Option<(f64, f64)>
pub fn detected_period(&self) -> Option<(f64, f64)>
The detected period in seconds and its normalized-autocorrelation
confidence (0..=1), or None until enough bins span at least two cycles
in the LEO band with a confident peak.
Sourcepub fn secs_to_next_spike(&self) -> Option<f64>
pub fn secs_to_next_spike(&self) -> Option<f64>
Seconds until the next predicted handover spike, given the detected period
and the most recent in-trace peak bin. None if no period is detected.
Trait Implementations§
Source§impl Clone for PeriodicitySensor
impl Clone for PeriodicitySensor
Source§fn clone(&self) -> PeriodicitySensor
fn clone(&self) -> PeriodicitySensor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PeriodicitySensor
impl Debug for PeriodicitySensor
Auto Trait Implementations§
impl Freeze for PeriodicitySensor
impl RefUnwindSafe for PeriodicitySensor
impl Send for PeriodicitySensor
impl Sync for PeriodicitySensor
impl Unpin for PeriodicitySensor
impl UnsafeUnpin for PeriodicitySensor
impl UnwindSafe for PeriodicitySensor
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
Mutably borrows from an owned value. Read more