加速度计,陀螺仪和磁力计 [英] Accelerometer, Gyro, and Magnetometer

查看:243
本文介绍了加速度计,陀螺仪和磁力计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是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.

这篇关于加速度计,陀螺仪和磁力计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆