0

I am working on a project that requires me to use data from an accelerometer and find velocity but all the values that I am getting are positive which is quite bizzare. Is it a faulty instrument or just noise? and how to get rid of it

1 Answers1

0

Android most defiantly supports negative accelerometer values. If you want to test if it may be faulty hardware (although unlikely unless the phone is very old), lay it flat on its back on a table in front of you. While recording the values, slide it away from you, stop, then slide it back towards you. One of those motions should of caused a positive and one a negative acceleration.

If this "test" produces positive values both times, you may be type casting wrong or somehow dropping the sign of the number, please post code if this is the case. Otherwise, to cut down on noise is not overly simple, and would require some filtering of the data.

I would recommend checking out this post for that: Filtering accelerometer data noise

Let me know if that little table test works or not, if not, post code and I can take a look.

dFrancisco
  • 896
  • 1
  • 11
  • 21