Learn R Programming

diveMove (version 0.6-9)

diveMove-internal: Internal diveMove Functions

Description

Functions used for very particular tasks within larger functions in diveMove

Usage

.cutDive(x, descent.crit.q, ascent.crit.q, wiggle.tol).diveIndices(diveID, diveNo)
.getInterval(time).getSpeedStats(x, vdist)

Arguments

x
a single dive's data; for .cutDive: a 2-col matrix with subscript in original TDR object and non NA depths. For .descAsc: a 4-col matrix with dive id, time, depth, and speed. For .getSpeedStats: a 3-co
time
POSIXct object representing time.
diveID
Numeric vector of all dive and non dive IDs.
diveNo
Numeric vector of unique dive IDs to index in diveID.
descent.crit.q
critical quantile below which descent is deemed to have ended.
ascent.crit.q
critical quantile above which ascent is deemed to have started.
wiggle.tol
tolerance to wiggles.

Value

  • .getSpeedCalib: A list with two elements (named descent and ascent). Each element is a 2-column matrix with rate of depth change in the first column, and speed in the second, corresponding to the descent phase of each dive.

Details

These functions are not meant to be called directly by the user, as he/she could not care less (right?). This may change in the future.

.getSpeedCalib extracts the rates of descent and ascent with associated mean speed during descent and ascent phases, respectively and returns a list that is later manipulated by doSpeedCalib to calibrate speed. The speed used for each rate of depth change corresponds to the speed read for the last point, assuming that each speed reading is the average speed for the last measurement interval.