可用的 Android 设备传感器列表
我的手机有以下传感器列表:
BMA150 3-axis Accelerometer, Type: 0, Vendor: The Android Open Source Project, Version: 1, Power: 3.0, Resolution: 2.480159E-4, Max Range: 2.8
AK8973 3-axis Magnetic field sensor, Type: 0, Vendor: The Android Open Source Project, Version: 1, Power: 6.7, Resolution: 1.0, Max Range: 2000.0
AK8973 Orientation sensor, Type: 0, Vendor: The Android Open Source Project, Version: 1, Power: 9.7, Resolution: 1.0, Max Range: 360.0
APDS9900 Proximity sensor, Type: 8, Vendor: AVAGO, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 1.0
APDS Light sensor, Type: 5, Vendor: AVAGO, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL rotation vector, Type: 11, Vendor: Invensense, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL linear accel, Type: 10, Vendor: Invensense, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL gravity, Type: 9, Vendor: Invensense, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL Gyro, Type: 4, Vendor: Invensense, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL accel, Type: 1, Vendor: Invensense, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL magnetic field, Type: 2, Vendor: Invensense, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL Orientation (android deprecated format), Type: 3, Vendor: Invensense, Version: 1, Power: 9.7, Resolution: 1.0, Max Range: 360.0
我想知道为什么有两个加速度计传感器、两个磁性传感器和两个方向传感器,而活动传感器已被弃用?
这些休眠传感器有什么作用吗?
谢谢,
亚当·泽哈维。
My phone has the following list of sensors:
BMA150 3-axis Accelerometer, Type: 0, Vendor: The Android Open Source Project, Version: 1, Power: 3.0, Resolution: 2.480159E-4, Max Range: 2.8
AK8973 3-axis Magnetic field sensor, Type: 0, Vendor: The Android Open Source Project, Version: 1, Power: 6.7, Resolution: 1.0, Max Range: 2000.0
AK8973 Orientation sensor, Type: 0, Vendor: The Android Open Source Project, Version: 1, Power: 9.7, Resolution: 1.0, Max Range: 360.0
APDS9900 Proximity sensor, Type: 8, Vendor: AVAGO, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 1.0
APDS Light sensor, Type: 5, Vendor: AVAGO, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL rotation vector, Type: 11, Vendor: Invensense, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL linear accel, Type: 10, Vendor: Invensense, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL gravity, Type: 9, Vendor: Invensense, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL Gyro, Type: 4, Vendor: Invensense, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL accel, Type: 1, Vendor: Invensense, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL magnetic field, Type: 2, Vendor: Invensense, Version: 1, Power: 0.5, Resolution: 1.0, Max Range: 10240.0
MPL Orientation (android deprecated format), Type: 3, Vendor: Invensense, Version: 1, Power: 9.7, Resolution: 1.0, Max Range: 360.0
of this I wonder, why are there two sensors for the accelerometer, two magnetic and two orientation sensors from which the active one is deprecated?
Does these dormant sensors has any function?
Thanks,
Adam Zehavi.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我强烈建议仅使用标准 Android 传感器,例如
旋转矢量传感器,
重力传感器,
线性加速度传感器,
方向传感器
而不是 MPL 类型。 MPL 类型是 Invensense 中组件特定的非标准功能,无法在其他手机上使用。
此外,我在 Galaxy Nexus 上尝试了这两种类型,发现上面列出的标准 Android 传感器比 MPL 类型提供更好的传感器数据融合结果。
例如,旋转矢量传感器比 MPL 旋转矢量更好地补偿磁畸变。
I strongly advise to use only standard Android sensors like
Rotation Vector Sensor,
Gravity Sensor,
Linear Acceleration Sensor,
Orientation Sensor
and not the MPL types. The MPL types are component specific non-standard functions from Invensense that will not work on other phones.
Also, I tried out both types on my Galaxy Nexus and found that the above listed standard Android sensors provide better sensor data fusion results than the MPL types.
E.g. the Rotation Vector Sensor compensates magnetic distortions better that the MPL rotation vector.
您的手机只有一组物理传感器,但不同的库可能会读取它并提供与 Android 的接口。 MPL 传感器使用 Invensense 运动处理库,该库融合来自传感器的数据并提供(希望得到改进的)过滤结果。我的猜测是,Android 传感器提供的数据接近于传感器的原始数据。
方向传感器类型作为一个整体已被弃用,而不仅仅是一种特定的传感器。术语“方向”是指纵向/横向,很容易与返回完整 3D 方向的旋转矢量传感器混淆。
为了获得最佳兼容性,请勿对特定传感器的使用进行硬编码。使用 SensorManager.getDefaultSensor() 方法并如有必要,使用传感器的属性来调整应用程序的行为。
Your phone only has one set of physical sensors, but different libraries may read it and provide an interface to Android. The MPL sensors are using the Invensense Motion Processing Library, which fuses data from the sensors and provides a (hopefully improved) filtered result. My guess is that the Android sensors provide something close to the raw data from the sensor.
The orientation sensor type as a whole is deprecated, not just one specific sensor. The term "orientation" refers to portrait/landscape, which is easily confused with the rotation vector sensor, which returns a full 3D orientation.
For the best compatibility, don't hardcode the use of a specific sensor. Use the SensorManager.getDefaultSensor() method and use the properties of the sensor to adjust your application's behavior if necessary.
例如,我看到您有 2 个方向传感器,但一个是类型 0,另一个是类型 3。
我只开发 Delphi Xe5 Android 应用程序,并且传感器类型声明传感器功能。例如,方向类型 0:指南针 1D,类型 3:倾斜仪 1D。
我认为它在 Java 中的工作方式与 XE5 类似?
XE5 的文档非常泄漏,但另一个证据是来自 IDE 演示应用程序的代码: LSensorArray := TSensorManager.Current.GetSensorsByCategory(ASensorCategory); GetSensorsByCategory() 结果包含给定类别的传感器数组...
I see you have for example 2 orientation sensors, but one is type 0 another type 3.
I only develop Delphi Xe5 Android applications and there type of sensor declares sensor functions. For example Orientation type 0: Compass 1D, type 3: Inclinometer1D.
I think it works similar in Java like in XE5?
Documentation for XE5 is very leak, but another proof for it is that code from IDE Demos Application: LSensorArray := TSensorManager.Current.GetSensorsByCategory(ASensorCategory); GetSensorsByCategory() results with array of sensors from given category...