advSontekAdrFileTrim: Trim a Sontek ADR adv File

View source: R/adv.sontek.R

advSontekAdrFileTrimR Documentation

Trim a Sontek ADR adv File

Description

Create a Sontek ADR adv (acoustic Doppler velocimeter) file by copying the header plus the first n data chunks (recognized by the three-byte sequence 0xA5, 0x11, ‘0x3c’) into a new file. This can be useful in supplying small sample files for bug reports.

Usage

advSontekAdrFileTrim(infile, n = 100, outfile, debug = getOption("oceDebug"))

Arguments

infile

name of a Sontek ADR adp file.

n

integer indicating the number of data chunks to keep. The default is to keep 100 chunks, a common choice for sample files.

outfile

optional name of the new Sontek ADR adp file to be created. If this is not supplied, a default is used, by adding ⁠_trimmed⁠ to the base filename, e.g. if infile is "x.adr" then outfile will be x_trimmed.adr.

debug

an integer value indicating the level of debugging. If this is 1L, then a brief indication is given of the processing steps. If it is > 1L, then information is given about each data chunk, which can yield very extensive output.

Value

advSontekAdrFileTrim() returns the name of the output file, outfile, as provided or constructed.

See Also

Other things related to adv data: [[,adv-method, [[<-,adv-method, adv-class, adv, applyMagneticDeclination,adv-method, beamName(), beamToXyz(), enuToOtherAdv(), enuToOther(), plot,adv-method, read.adv.nortek(), read.adv.sontek.adr(), read.adv.sontek.serial(), read.adv.sontek.text(), read.adv(), rotateAboutZ(), subset,adv-method, summary,adv-method, toEnuAdv(), toEnu(), velocityStatistics(), xyzToEnuAdv(), xyzToEnu()

Other functions that trim data files: adpAd2cpFileTrim(), adpRdiFileTrim(), oceFileTrim()


oce documentation built on July 9, 2023, 5:18 p.m.