fixTimeJumps: Fix timejumps in a series of timestamps from a sensorgnome.

Description Usage Arguments Details Value

Description

fixTimeJumps corrects jumps in a series of timestamps. These jumps are presumably due to transmission errors in the data from the USB gps, perhaps in a noisy environment over a USB extension cable. The gpsd program, which updates the sensorgnome clock from GPS data, is smart enough not to set the clock backward, so only bit errors causing large forward jumps will propagate through to the system clock, and hence sensorgnome data files.

Usage

1
fixTimeJumps(recvDB, ts, bootnum, depID)

Arguments

recvDB

character scalar giving full path to the sqlite database for the receiver

ts

numeric vector of raw timestamps

bootnum

numeric vector of bootnumbers, same length as ts

depID

numeric vector of deployment IDs, same length as ts

Details

Time jumps are detected in raw data streams by the sgdb.R script, using a threshold (in a noisy data stream, very long intervals between consecutive pulse detections are almost certainly due to time jumps), and recorded to the YEAR_PROJECT_SITE.sqlite database

Value

a numeric vector of timestamps corrected for timejumps.


jbrzusto/sensorgnome-R-package documentation built on May 18, 2019, 9:19 p.m.