-1
\$\begingroup\$

I have accelerometer readings from the android device. I would like to know what kind of acceleration this data represents(rotation or linear acceleration).

Is there anyway I can use this data to distinguish between rotation and translation(if it has both)?

I tried low-pass-filtering the data and find the distance using this code:

        oldaccel+=0.1428* (accel-oldaccel); //low pass filtering
        S+=((V*dT)+ (0.5*oldaccel*dT*dT)); //finding the distance with previous velocity
        V+=(oldaccel*dT);                  //updating the velocity

( oldaccel-filtered data accel-accelerometer data S-distance,V-velocity,dT-sampling period)

It doesn't give me the distance expected for a linear motion(I'm guessing useful data is being eliminated along with noise?)

\$\endgroup\$
  • \$\begingroup\$ the accelerometer readings is obtained by choosing TYPE_ ACCELERATION in sensor service. \$\endgroup\$ – user2155669 Mar 19 '13 at 8:18
1
\$\begingroup\$

You would probably need to highpass filter to yield translational acceleration,depending on the nature of the translations you're talking about. This doesn't take into account any processing the Android already does.

\$\endgroup\$
  • \$\begingroup\$ Translation in my case would be slow motion say to the left or right. But how does the nature of translation matter? \$\endgroup\$ – user2155669 Mar 19 '13 at 10:48
  • \$\begingroup\$ And I will try a high pass filter. What is the reasoning behind this? \$\endgroup\$ – user2155669 Mar 19 '13 at 10:48
  • \$\begingroup\$ Gravity is an acceleration, according to Einstein. You need to remove any offsets due to gravity. If not for this, you wouldn't need to filter at all, as your integration is effectively a low pass filter. \$\endgroup\$ – Scott Seidman Mar 19 '13 at 10:55
  • \$\begingroup\$ Your answer makes perfect sense. And works out theoretically. But when I implement this in code, I just can't find the displacement. The variable S quickly accumulates to a large value. \$\endgroup\$ – user2155669 Mar 19 '13 at 11:04
  • \$\begingroup\$ This is simply not practical without sensors that are orders of magnitude better. \$\endgroup\$ – Chris Stratton Mar 19 '13 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.