undrift.time {oce} | R Documentation |
Correct for drift in instrument clock
undrift.time(x, slow.end=0, tname="t")
x |
an object of class "oce ". |
slow.end |
number of seconds to add to final instrument time, to get the correct time of the final sample. This will be a positive number, for a "slow" instrument clock. |
tname |
name of time column. |
It is assumed that the instrument clock matches the real time
at the start of the sampling, and that the clock drifts linearly
(i.e. is uniformly fast or slow) over the sampling interval. Linear
interpolation is used to infer the values of all variables in the
x$data
. The data length is altered in this process, e.g. a
slow instrument clock (positive slow.end
) takes too few samples
in a given time interval, so undrift.time
will increase the
number of data.
An object of the same class as x
, with x$data
adjusted appropriately.
Dan Kelley
## Not run: library(oce) rbr011855 <- read.oce("rbr011855") d <- subset(rbr011855, t < as.POSIXct("2008-06-25 10:05:00")) x <- undrift.time(d, 1) # a slow instrument clock lost 1 second summary(d) summary(x) ## End(Not run)