Description Usage Arguments Value Examples
View source: R/calibrate_tdr.R
calibrate_tdr
is a wrapper for
calibrateDepth
. CEFAS tags record depth in bursts,
so this function uses a split-apply-combine approach to calibrate each
FastLog individually. Tags have an error of +/-1m, so for shallow diving
birds the error may be greater than the depth of the dive. To avoid losing
these dives, the "surface" is assumed to be at the shallowest point in each
FastLog, not at 0. For tags with a 1m threshold, this may bias dive depths
shallower.
1 2 | calibrate_tdr(tdr, deployid, rate = 0.1, surface_thr = 0.1,
depth_thr = 0.2, dur_thr = 0.5)
|
tdr |
data.frame. Use |
deployid |
character. Deployment identifier. |
rate |
numeric. Sampling rate for FastLog events. |
surface_thr |
numeric. Threshold for surface noise. |
depth_thr |
numeric. Minimum depth to qualify as a dive. |
dur_thr |
numeric. Minimum duration to qualify as a dive. |
data.frame with columns
Row
(Row number in original CEFAS file)
UTC
(Datetime of record in UTC timezone)
Pressure
EventID
(FastLog identifier)
CalibPressure
(Pressure after surface offset)
Surface
(Surface offset)
DivePhase
(From diveMove)
duration
depth
DiveID
DeployID
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Load metadata
metadata_path <- system.file('extdata',
'MOC2015PFSHmetadata.csv',
package = 'pfsh.dive')
metadata <- readr::read_csv(metadata_path)
# Read CEFAS output
tdr_path <- system.file('extdata',
paste0(metadata$TDR_filename[1], '.CSV'),
package = 'pfsh.dive')
tdr <- read_cefas(tdr_path,
metadata$Deployed[1],
metadata$Recovered[1])
# Calibrate TDR data
calib_tdr <- calibrate_tdr(tdr, metadata$DeployID[1])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.