加速度计,陀螺仪和磁力计

编程入门 行业动态 更新时间:2024-10-26 22:17:28
本文介绍了加速度计,陀螺仪和磁力计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是Core Motion的新手,我很困惑。有人可以解释这些输入量度什么以及它们如何以简单的方式有用吗?

I'm new to Core Motion and I'm very confused. Can somebody please explain what these inputs measure and how they can be useful in simple terms?

推荐答案

加速度计通过感觉施加的运动力来测量相对于重力的运动到设备。运动力可以描述为设备的加速和减速速率,因此也就是该传感器的名称。

Accelerometers measure movement relative to gravity, by virtue of "feeling" the force of movement applied to the device. Force of movement can be described as the rate of acceleration and deceleration of the device, hence the name of this sensor.

陀螺仪测量通过悬挂元件报告其相对于设备的旋转来实现旋转。当设备旋转时,该悬挂的元素不会旋转,因此有一个报告告诉您手机旋转了多远。

Gyroscopes measure changes in rotation by virtue of a suspended element reporting its rotation relative to the device. As the device rotates, this suspended element doesn't rotate, so there's a report coming from it that tells you how far the phone's rotated.

磁力计从北/南磁场获得旋转位置的概念,罗盘使用该磁场来知道它们相对于磁极的位置。这些数据(主要)用于帮助陀螺仪,因为这些东西会受到浮动和惯性的影响。

Magnetometers get their idea of rotational position from the north/south magnetic fields that compasses use to know where they are relative to the poles. This data is used (primarily) to help the Gyroscope, because these things suffer from float and inertia.

结合起来,来自这些传感器的信息,经过很好的过滤(Apple用CoreMotion为您完成的操作)为您提供了手机的所有运动。

Combined, the information from these sensors, when filtered well (which Apple does for you with CoreMotion) give you all the movement of a phone.

因此您可以知道用户是否在摆动像乒乓球拍一样的电话,或者像Wii Remote Mario风格的游戏控制器那样的转向,或者只是走路。

So you can know if the user is swinging the phone around like a table tennis bat, or steering like a Wii Remote Mario style game controller, or simply walking.

更多推荐

加速度计,陀螺仪和磁力计

本文发布于:2023-10-08 02:05:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1471198.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:磁力计   加速度计   陀螺仪

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!