问题描述
在Android SDK确实提供了一个很好的接口来访问传感器。
但如线性加速度传感器可以被评价为href=\"http://developer.android.com/reference/android/hardware/SensorEvent.html#values\" rel=\"nofollow\">文档从描述重力的和的加速的 - 所以此传感器没有真正的物理副本,这是相当一个 - 我们称之为 - 虚拟传感器
有关接近传感器的东西是相当清楚的,我无法想象它是由其他一些价值观的影响。
但GPS传感器可以由accleremoter传感器,当GPS信号是相当weaks我的认为的值被莫名其妙地估计其他传感器的支持。受到影响
所以基本上我的问题是:哪些传感器做得到的直接的物理传感器和被Android的SDK以某种方式改变或完全计算进项税?
我如何获得来自传感器的原始输入?
我所附可通过传感器类的传感器列表。 GPS,W-LAN,相机等丢失
// API级别:3
TYPE_ACCELEROMETER
TYPE_GYROSCOPE
TYPE_LIGHT
TYPE_MAGNETIC_FIELD
TYPE_ preSSURE
TYPE_PROXIMITY
TYPE_TEMPERATURE
// API级:9(2.3)
TYPE_GRAVITY
TYPE_LINEAR_ACCELERATION //可通过ACC来计算。和GRAV。 (以上链接)
TYPE_ROTATION_VECTOR
我是pretty确保GPS此刻是一个独立的,或给原始数据输出。
的方向传感器是一个我知道是不是从单个传感器的原始但实际上是2个传感器的融合和将来可能更多(陀螺仪)。截至目前的取向磁场传感器(指南针)和加速度计的组合。任何现代指南针将同时使用指南针和加速计来计算其最终方向,以补偿漂移,噪声和其它干扰。如果您发现计算用GET旋转矩阵的方向时,并获得方向它需要你听这两个磁场和加速度传感器。
我想说的严重性,线性加速度和旋转矢量传感器并不是实际的传感器和距离传感器等数据的部分分离出来,大多来自加速度计和指南针。
最后的pressure和温度传感器实际上是通过一个单一的传感器来计算。
the Android SDK actually offers a nice interface to access the sensors.But e.g. the linear acceleration-sensor can be evaluated as the documentation describes from gravity and acceleration - so there is no real physical counterpart for this Sensor, it is rather a - let's call it - "virtual sensor".
For the proximity-sensor things are rather clear, i can't imagine it is influenced by some other values.
But the GPS-sensor could be influenced by the accleremoter sensor when the GPS-signal is rather weaks I think values are somehow estimated supported by other sensors.
So basically my question is: which sensors do get direct input from physical sensors and which are somehow altered or totally calculated by the Android-SDK?And how do I get raw input from the sensors?
I appended a list of the sensors available through the Sensor-class. GPS, W-LAN, Camera, etc. missing
//API-Level: 3
TYPE_ACCELEROMETER
TYPE_GYROSCOPE
TYPE_LIGHT
TYPE_MAGNETIC_FIELD
TYPE_PRESSURE
TYPE_PROXIMITY
TYPE_TEMPERATURE
//API-Level: 9 (2.3)
TYPE_GRAVITY
TYPE_LINEAR_ACCELERATION // can be calculated via acc. and grav. (link above)
TYPE_ROTATION_VECTOR
I am pretty sure the GPS at the moment is a stand alone or give raw data output.
The orientation sensor is one that I know that is not a raw from a single sensor but is actually the fusion of 2 sensors and in the future possibly more (gyro). As of now the orientation is a combination of the magnetic field sensor (compass) and the accelerometer. Any modern day compass will use both the compass and accelerometer to calculate its final direction and to compensate for drift, noise and other interference. If you notice when calculating the orientation with get rotation matrix and get orientation it requires you to listen for both magnetic field and accelerometer sensors.
I would say the gravity, linear acceleration and rotation vector sensors are not actual sensors and just parts of data from other sensors separated out, mostly from accelerometer and compass.
Lastly the pressure and temperature sensor are actually calculated through a single sensor.
这篇关于Android的传感器 - 哪些人获得直接输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!