Thread
:
accDisplay - View/Record/Playback accelerometers' data
View Single Post
abuelmagd
2010-09-24 , 02:04
Posts: 85 | Thanked: 38 times | Joined on Sep 2010 @ Canada
#
14
this app is great. i use the live display to calculate the tilt angle of any plain. it helps me at work. i take the y and z component of the 1g that should exist and apply very trivial trignometry which gives me the incline angle of any sloped surface. thank you so much to the developer.
Edit:
In the spirit of sharing and even though the trigonometry is simple I thought I should include it here. Also if the developer would like he can add to the live display the phone's angle based on this equation.
So basically if the phone is laying on angled surface in 2 dimensions (meaning that one dimension is not tilted). In my case I place my N900 on the surface with the screen facing me so I can see the readout. The x-component of the acceleration is close to zero. Usually x=-0.03 or something similar because of the lens cover which tilts the phone a little bit in that direction. Now you should read the y and z components and use them in the following formula:
theta = 90 - atan(z/y)
Make sure though that you calculate the arctan in degrees otherwise you will have to convert from radians to degrees.
Last edited by abuelmagd; 2010-09-25 at
20:55
. Reason: Give more information
Quote & Reply
|
abuelmagd
View Public Profile
Send a private message to abuelmagd
Find all posts by abuelmagd