Measuring exact rotation angle of device in android -


i need exact angle of android device each axis.

first should searched through web , stackoverflow , saw pages these:

how measure tilt of phone in xy plane using accelerometer in android

get android rotation angle in x-axis

but not helpful. used of them give wrong values.

if axis in device this:

enter image description here

i need these rotation angle:

enter image description here

i don't want use any hardware sensor except accelerometer , work api 17. think possible based on racing games, don't know how that.

i appreciate if me. thanks

there no way can rotations using type_accelerometer alone. need type_magnetic_field. if not care how sensitive values changed respect quick movement need type_gravity or type_accelerometer type_magnetic_field.
rotation respect z-axis can follow first link in question.
rotation respect x , y axes can use pitch , roll , screen facing.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -