Separates gravitational acceleration from the acceleration signal with the help of gyrocope data. Output is a orientation of gravity and acceleration, both within the local (sensor) coordinate system.
separategravity(acc, gyr, sf)
Three column matrix or data.frame with the x, y, z acceleration in g-units
Three column matrix or data.frame with the x, y, z angule velocity in radians per second
Sample frequency in Hertz
Output of the function is list containing the following objects:
acclocal = 3 column matrix with x, y, and z acceleration in g-units
gvector = 3 column matrix with x, y, and z coordinates of gravity vector