Understand that the accelerometer shows force in 3 directions.  When
the phone isn't moving, it will have 9.8m/s2 (gravity) reading on it.
You can use that to figure out exactly where the phone is pointed.
You can get 3 vectors to show the angle of X,Y and Z relative to
gravity if you use arctan(r0,r1) arctan(r1,r2) arctan(r0,r2) where r0,
r1 and r2 are the first 3 values of accelerometer readings.  This is
all the information I can give you because after that, it's all clever
programming to make good use of these numbers and that is application-
specific.

On Jun 8, 5:11 am, "sagar.indianic" <sagar.india...@gmail.com> wrote:
> Hello every1,
>
> I am developing a small application for learning purpose which will
> move image when accelerometer readings change. I want a mapping of
> accelerometer values to screen coordinates. I am using trial and error
> method rite now. But it seems that it will not help. Is there any
> algorithm??
>
> Please help!!!
>
> Thanks!!!!!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to