<i id='4V2oP'><tr id='4V2oP'><dt id='4V2oP'><q id='4V2oP'><span id='4V2oP'><b id='4V2oP'><form id='4V2oP'><ins id='4V2oP'></ins><ul id='4V2oP'></ul><sub id='4V2oP'></sub></form><legend id='4V2oP'></legend><bdo id='4V2oP'><pre id='4V2oP'><center id='4V2oP'></center></pre></bdo></b><th id='4V2oP'></th></span></q></dt></tr></i><div id='4V2oP'><tfoot id='4V2oP'></tfoot><dl id='4V2oP'><fieldset id='4V2oP'></fieldset></dl></div>

<small id='4V2oP'></small><noframes id='4V2oP'>

<tfoot id='4V2oP'></tfoot>

    <bdo id='4V2oP'></bdo><ul id='4V2oP'></ul>

  1. <legend id='4V2oP'><style id='4V2oP'><dir id='4V2oP'><q id='4V2oP'></q></dir></style></legend>

    1. android方向传感器的奇怪行为

      Strange behavior with android orientation sensor(android方向传感器的奇怪行为)

      • <tfoot id='ixGkf'></tfoot>

        <small id='ixGkf'></small><noframes id='ixGkf'>

        <legend id='ixGkf'><style id='ixGkf'><dir id='ixGkf'><q id='ixGkf'></q></dir></style></legend>
          <tbody id='ixGkf'></tbody>

            • <i id='ixGkf'><tr id='ixGkf'><dt id='ixGkf'><q id='ixGkf'><span id='ixGkf'><b id='ixGkf'><form id='ixGkf'><ins id='ixGkf'></ins><ul id='ixGkf'></ul><sub id='ixGkf'></sub></form><legend id='ixGkf'></legend><bdo id='ixGkf'><pre id='ixGkf'><center id='ixGkf'></center></pre></bdo></b><th id='ixGkf'></th></span></q></dt></tr></i><div id='ixGkf'><tfoot id='ixGkf'></tfoot><dl id='ixGkf'><fieldset id='ixGkf'></fieldset></dl></div>
                <bdo id='ixGkf'></bdo><ul id='ixGkf'></ul>
                本文介绍了android方向传感器的奇怪行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                目前,我正在尝试使用方向传感器值旋转 3D Cube,使用 getRotation() 方法.当 android 设备旋转超过某些范围时,会观察到一些意外行为.例如,如果我让设备站立",滚动"的价值就会变得疯狂.

                我也遇到了类似于所谓的云台锁的现象.唯一的区别是我甚至在将传感器值应用于 3D 旋转之前就遇到了这个问题.当我尝试通过仅围绕俯仰"轴旋转设备来更改俯仰"值时,偏航"值也会根据俯仰的旋转而变化.在我看来这完全不合理.

                有人可以帮我吗?我被这个问题困了一个月.

                解决方案

                这是偏航、俯仰和滚动的常见问题.只要您使用偏航、俯仰和滚动(欧拉角),您就无法摆脱它.这个视频解释了原因.

                我在我的运动感应应用程序中使用旋转矩阵而不是欧拉角.关于旋转矩阵的介绍,我推荐:

                方向余弦矩阵 IMU:理论

                旋转矩阵就像一个魅力.

                四元数也很流行,据说是最稳定的.

                [此答案复制自此处.]p>

                Currently, I'm trying to rotate 3D Cube using orientation sensor values, using getRotation() method. Some unexpected behaviors are observed when the android device is rotated above some bounds. For instance, if I make the device 'stand up', the value of the 'roll' just becomes crazy.

                Also I'm experiencing the phenomenon similar to so-called gimbal-lock. The only difference is I'm experiencing the very problem even before applying the sensor values to the 3D rotation. When I try to change the 'pitch' value by rotating the device around only 'pitch' axis, the 'yaw' value also changes according to the rotation of the pitch. It seems completely unreasonable to me.

                Could somebody help me?? I'm stuck in this problem for a month.

                解决方案

                This is a common problem with yaw, pitch and roll. You cannot get rid of it as long as you are using yaw, pitch and roll (Euler angles). This video explains why.

                I use rotation matrices instead of Euler angles in my motion sensing application. For an introduction to rotation matrices I recommend:

                Direction Cosine Matrix IMU: Theory

                Rotation matrices work like a charm.

                Quaternions are also very popular and said to be the most stable.

                [This answer was copied from here.]

                这篇关于android方向传感器的奇怪行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                How To Create a Rotating Wheel Control?(如何创建转轮控件?)
                iOS 6 rotations: supportedInterfaceOrientations doesn#180;t work?(iOS 6 旋转:supportedInterfaceOrientations 不起作用?)
                CABasicAnimation rotate returns to original position(CABasicAnimation 旋转返回原始位置)
                How to avoid restarting activity when orientation changes on Android(如何在 Android 上的方向更改时避免重新启动活动)
                UITabBarController Rotation Issues in ios 6(ios 6 中的 UITabBarController 旋转问题)
                iOS: How to run a function after Device has Rotated (Swift)(iOS:设备旋转后如何运行函数(Swift))
                  <bdo id='Gf0B6'></bdo><ul id='Gf0B6'></ul>
                  <legend id='Gf0B6'><style id='Gf0B6'><dir id='Gf0B6'><q id='Gf0B6'></q></dir></style></legend>
                    1. <small id='Gf0B6'></small><noframes id='Gf0B6'>

                          <tbody id='Gf0B6'></tbody>
                        <i id='Gf0B6'><tr id='Gf0B6'><dt id='Gf0B6'><q id='Gf0B6'><span id='Gf0B6'><b id='Gf0B6'><form id='Gf0B6'><ins id='Gf0B6'></ins><ul id='Gf0B6'></ul><sub id='Gf0B6'></sub></form><legend id='Gf0B6'></legend><bdo id='Gf0B6'><pre id='Gf0B6'><center id='Gf0B6'></center></pre></bdo></b><th id='Gf0B6'></th></span></q></dt></tr></i><div id='Gf0B6'><tfoot id='Gf0B6'></tfoot><dl id='Gf0B6'><fieldset id='Gf0B6'></fieldset></dl></div>
                        • <tfoot id='Gf0B6'></tfoot>