Apply a governed stream-clock model
Usage
driftCorrect(
timestamps,
model,
segments = NULL,
extrapolate = c("bounded", "error"),
max_extrapolation_seconds = 30
)Examples
device <- seq(0, 10, by = 0.5)
offset <- -0.4 + 0.005 * (device - median(device))
model <- clockOffset(device, offset, method = "ols")
corrected <- driftCorrect(seq(0, 10, by = 1), model)
as.numeric(corrected)
#> [1] -0.425 0.580 1.585 2.590 3.595 4.600 5.605 6.610 7.615 8.620
#> [11] 9.625