XformLA | R Documentation |
Transform a vector from a-frame to l-frame.
XformLA(data, Avector = NA, .inverse = FALSE)
data |
A data.frame containing at least ROLL, PITCH, THDG (true heading) in units of degrees, possibly in many rows representing time series |
Avector |
A body-frame matrix with three components (x,y,z) in the aircraft reference frame where x is forward, y is starboard, and z is downward. For transforming accelerations, body-normal-acceleration is normally measured in the -z direction in the aircraft frame and has the acceleration of gravity G subtracted, so G should be added before transforming and subtracted afterward. The matrix should have 3 columns representing the components and a number of rows corresponding to the number of observations. Special case: If Avector is NA (the default), the routine instead returns the 3x3 transformation matrix that would multiply Avector. |
.inverse |
Logical, transform from l-frame to a-frame if TRUE |
Apply rotations specified by ROLL, PITCH, THDG in the supplied data.frame to transform a vector (BX, BY, BZ) in the body frame of the aircraft (where x is forward, y starboard, z down) to the local or ENU frame with x-east, y-north, z-up.
The vector components transformed to l-frame or ENU coordinates, local Earth-relative with x east, y north, and z upward. Same structure as Avector.
William Cooper
newDataFrame <- XformLA (data.frame("ROLL"=1:50, "PITCH"=(3+(1:50)/50), "THDG"=91:140), Avector=matrix(c(21:70, 31:80, 41:90), ncol=3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.