beamToXyzAdp {oce} | R Documentation

## Convert ADP From Beam to XYZ Coordinates

### Description

Convert ADP velocity components from a beam-based coordinate system to a xyz-based coordinate system.

### Usage

    beamToXyzAdp(x, debug = getOption("oceDebug"))

### Arguments

`x` | an object of class `"adp"`.

`debug`

an integer specifying whether debugging information is to be printed during the processing. This is a general parameter that is used by many `oce` functions. Generally, setting `debug=0` turns off the printing, while higher values suggest that more information be printed. If one function calls another, it usually reduces the value of `debug` first, so that a user can often obtain deeper debugging by specifying higher `debug` values.

### Details

The action depends on the type of object.

For a 3-beam `aquadopp` object, the beams are transformed into velocities using the matrix stored in the header.

For 4-beam `rdi` object, the beams are converted to velocity components using formulae from section 5.5 of RD Instruments (1998), viz. the along-beam velocity components B1, B2, B3, and B4 are used to calculate velocity components in a cartesian system referenced to the instrument using the following formulae: u=c*a*(B1-B2), v=c*a*(B4-B3), w=-b*(B1+B2+B3+B4), and an estimate of the error in velocity is calculated using e=d*(B1+ B2 - B3 - B4)

(Note that the multiplier on e is subject to discussion; RDI suggests one multiplier, but some oceanographers favour another.)

In the above, c=1 if the beam geometry is convex, and c=-1 if the beam geometry is concave, a=1/(2*sin(theta)), b=1/(4*cos(theta)) and d=a/sqrt(2), where theta is the angle the beams make to the instrument “vertical”.

### Value

An object with the first 3 velocitiy indices having been altered to represent velocity components in xyz (or instrument) coordinates. (For `rdi` data, the values at the 4th velocity index are changed to represent the "error" velocity.)

To indicate the change, the value of `metadata$oce.orientation` is changed from `beam` to `xyz`.

### Author(s)

Dan Kelley

### References

1. R D Instruments, 1998. ADP Coordinate Transformation, formulas and calculations. P/N 951-6079-00 (July 1998).

2. WHOI/USGS-provided Matlab code for beam-enu transformation http://woodshole.er.usgs.gov/pubs/of2005-1429/MFILES/AQDPTOOLS/beam2enu.m

### See Also

See `read.adp` for other functions that relate to objects of class `"adp"`.

Other things related to `adp` data: `[[,adp-method`, `[[<-,adp-method`, `adp-class`, `adpEnsembleAverage`, `adp`, `as.adp`, `beamName`, `beamToXyzAdv`, `beamToXyz`, `beamUnspreadAdp`, `binmapAdp`, `enuToOtherAdp`, `enuToOther`, `plot,adp-method`, `read.ad2cp`, `read.adp.nortek`, `read.adp.rdi`, `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`

[Package oce version 0.9-22 Index]