adp.enu2other {oce} | R Documentation |
Convert ADP velocity components from an enu-based coordinate system to another system, perhaps to align axes with the coastline.
adp.enu2other(x, heading=0, pitch=0, roll=0)
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. |
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.
An object with the data$ma$v[,1:3,]
altered appropriately,
and with metadata$oce.coordinate
changed from enu
to
other
.
Dan Kelley
RD Instruments, 1998. ADP Coordinate Transformation, formulas and calculations. P/N 951-6079-00 (July 1998)
See read.adp
for other functions that relate to objects
of class "adp"
.
library(oce) data(adp) f <- adp.beam2xyz(adp) e <- adp.xyz2enu(f) plot(e, which=1:3) o <- adp.enu2other(e, heading=31.5) plot(o, which=1:3)