MCPcopy Create free account
hub / github.com/RustCV/RustCV / ClockSynchronizer

Class ClockSynchronizer

rustcv-core/src/time.rs:18–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16/// 算法:基于最小二乘法的线性回归 (Linear Regression on Sliding Window)
17#[derive(Debug)]
18pub struct ClockSynchronizer {
19 /// 滑动窗口大小 (例如最近 30 帧)
20 window_size: usize,
21 /// 历史数据点 (HW_Timestamp, System_Arrival_Time)
22 history: VecDeque<(u64, Instant)>,
23 /// 是否已初始化基准
24 #[allow(dead_code)]
25 baseline_established: bool,
26 /// 估算的斜率 (Drift Rate)
27 estimated_slope: f64,
28 /// 估算的截距 (Offset)
29 estimated_offset: f64,
30}
31
32impl ClockSynchronizer {
33 pub fn new(window_size: usize) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected