Struct DriftEstimator
Source pub struct DriftEstimator { }
Expand description
Drift estimator using integer linear regression over recent measurements.
Tracks (time, offset) pairs and computes drift rate in parts-per-million
(PPM) using integer arithmetic only.
Create a new drift estimator.
Add a data point: elapsed time in ms since first measurement, and offset
in ms.
Compute drift rate in parts-per-billion (PPB) using integer-only
linear regression (slope = sum(dx*dy) / sum(dx^2)).
Returns None if fewer than 2 samples.
Formats the value using the given formatter.
Read more
Returns the “default value” for a type.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
[From]<T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.