velocityStatistics: Report Statistics of adp or adv Velocities

Description Usage Arguments Value Author(s) See Also Examples

Description

Report statistics of ADP or ADV velocities, such as means and variance ellipses.

Usage

1
velocityStatistics(x, control, ...)

Arguments

x

an adp or adv object, i.e. one inheriting from adp-class or adv-class.

control

An optional list used to specify more information. This is presently ignored for adv objects. For adp objects, if control$bin is an integer, it is taken as the bin to be selected (otherwise, an average across bins is used).

...

additional arguments that are used in the call to mean.

Value

A list containing items the major and minor axes of the covariance ellipse (ellipseMajor and ellipseMinor), the angle of the major axis anticlockwise of the horizontal axis (ellipseAngle), and the x and y components of the mean velocity (uMean and vMean).

Author(s)

Dan Kelley

See Also

Other things related to adp data: [[,adp-method, [[<-,adp-method, adp-class, adp, as.adp, beamName, beamToXyzAdp, beamToXyzAdv, beamToXyz, beamUnspreadAdp, binmapAdp, enuToOtherAdp, enuToOther, plot,adp-method, 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, xyzToEnuAdp, xyzToEnu

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(oce)
data(adp)
a <- velocityStatistics(adp)
print(a)
t <- seq(0, 2*pi, length.out=100)
theta <- a$ellipseAngle * pi / 180
y <- a$ellipseMajor * cos(t) * sin(theta) + a$ellipseMinor * sin(t) * cos(theta)
x <- a$ellipseMajor * cos(t) * cos(theta) - a$ellipseMinor * sin(t) * sin(theta)
plot(adp, which="uv+ellipse+arrow")
lines(x, y, col='blue', lty="dashed", lwd=5)
arrows(0, 0, a$uMean, a$vMean, lwd=5, length=1/10, col='blue', lty="dashed")


Search within the oce package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.