/// Update the estimate to include the supplied sample.
Update the estimate to include the supplied sample.
Update the estimate to include the supplied sample .
pub fn update(&mut self, sample: Sample) {
        let utc = sample.utc;
        if let Err(err) = self.filter.update(sample) {
            warn!("Rejected update: {}", err);
            return;
        }
        let offset = self.filter.offset();
        let sqrt_covariance = self.filter.sqrt_covariance();
        self.diagnostics.record(Event::EstimateUpdated {
            track: self.track,
            offset,
            sqrt_covariance,
        });
        info!(
            "received {:?} update to {}. Estimated UTC offset={}ns, sqrt_covariance={}ns",
            self.track,
            Utc.timestamp_nanos(utc.into_nanos()),
            offset.into_nanos(),
            sqrt_covariance.into_nanos()
        );
    }
pub fn update ( & mut self , sample : Sample ) { let utc = sample . utc ; if let Err ( err ) = self . filter . update ( sample ) { warn ! ( " " err ) ; return ; } let offset = self . filter . offset ( ) ; let sqrt_covariance = self . filter . sqrt_covariance ( ) ; self . diagnostics . record ( Event :: EstimateUpdated { track : self . track , offset , sqrt_covariance , } ) ; info ! ( " " self track Utc timestamp_nanos ( utc into_nanos ( ) ) offset into_nanos ( ) sqrt_covariance into_nanos ( ) ) ; }
Update the estimate to include the supplied sample.
Update the estimate to include the supplied sample .
&mut self
sample
Sample