Translate Gyroscope readings to bearing in degrees

2.7k views Asked by At

I am trying to find the angle of rotation of a car while it makes a turn using Gyroscope from an Android device. So imagine a car is travelling in a bearing of angle 168 and makes a right turn on a road. Now I need to calculate the new heading or bearing angle just using Gyroscope. But the values I receive are in radians/sec. I tried integrating these values over the time period dT. But these values are not even close to the actual angles. I thought the rotation are in reference to the device, and I tried to convert the values to the real World coordinates. But I didnt get a good algorithm for that.

Can someone help me or point to the right resources to solve this issue?

EDIT: I forgot to mention in the question, I am trying to do this without GPS, (in the scenario when GPS fails.) And I am trying to avoid Sensor fusion as I am planning to use only Gyroscope as I am looking for a solution that could run even out of Android platform. I am even talking to the OBD to get the actual speed of the vehicle. So I am just trying to collect Gyroscope data from any client and process it at the back end and determine just the turning of a vehicle

1

There are 1 answers

3
Marek R On BEST ANSWER

You need rotation vector see description here (API level 9).
This thing is using something called sensor fusion to get good quality information about phone orientation relative to earth and magnetic north. You can also calculate derivate of GPS position to estimate car turn direction.