DIGITAL FILTER LINEAR
Low Pass Linear Acceleration is an Android based code example and working application that estimates gravity with a low-pass filter implementation. The gravity estimation can then be used to calculate linear acceleration. The low-pass filter has the advantage of only using the acceleration sensor to provide an estimation of linear acceleration, no other sensors are required. While this example is implemented with Android/Java, the jist of the algorithm can be applied to almost any hardware/language combination to determine linear acceleration.
A low-pass filter is a filter that passes low-frequency signals and attenuates (reduces the amplitude of) signals with frequencies higher than the cutoff frequency. The actual amount of attenuation for each frequency varies depending on specific filter design. To find the gravity component of an acceleration signal, a low-pass filter is used to pass the long term portion of the signal (which is assumed to be gravity) through the filter and to attenuate everything else. The gravity component of the signal can then be subtracted from the original acceleration signal to find the linear acceleration.
Low Pass Linear Acceleration allows you to visulize acceleration measurements. Plot acceleration data from all three axis in real-time. This data can be written to an external .CSV file, saved and then viewed on your favorite spreadsheet application at a later time.
Use digital filtering and the acceleration sensor to determine linear acceleration. Linear acceleration is acceleration without the gravity component, which is useful for measuring acceleration without having to worry about mounting your device at a perfectly level angle.