• Determine which sensors are available on a device.
• Determine an individual sensor's capabilities, such as its maximum range, manufacturer, power requirements, and resolution.
• Acquire raw sensor data and define the minimum rate at which you acquire sensor data.
• Register and unregister sensor event listeners that monitor sensor changes.
developer.android.com -> Motion sensors ~ Accelerometer
Gravity
Gyroscope
Linear Acceleration
Rotation vector
-> Position sensor ~ Magnetic Field
orientation
Proximity
Accelerometer
The accelerometer is a built-in electronic component that measures tilt and motion. It is also capable of detecting rotation and motion gestures such as swinging or shaking. The most common use for it is to activate auto screen rotation on mobile devices when the user changes their orientation from portrait to landscape or vice-versa.Conceptually, an acceleration sensor determines the acceleration that is applied to a device (Ad) by measuring the forces that are applied to the sensor itself (Fs) using the following relationship:
Ad = - ∑Fs / mass
However, the force of gravity is always influencing the measured acceleration according to the following relationship:
Ad = -g - ∑F / mass
For this reason, when the device is sitting on a table (and not accelerating), the accelerometer reads a magnitude of g = 9.81 m/s2. Similarly, when the device is in free fall and therefore rapidly accelerating toward the ground at 9.81 m/s2, its accelerometer reads a magnitude of g = 0 m/s2. Therefore, to measure the real acceleration of the device, the contribution of the force of gravity must be removed from the accelerometer data. This can be achieved by applying a high-pass filter.
In general, the accelerometer is a good sensor to use if you are monitoring device motion. Almost every Android-powered handset and tablet has an accelerometer, and it uses about 10 times less power than the other motion sensors. One drawback is that you might have to implement low-pass and high-pass filters to eliminate gravitational forces and reduce noise.
Positive
- If not moving, accelerometer will give accurate reading of tilt angle
- Accelerometers are slower to respond than Gyro's
- Accelerometers are prone to vibration/noise
Gyroscope
The gyroscope measures the rate or rotation in rad/s around a device's x, y, and z axis. Rotation is positive in the counter-clockwise direction; that is, an observer looking from some positive location on the x, y or z axis at a device positioned on the origin would report positive rotation if the device appeared to be rotating counter clockwise. Standard gyroscopes provide raw rotational data without any filtering or correction for noise and drift (bias). In practice, gyroscope noise and drift will introduce errors that need to be compensated for. You usually determine the drift (bias) and noise by monitoring other sensors, such as the gravity sensor or accelerometer. gyroscope data (steady compass).http://www.41post.com/3745/programming/android-acessing-the-gyroscope-sensor-for-simple-applications
Phones it is available on:
* Phones:
• HTC Sensation
• HTC Sensation XL
• HTC Evo 3D
• HTC One S
• HTC One X
• Huawei Ascend P1
• Huawei Ascend X (U9000)
• Huawei Honor (U8860)
• LG Nitro HD (P930)
• LG Optimus 2x (P990)
• LG Optimus Black (P970)
• LG Optimus 3D (P920)
• Samsung Galaxy S II (i9100)
• Samsung Galaxy S III (i9300)
• Samsung Galaxy R (i9103)
• Samsung Google Nexus S (i9020)
• Samsung Galaxy Nexus (i9250)
• Samsung Galaxy Note (n7000)
• Sony Xperia P (LT22i)
• Sony Xperia S (LT26i)
Positive
- Gyro's respond fast so they are good at producing a quick response to a change in angle
- We are only taking readings at certain time intervals. We dont know what's happening between these periods
- For better tilt angle accuracy we need to take more gyro samples which takes more processing time
- Due to the inaccuracy of each gyro reading, the tilt angle calculated will drift over time
Linear Accelerometer
The linear acceleration sensor provides you with a three-dimensional vector representing acceleration along each device axis, excluding gravity.Conceptually, this sensor provides you with acceleration data according to the following relationship:linear acceleration = acceleration - acceleration due to gravity
You typically use this sensor when you want to obtain acceleration data without the influence of gravity.
Orientation Sensor
orientation sensor lets you monitor the position of a device relative to the earth's frame of reference. The orientation sensor derives its data by using a device's geomagnetic field sensor in combination with a device's accelerometer. Using these two hardware sensors, an orientation sensor provides data for the following three dimensions: Azimuth, Pitch, Roll.The orientation sensor derives its data by processing the raw sensor data from the accelerometer and the geomagnetic field sensor. Because of the heavy processing that is involved, the accuracy and precision of the orientation sensor is diminished. AS the sensor was deprecated its is advised that, Instead of using raw data from the orientation sensor, we recommend that you use the getRotationMatrix() method in conjunction with the getOrientation() method to compute orientation values. You can also use the remapCoordinateSystem() method to translate the orientation values to your application's frame of reference. The Accelerometer Play sample shows you how to translate acceleration sensor data into another frame of reference; the technique is similar to the one you might use with the orientation sensor.
Proximity Sensor
The proximity sensor lets you determine how far away an object is from a device.Most proximity sensors return the absolute distance, in cm, but some return only near and far values. Some proximity sensors return binary values that represent "near" or "far." In this case, the sensor usually reports its maximum range value in the far state and a lesser value in the near state. Typically, the far value is a value > 5 cm, but this can vary from sensor to sensor.Sensor Fusion
NOTE: Accelerometer and Geomagnetic field/magnetometer hardware's are combined already by the orientation sensor. However it has been deprecated [ http://stackoverflow.com/questions/10291322/what-is-the-alternative-to-android-orientation-sensor ]Gyroscope produces noise and drift error and Drift is already an issue with tracking, so minimal drift and noise is needed. But they are quick to respond, combined with an accelerometer which is accurate overtime drift maybe reduced and a quick response achieved.--each to calibrate the other-- This combination solves for pitch and roll!!!!
Difference between Azimuth and Yaw:
Azimuth seems to be used to represent an absolute heading, while yaw is a measurement of how much a craft turns from its current orientation.
Thus, if your azimuth went from
Magnetometer works of the azimuth measurement, and adding another measurement could cause a crash from to much information. However, the drifting yaw can be measured using GPS, perhaps a duel purpose to the data extracted. GPS has a relatively slow update rate (1 to 10 Hz) and is subject to short term errors.
~http://www.youtube.com/watch?v=C7JQ7Rpwn2k
Gyroscope measures its own rotation. Coriolis Effect.
by using the accelerometers gravity reading as a correction term for the gyro's drift a dynamic response is achieved. Though Time also needs to be accurate, using small time intervals
The optimal approach would include the gyro, accelerometer, compass and linear accelerometer, though I feel this will be far to computationally heavy and a bit unnecessary.
No comments:
Post a Comment