`

【翻译】(88)传感器

 
阅读更多

【翻译】(88)传感器

 

see

http://developer.android.com/guide/topics/sensors/index.html

 

原文见

http://developer.android.com/guide/topics/sensors/index.html

 

-------------------------------

 

Sensors

 

传感器

 

-------------------------------

 

Topics

 

主题

 

Sensors Overview 传感器概览

Motion Sensors 动作(注:运动)传感器

Position Sensors 位置传感器

Environment Sensors 环境传感器

 

Key classes and interfaces 

 

关键类与接口

 

Sensor

SensorEvent

SensorManager

SensorEventListener

 

Related samples

 

相关示例

 

Accelerometer Play 加速计游戏

API Demos (OS - RotationVectorDemo) API演示(操作系统-旋转向量演示)

API Demos (OS - Sensors) API演示(操作系统-传感器)

 

-------------------------------

 

Most Android-powered devices have built-in sensors that measure motion, orientation, and various environmental conditions. These sensors are capable of providing raw data with high precision and accuracy, and are useful if you want to monitor three-dimensional device movement or positioning, or you want to monitor changes in the ambient environment near a device. For example, a game might track readings from a device's gravity sensor to infer complex user gestures and motions, such as tilt, shake, rotation, or swing. Likewise, a weather application might use a device's temperature sensor and humidity sensor to calculate and report the dewpoint, or a travel application might use the geomagnetic field sensor and accelerometer to report a compass bearing.

 

大多数基于Android的设备拥有测量动作、方向和各种环境条件的内置传感器。这些传感器能够提供带高精度和准确性的原始数据,并且有帮助如果你想监测三维设备移动或定位,或者你想监测设备附近周围环境的改变。例如,一个游戏可能跟踪设备的重力感应器的读取以推断用户手势和动作,诸如倾斜、摇动、旋转、或摆动(注:挥动)。同样,一个天气应用程序可能使用一个设备的温度传感器和湿度传感器以计算和报告露点(注:固定气压下结露的温度,用于判断水汽含量),或者一个旅游(注:出行)应用程序可能使用地磁场传感器和加速计来报告一个罗盘方向角(注:方向角的一种,见维基的介绍http://zh.wikipedia.org/zh/%E6%96%B9%E4%BD%8D%E8%A7%92)。

 

The Android platform supports three broad categories of sensors:

 

Android平台支持三种传感器的广泛(注:广义)分类:

 

* Motion sensors

 

* 动作传感器

 

These sensors measure acceleration forces and rotational forces along three axes. This category includes accelerometers, gravity sensors, gyroscopes, and rotational vector sensors.

 

这些传感器测量沿三个轴的加速度力(注:这里可能是指位移造成的力分量)和旋转力(注:这里可能是指自转造成的力分量)。这个分类包括加速计、重力传感器(注:也简称G-sensor,特指线加速度传感器)、陀螺仪,以及旋转向量传感器(注:可能特指角加速度传感器)。

 

* Environmental sensors

 

* 环境传感器

 

These sensors measure various environmental parameters, such as ambient air temperature and pressure, illumination, and humidity. This category includes barometers, photometers, and thermometers.

 

这些传感器测量各种环境参数,诸如环境大气温度和压强,照度和湿度。这个分类包括气压计、光度计,和温度计。

 

* Position sensors

 

* 位置传感器

 

These sensors measure the physical position of a device. This category includes orientation sensors and magnetometers.

 

这些传感器测量设备的物理位置。这个分类包括方向传感器和磁强计。

 

To access these sensors, you can use the Android sensor framework. The sensor framework provides several classes and interfaces that help you perform a wide variety of sensor-related tasks. To learn more about the framework and the sensors that are supported on the Android system, read the following documents:

 

为了访问这些传感器,你可以使用Android传感器框架。传感器框架提供几个类和接口,它们帮助你执行广泛种类的传感器相关任务。要想知道关于该框架和在Android系统上支持的传感器的更多信息,请阅读以下文档:

 

Sensors Overview

 

传感器概览

 

Learn how to list the sensors that are on a device, set up sensor event listeners, and acquire sensor data. Also learn best practices for accessing and using sensors.

 

学习如何列举设备上的传感器,配置传感器事件监听器,以及获取传感器数据。还学习访问和使用传感器的最佳实践。

 

Motion Sensors

 

动作传感器

 

Learn how to use the sensors that provide acceleration data, such as the accelerometer, gravity sensor, and linear acceleration sensor. Also learn how to use the sensors that provide rotational data, such as gyroscopes and rotational vector sensors.

 

学习如何使用提供加速度数据的传感器,诸如加速计、重力感应器,以及线性加速度感应器。还学习如何使用提供旋转数据的传感器,诸如陀螺仪和旋转向量传感器。

 

Position Sensors

 

位置传感器

 

Learn how to use the sensors that provide orientation and compass data, such as the orientation sensor and the geomagnetic field sensor.

 

学习如何使用提供方向和罗盘数据的传感器,诸如方向传感器和地磁场传感器。

 

Environment Sensors

 

环境传感器

 

Learn how to use the sensors that provide environmental data, such as the light, humidity, pressure, temperature, and proximity sensors.

 

学习如何使用提供环境数据的传感器,诸如光照、湿度、压力(注:这里的压力传感器是用来测量液体与气体的压强)、温度、以及接近(注:通过电磁感应在非接触下检测对象)传感器。

 

Except as noted, this content is licensed under Apache 2.0. For details and restrictions, see the Content License.

 

除特别说明外,本文在Apache 2.0下许可。细节和限制请参考内容许可证。

 

Android 4.0 r1 - 09 May 2012 23:46

 

-------------------------------

 

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

 

此页部分内容,是基于Android开源项目所创建和共享的工作,并且根据知识共享2.5署名许可证描述的条款来使用的修改版。

 

(本人翻译质量欠佳,请以官方最新内容为准,或者参考其它翻译版本:

* ソフトウェア技術ドキュメントを勝手に翻訳

http://www.techdoctranslator.com/android

* 微风的网络日志

http://leybreeze.com/blog/

* 农民伯伯

http://www.cnblogs.com/over140/

* Android中文翻译组

http://androidbox.sinaapp.com/


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics