I’m using Samsung Galaxy S3. When I retrieved the available sensors:
I got a result like below:
LSM330DLC 3-axis Accelerometer TYPE_ACCELEROMETER
AK8975C 3-axis Magnetic field sensor TYPE_MAGNETIC_FIELD
iNemoEngine Orientation sensor TYPE_ORIENTATION
CM36651 Light sensor TYPE_LIGHT
CM36651 Proximity sensor TYPE_PROXIMITY
LSM330DLC Gyroscope sensor TYPE_GYROSCOPE
iNemoEngine Gravity sensor TYPE_GRAVITY
iNemoEngine Linear Acceleration sensor-S/W TYPE_LINEAR_ACCELERATION
iNemoEngine Rotation_Vector sensor TYPE_ROTATION_VECTOR
LPS331AP Pressure Sensor TYPE_PRESSURE
Rotation Vector Sensor TYPE_ROTATION_VECTOR
Gravity Sensor - software sensor TYPE_GRAVITY
Linear Acceleration Sensor TYPE_LINEAR_ACCELERATION
Orientation Sensor TYPE_ORIENTATION
Corrected Gyroscope Sensor TYPE_GYROSCOPE
STMicroelectronics seems to be the default one and sensors provided by Google Inc and Samsung Inc may be the secondary sensors.
When I used getVendor() method, it returned STMicroelectronics(being the hardware default sensor) and Samsung. But when I registered both of the sensors, the onSensorChanged() was called that returned the orientation values(pitch, roll and azimuth) with great difference.
Example, I got the following values at the same timestamp(with difference of few seconds).
pitch: roll: azimuth:
Samsung 0.5917465 -4.212 84.583
STMicroelectronics 0.0865345 -3.88854 356.825
Any idea of why there is a difference in both or should we always monitor both the hardware and software sensors?
The 2 sensors are provided by the 2 vendors as mentioned by madhus. It can be obtained using the code:
I got the vendors as STMicroElectronics and google Inc for all the sensors, except orientation(Samsung Inc and STMicroElectronics). However, as the default and hardware sensor is STMicroElectronics, I am using that.