I've looked around but can't find the answer, to what I hope is a simple question. I'm working with a TI-SensorTag, and I want to be able measure the rotation around the unit's Z-axis. Basically I want to attach the tag to a clock pendulum, lie the clock on a table so the tag and clock face point up, and to measure the angular displacement of the pendulum as it swings back and forth. I'm hoping the mental image translated well!
My understanding is that I can solve for displacement by multiplying my gyroscope readings by my sampling period, but I'm not sure how to compensate for drift. So my questions are: is my approach sound, and is the answer to drift to use the changing x and y accelerations? Or would I need to somehow incorporate the magnetometer readings?
Thanks!