根据陀螺仪数据计算出旋转角度

发布于 2024-09-07 15:59:29 字数 118 浏览 4 评论 0原文

如何使用陀螺仪的数据计算出 x、y 和 z 方向的旋转角度。我正在使用 WiiMotion 中的陀螺仪以及 amd Brian Peek 的 Wiimotelib 1.8 beta 库。

非常感谢任何帮助。

How can you use data from the gyroscope to work out the angle of rotation in x,y and z. I am using the gyroscope in the WiiMotion plus amd Brian Peek's Wiimotelib 1.8 beta library.

Any help is greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半岛未凉 2024-09-14 15:59:29

请参阅从 MEMS 陀螺仪导出旋转角度,其中包含示例代码片段。您还可以查看 Yahoo! 上的一般公式。答案:如何使用速率陀螺仪确定旋转角度?

内容来自雅虎问答帖子:

速率乘以时间等于距离。如果您的出行速度为
50MPH 您在 1/2 小时内行驶了多远。 (25 英里)

相同类型的问题。如果你以 10 度/秒的速度移动三
秒你总共应该移动 30 度。这当然
假设您在整个三秒内保持统一的速率
时期。现在假设您以 1/10 的值测量了 30 个读数
第二个间隔和每个读数都显示相同的 10 度/秒速率。
答案是一样的 30 度

这两种方法的区别在于检测能力
较短时期内的利率变化。投票速度越快
费率信息越多,整体读数就越准确。

速率读数也应该有正值和负值。向左移动
例如,其负数向右移动其正数。然后你会添加
所有的读数并得出一个应该非常好的最终结果
接近从初始位置移动的实际整体角度。

此方法的问题是错误会随着时间的推移而复合,除非它们
定期针对已知点或参考进行归零。
以更快的速度轮询速率信息可最大限度地降低速率
在装置之前捕获速率信息会产生误差
经历较大的利率变化。然而变化仍然发生
并最终建立到计算出的角度为的点
错误。这就是为什么定期将角度与已知角度进行比较的原因
参考点并在总误差变大之前归零
足以成为问题。

Refer to Deriving Angle Of Rotation From A MEMS Gyroscope which includes sample code snippets. You could also take a look at the general formula on Yahoo! Answers: How do I determine the angle of rotation using a rate gyro?

Content from Yahoo Answers post:

Rate multiplied by time equals distance. If you travel at a rate of
50MPH how far did you travel in 1/2 hour. (25 miles)

Same type of problem. if you move at a rate of 10 deg/sec for three
seconds you should have moved a total of 30 degrees. This of course
assumes that you kept a uniform rate for the entire three second
period. Now suppose that you measured 30 readings at 1/10th of a
second intervals and each reading indicated the same 10deg/sec rate.
The answer would be the same 30 degrees

The difference between these two methods is the ability to detect
variations in rate across shorter periods of time. The faster you poll
the rate information the more accurate the overall reading will be.

Rate readings should also have positive and negative values. Move left
its negative , move right its positive for example. You would then add
all of the readings and come up with a net result that should be very
close to the actual overall angle moved from the initial position.

Problem with this method is that errors compound over time unless they
are zeroed out against a known point or reference periodically.
Polling rate information at a quicker pace minimizes the rate the
error builds up by capturing rate information before the unit has
experiences a large variation in rate. However variations still happen
and ultimately build up to a point where the computed angle is
erroneous. This is why the angle is periodically compared to a known
reference point and zeroed to it before such total error grow large
enough to become problematic.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文