- Enhance your device by opening up the hood!
- Even the most basic devices have an accelerometer, magnetic field, orientation, and light sensors.
- Gain functionality and precisely measure the world around you.
accelerometer, magnetometer, gyroscope, orientation, light, pressure, thermometer, proximity, gravity, linear acceleration, rotation, relative humidity
Linear Acceleration Sensor is intended to provide developers with code examples and an application to quickly test devices for an implementation of Sensor.TYPE_LINEAR_ACCELERATION. Some Android devices provide an implementation of linear acceleration with Sensor.TYPE_LINEAR_ACCELERATION, others do not. The implementation and performance of Sensor.TYPE_LINEAR_ACCELERATION varies from device to device. Some devices rely on low-pass filters, some fuse the magnetic and acceleration sensors, some fuse the gyroscope and acceleration sensors and others do not implement linear acceleration at all.
Almost all implementations of Sensor.TYPE_LINEAR_ACCELERATION are poor. The implementations succesfully isolate gravity from the acceleration under static conditions. However, while the device is actually under linear acceleration, the gravity compensation tends to be overestimated skewing the linear acceleration measurement. Linear Acceleration Sensor is ideal for discovering the limitations and performance of Sensor.TYPE_LINEAR_ACCELERATION.
• Log all of your data in real-time
• Analog gauges to display the outputs
• Real time sensor plots to visualize performance
The linear acceleration of an object is calculated as the acceleration of the device minus the force of the earth's gravitational field ( the tilt of the device). Gyro Linear Acceleration uses a complimentary filter to fuse the acceleration sensor and gyroscope sensor together to provide a measurement of the devices linear acceleration. The acceleration sensor alone is not capable of distinguishing true linear acceleration from tilt, or gravity. The gyroscope sensor is used to find the tilt of the device. The tilt angle of the device can then be used to calculate the gravity component of the acceleration that can then be subtracted from the acceleration to find the linear acceleration.
Most people will find that the end-result of this implementation is that, while linear acceleration can be measured while the device is static (not accelerating), linear acceleration cannot be accurately measured while the device is actually under linear acceleration. This is because the complementary filter, which is used to compensate for the drift of the gyroscope, begins to assume the acceleration of the device is actually tilt, skewing the rotation measurements from the gyroscope.
Related to the linear acceleration problem is that the gyroscope sensor can easily drift out of rotation with the device when it is experiencing vibrations or rapid rotations, even with the help of an acceleration sensor. If you modify the complementary filter to quickly compensate for gyroscope drift with the acceleration sensor, you increase the problem of the complimentary filter confusing linear acceleration for tilt when the device is actually accelerating.
Gyro Linear Acceleration may work well for determining linear acceleration for a static device, for instance, that moves a character or vehicle in a game by tilting the device. Gyro Linear Acceleration will not work well for determining the linear acceleration of a vehicle or other object that actually accelerates the device.
Gyro Linear Acceleration will plot the output of the sensor fusion in real-time and will also log the data to an external .CSV file that can be viewed at a later time on any spreadsheet application.
• Plot data in real-time
• Analog gauges to visualize the outputs
• Log the output to an external .CSV file