Learn R Programming

oce (version 0.1-81)

adp.enu2other: Convert ADP from east-north-up coordinates to other coordinates

Description

Convert ADP velocity components from an enu-based coordinate system to another system, perhaps to align axes with the coastline.

Usage

adp.enu2other(x, heading=0, pitch=0, roll=0)

Arguments

x
an object of class "adp".
heading
angle, in degrees, to be added to the heading. See Details.
pitch
angle to be added to the pitch.
roll
angle to be added to the roll.

Value

  • An object with the data$ma$v[,1:3,] altered appropriately, and with metadata$oce.coordinate changed from enu to other.

Details

The supplied angles specify rotations to be made around the axes for heading, pitch, and roll. Think of this as addition. For example, an object d storing current of speed U running from southwest to northeast has equal and positive eastward and northward components in enu coordinates, so setting heading=45 yields horizontal components d$data$ma$v[,1,]=U and d$data$ma$v[,2,]=0, leaving vertical component d$data$ma$v[,3,] unaltered.

Note that the stored values for heading, pitch, and roll are not altered. These values refer the instrument orientation, not to the values of the corresponding arguments supplied to the present function.

The code is similar to that used by adp.xyz2enu, but in the present case the signs of pitch and roll are obeyed, regardless of whether the instrument points up or down, because enu coordinates already account for instrument alignment.

References

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

See Also

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

Examples

Run this code
library(oce)
data(adp)
o <- adp.enu2other(adp, heading=31.5)
plot(o, which=1:3)

Run the code above in your browser using DataLab