得到机器人的旋转角度在x轴机器人、角度

2023-09-04 10:15:47 作者:。痉挛

我尝试用一​​些Android的功能。现在,我试图让设备的旋转角度,所以当我表现出画布上一张笑脸位图,它看上去总是直。

I'm experimenting with some Android functions. Right now, I'm trying to get the rotation angle of the device, so when I show a happy face bitmap on a canvas, it always looks "straight".

所有我需要这一点,是让x轴的旋转角度(我猜的),但我无法找到如何实现它。希望你能帮助我。谢谢你。

All I would need for this, is to get the x-axis rotation angle (I guess) but I can't find how to achieve it. Hope you can help me. Thank you.

推荐答案

有方位角,俯仰和横滚提供给您。不知道哪一个涉及到你的x轴,但我认为它的方位。

There is azimuth, pitch and roll available to you. Not sure which one relates to your "x-axis" but I think its azimuth.

时间有用的链接:

的http://www.workingfromhere.com/blog/2009/03/30/orientation-sensor-tips-in-android/ http://marakana.com/forums/android/examples/43.html http://marakana.com/static/tutorials/SensorDemo.zip http://www.workingfromhere.com/blog/2009/03/30/orientation-sensor-tips-in-android/ http://marakana.com/forums/android/examples/43.html http://marakana.com/static/tutorials/SensorDemo.zip