# Using Fourier Transform on Gyroscope

The original idea is to calculate distance from accelerometer input. However, accelerometer reading also contains the gravitational values, thus to remove gravity, I tried using Gyroscope. The idea was to calculate angle of rotation from gyroscope and then calculate gravity at this angle and subtract it from accelerometer. However, gyroscope values drift.

So I tried using Kalman Filter for this. However, Kalman Filter is working very slow. So now finally, I am thinking of converting the gyroscope values in frequency domain with the help of Fourier Transform, and then trying to calculate angle of rotation.

Has anyone tried such crazy idea before? Any leads? I managed to calculate Fourier Transform of Rotation Rate of Gyroscope, however, I am not sure how I should go ahead with these transformed values.

P.S. - I am working on Windows 8 device, and coding in c#.

• What exactly are you trying to achieve with Fourier Transform? – 19greg96 Aug 6 '14 at 18:49
• The idea behind using fourier transform is to remove the drift effects from angle measurement. My problem is that I am trying to calculate gravitational acceleration using gyroscope. While doing this, I have to integrate the rotation rate in order to calculate angle and then Sin of this angle to calculate gravitational acceleration. Moreover, Kalman filter is working quite slow in my case. – Indraneel Aug 13 '14 at 7:52