diveMove-internal {diveMove} | R Documentation |
Functions used for very particular tasks within larger functions in diveMove
.cutDive(x) .createChron(date, time, dtformat) .descAsc(x, phase, type=c("all", "strict"), interval, z=0) .getInterval(time) .getVelCalib(time, zdepth, vel, dives, phase, ...) .getVelStats(x, vdist)
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
velocity. For .getVelStats: a 3-col matrix with time, depth,
and velocity. |
date |
A vector to be converted to be converted to a chron object. |
time |
chron object representing time, or a vector to be
converted to such an object (for .createChron ). It can be
missing in the latter case. |
dtformat |
A vector of length 2 indicating the format in which
date and time should be interpreted by chron . |
phase |
factor labelling each row for its phase in dive. |
type |
string indicating whether all points belonging to descent/ascent should be included (“all”), or points shared with bottom phase should be excluded (“srict”). |
interval |
sampling interval in chron units (d). |
z |
minimum depth differences to use. |
zdepth |
zero-offset corrected depth m. |
vel |
velocity in m/s. For doVelCalib: uncalibrated velocities;
ignored if calType is “none”. |
dives |
3-col data.frame with dive id (numeric), activity
(factor), and postdive id (numeric). |
... |
arguments to pass to .descAsc (type ,
interval , and z ). |
vdist |
vertical distance travelled during ascent or descent. |
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.
.getVelCalib extracts the rates of descent and ascent with associated mean velocity during descent and ascent phases, respectively and returns a list that is later manipulated by doVelCalib to calibrate velocity. The velocity used for each rate of depth change corresponds to the velocity read for the last point, assuming that each velocity reading is the average velocity for the last measurement interval.
.getVelCalib: 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 velocity in the second, corresponding to the descent phase of each dive.
Sebastian P. Luque spluque@gmail.com