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

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

问题描述

我是 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天全站免登陆