Description Usage Arguments Author(s) References Examples
coord_transform is modified from Transform.m (from http://www.nortek- as.com/en/knowledge-center), which is a Matlab script that shows how velocity data can be transformed between beam coordinates and ENU coordinates. Beam coordinates are defined as the velocity measured along the three beams of the instrument. ENU coordinates are defined in an earth coordinate system, where E represents the East-West component, N represents the North-South component and U represents the Up-Down component.
Note that the transformation matrix must be recalculated every time the orientation, heading, pitch or roll changes.
1 | coord_transform(trans_matrix, data_v, position_data)
|
trans_matrix |
a matrix of tranformation values (static) in 3 x 3 matrix. |
data_v |
a velocity matrix (a data.frame) |
position_data |
positional data as a data.frame |
Jordan S. Read
Lohrmann, Atle, Ramon Cabrera, and Nicholas C. Kraus. Acoustic- Doppler velocimeter (ADV) for laboratory use. In Fundamentals and advancements in hydraulic measurements and experimentation, pp. 351-365. ASCE, 1994.
1 2 3 4 5 6 7 | trans_data <- c(-0.3462, 0.0869, 2.6611, -0.3252, 2.2522, -1.2607, -0.3616, -2.3228,-1.4019) # trans matrix for example package data
trans_matrix <- matrix(data = trans_data, ncol = 3, byrow = TRUE)
position_data <- data.frame(heading = 358.4, pitch = -1.38, roll = -0.3)
data_v <- data.frame(velocity.X = c(-0.205, -0.185),
# X is up, Y is along stream, Z is cross stream
velocity.Y = c(-1.5303, -1.5452), velocity.Z = c(0.3747, 0.3763))
ENU <- coord_transform(trans_matrix, data_v, position_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.