Hello, TYPE_ACCELEROMETER uses the accelerometer and only the accelerometer. It returns raw accelerometer events, with minimal or no processing at all.
TYPE_GYROSCOPE (if present) uses the gyroscope and only the gyroscope. Like above, it returns raw events (angular speed un rad/s) with no processing at all (no offset / scale compensation). TYPE_ORIENTATION is deprecated. It returns the orientation as yaw/ pitch/roll in degres. It's not very well defined and can only be relied upon when the device has no "roll". This sensor uses a combination of the accelerometer and the magnetometer. Marginally better results can be obtained using SensorManager's helpers. This sensor is heavily "processed". TYPE_LINEAR_ACCELERATION, TYPE_GRAVITY, TYPE_ROTATION_VECTOR are "fused" sensors which return respectively the linear acceleration, gravity and rotation vector (a quaternion). It is not defined how these are implemented. On some devices they are implemented in h/w, on some devices they use the accelerometer + the magnetometer, on some other devices they use the gyro. On Nexus S and Xoom, the gyroscope is currently NOT used. They behave as if there was no gyro available, like on Nexus One or Droid. We are planing to improve this situation in a future release. Currently, the only way to take advantage of the gyro is to use TYPE_GYROSCOPE and integrate the output by hand. I hope this helps, Mathias On Mar 13, 3:03 am, Pritam <pritamsha...@gmail.com> wrote: > Could someone help to know which sensor uses which part of phone's > hardware or in what combination of this on Nexus S in android 2.3 ? > > Following are the sensor events: > > TYPE_ACCELEROMETER > > TYPE_GYROSCOPE > > TYPE_GRAVITY > > TYPE_LINEAR_ACCELERATION > > TYPE_ORIENTATION > > TYPE_ROTATION_VECTOR > > I assume first 2 corresponds to separate hardware (accelerometer and > gyroscope), > > but how with the other remaining ones ? > > Does TYPE_LINEAR_ACCELERATION uses both Acceleromter and Gyroscope > hardware at its best? > > I am actually interested in "linear aceleration" so should I need not > worry about gyro events, if "linear acceleration" internally uses gyro > to give out values ? > > Also when tested on device ( Nexus S ) linear accelerations found to > give high values for minor shakes , so assuming this removes gravity > vector, this was not expected. > > Thanks. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en