Learn R Programming

oce (version 0.1-82)

xyz.to.enu.adv: Convert ADV from xyz coordinates to enu coordinates

Description

Convert ADV velocity components from a xyz-based coordinate system to an enu-based coordinate system.

Usage

xyz.to.enu.adv(x, declination=0, debug=getOption("oce.debug"))

Arguments

x
an object of class "adv".
declination
magnetic declination to be added to the heading, to get ENU with N as "true" north.
debug
a flag that, if non-zero, turns on debugging. Higher values yield more extensive debugging.

Details

The coordinate transformation is done using the heading, pitch, and roll information contained within x. The algorithm is similar to that used for Teledyne/RDI ADCP units, taking into account the different definitions of heading in the two cases.

Generally, the transformation must be done on a time-by-time basis, which is a slow operation. However, this function checks whether the vectors for heading, pitch and roll, are all of unit length, and in that case, the calculation time is reduced by an order of magnitude. This situation of singleton vectors is not uncommon, because the orientation data can be noisy, requiring the user to substitute cleaned-up values, and if the instrument is moored on a steady platform, it makes sense to supply single values. Note that the angles are held in data$ts.slow for Nortek instruments and data$ts for Sontek instruments.

To indicate the change in coordinate, the value of metadata$oce.orientation is changed from xyz to enu, and this is noticed by e.g. plot.adv.

References

http://www.nortek-as.com/lib/forum-attachments/coordinate-transformation

See Also

See read.adv for notes on functions relating to "adv" objects.