- marked as task
Getting two value for current rotation degree.
Hello, Thanks for this demo. I need to get current device rotation in 360 degree. But I'm getting two kind of different values from quanternion. Something like:
* 82.903595
* 82.59612
* 82.903595
* 277.26965
* 276.97003
* 277.26965
* 83.29394
If you total two different values you will get 360. I'm using your formula to calculate degree from quanternion.
2.0f * Math.acos(quaternion.getW()) * 180.0f / Math.PI
Can you please help me to calculate current device 360 rotation in horizontal and vertical motion from your improved orientation sensor? I'm quite new in development.
Thanks
Comments (3)
-
repo owner -
repo owner I don't really understand what you mean by saying "360 rotation in horizontal and vertical motion". Please clarify what you are trying to obtain. Generally, what you want is either a Rotation Vector, a Rotation Matrix or a Quaternion. Don't step into the pitfalls of trying to calculate Euler Angels. See Chapter 2.3.1 in my thesis for more details: http://my-it.at/index.php/download_file/view/50/199
-
repo owner - changed status to closed
- Log in to comment