Given that I can read the effects of gravity on my device on three axes,
I'm looking for some math that will get me a more logical view of what's
happening to the device in my hands. I want to create a two dimensional
control based on tilting the device forward and back, and tilting the
device to the right and left.
The seemingly complex part is that I'd like to have the controls behave
in a predictable way regardless of the starting position that the device
happened to be in when starting the controls. For instance, if the user
is in bed holding the phone upside down above their head, everything
should still work the same from the user's perspective even though the
numbers coming off of the accelerometer will be entirely different. I
can envision some sort of transformation that would yield numbers that
look like the device is starting off on a flat table, given the actual
state of the device when the controls start to be used.
Thanks for any help.
--
You received this message because you are subscribed to the Google Groups "Android
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/56780DAE.8050105%40tobiah.org.
For more options, visit https://groups.google.com/d/optout.