Learn R Programming

oce (version 0.9-20)

read.adp.rdi: Read a Teledyne/RDI ADP File

Description

Read a Teledyne/RDI ADCP file (called 'adp' in oce).

Usage

read.adp.rdi(file, from = 1, to, by = 1, tz = getOption("oceTz"), longitude = NA, latitude = NA, type = c("workhorse"), monitor = FALSE, despike = FALSE, processingLog, testing = FALSE, debug = getOption("oceDebug"), ...)

Arguments

file
a connection or a character string giving the name of the file to load. (For read.adp.sontek.serial, this is generally a list of files, which will be concatenated.
from
indication of the first profile to read. This can be an integer, the sequence number of the first profile to read, or a POSIXt time before which profiles should be skipped, or a character string that converts to a POSIXt time (assuming UTC timezone). See “Examples”, and make careful note of the use of the tz argument.
to
if supplied, an indication of the last profile to read, in a format as described for from. If not supplied, the whole file will be read.
by
an indication of the stride length to use while walking through the file. If this is an integer, then by-1 profiles are skipped between each pair of profiles that is read. If this is a string representing a time interval, in colon-separated format (MM:SS), then this interval is divided by the sampling interval, to get the stride length.
tz
character string indicating time zone to be assumed in the data.
longitude
optional signed number indicating the longitude in degrees East.
latitude
optional signed number indicating the latitude in degrees North.
type
A character string indicating the type of instrument.
monitor
boolean, set to TRUE to provide an indication (with numbers and dots) of every profile read.
despike
if TRUE, despike will be used to clean anomalous spikes in heading, etc.
processingLog
if provided, the action item to be stored in the log. (Typically only provided for internal calls; the default that it provides is better for normal calls by a user.)
testing
Logical value, indicating whether the time-varying device orientation is to be inferred from the per-profile header information, and the boolean result is stored in an integer vector named upward within the data slot.
debug
a flag that turns on debugging. Set to 1 to get a moderate amount of debugging information, or to 2 to get more.
...
additional arguments, passed to called routines.

Value

An adp object, i.e. one inheriting from adp-class.

Details

As of 2016-09-25, this function has provisional functionality to read data from the new "SentinelV" series ADCP -- essentially a combination of a 4 beam workhorse with an additional vertical centre beam.

If a heading bias had been set with the EB command during the setup for the deployment, then a heading bias will have been stored in the file's header. This value is stored in the object's metadata as metadata$heading.bias. Importantly, this value is subtracted from the headings stored in the file, and the result of this subtraction is stored in the objects heading value (in data$heading). It should be noted that read.adp.rdi() was tested for firmware version 16.30. For other versions, there may be problems. For example, the serial number is not recognized properly for version 16.28.

In Teledyne/RDI ADP data files, velocities are coded to signed 2-byte integers, with a scale factor being used to convert to velocity in metres per second. These two facts control the maximum recordable velocity and the velocity resolution, values that may be retrieved for an ADP object name d with d[["velocityMaximum"]] and d[["velocityResolution"]].

References

1. Teledyne-RDI, 2007. WorkHorse commands and output data format. P/N 957-6156-00 (November 2007). (Section 5.3 h details the binary format, e.g. the file should start with the byte 0x7f repeated twice, and each profile starts with the bytes 0x80, followed by 0x00, followed by the sequence number of the profile, represented as a little-endian two-byte short integer. read.adp.rdi() uses these sequences to interpret data files.) 2. Teledyne-RDI, 2015. V Series output data format. P/N 95D-6022-00 (May 2015).

See Also

Other things related to adp data: [[,adp-method, [[<-,adp-method, adp-class, adp, as.adp, beamName, beamToXyzAdp, beamToXyzAdv, beamToXyz, beamUnspreadAdp, binmapAdp, enuToOtherAdp, enuToOther, plot,adp-method, read.adp.nortek, read.adp.sontek.serial, read.adp.sontek, read.adp, read.aquadoppHR, read.aquadoppProfiler, read.aquadopp, subset,adp-method, summary,adp-method, toEnuAdp, toEnu, velocityStatistics, xyzToEnuAdp, xyzToEnu