I am working on a code where i need to convert the three angles coming from gyroscope data i.e. azimuth, pitch and roll into x and y coordinates on screen which is 2d plane. I have searched but could not find appropriate logic or algorithm to achieve this. Please help.
Asked
Active
Viewed 964 times
1 Answers
0
The gyroscope gives you rotation data - as further explained here: Motion Sensors, along with some sample code.
What you need is probably the accelerometer, and you can see some answers here, for example: Read x y z coordinates of android phone using accelerometer.
-
Actually i am already using the accelerometer alongside the gyroscope and after filtering the data i am getting the three orientation angles i mentioned above. But now i am stuck as to how to get the position in (x,y) 2d plane using these angles. – user7402649 Jan 11 '17 at 09:59
-
But why do you want to get them from these angles? The second link I gave you shows how to get the position... – yakobom Jan 11 '17 at 10:22
-
The reason for using the combination is to remove the drift and noise from all the sensors to get a precise result. – user7402649 Jan 11 '17 at 15:07