compUpdate: Update orientation with 3-axis acc and gyr data
Description
compUpdate() uses complementary filtering to update the orientation, given
an initial orientation, readings of a 3-axis accelerometer and a 3-axis
gyroscope. time duration, and a gain factor
Usage
compUpdate(acc, gyr, dt, initQuat, gain)
Value
A numeric 4-vector of the ending orientation in quaternion
Arguments
acc
A numeric 3-vector of 3-axis accelerometer readings in g
gyr
A numeric 3-vector of 3-axis gyroscope readings in rad/sec
dt
A numeric of time duration in sec
initQuat
A numeric 4-vector of the starting orientation in quaternion