2

I was wondering if I can calculate the velocity of the phone using accelerometer sensor. What I mean is someone swing the phone once and I can measure velocity or force which was used to do this... or any other which can tell how powerful swing was:D After playing with accelerometer for a while(in VS and emulator) I see it works a little different that I though.

Is it possible to achieve something like this?

Ali
  • 56,466
  • 29
  • 168
  • 265
f1ames
  • 1,714
  • 1
  • 19
  • 36

1 Answers1

1

No, not accurately.

Although my previous answer here is about position, the same holds for velocity. Perhaps surprisingly, it is the gyro white noise that messes up the accuracy.

Depending on what you want to do, you might be better of with DTW.

Integrating the linear acceleration (acceleration minus gravity) should work for very short time intervals, especially if you do not need accurate results. You also have to assume some initial velocity.

Community
  • 1
  • 1
Ali
  • 56,466
  • 29
  • 168
  • 265
  • "No, not accurately", I don't need accurate values, because I want use it for the game. It should just somehow recognize the velocity, so if swing is fast I got greater values than when swing is slower(or sth like that):D So you mean I should use gyro? – f1ames Mar 31 '12 at 18:15
  • 1
    The accelerometers also measure gravity: you get 1g acceleration even if you are not moving the device. This can be removed by the aid of the gyroscopes. What you need is the linear acceleration (acceleration minus gravity). Perhaps it is automatically computed behind the scenes on WP, I do not know that platfrom. Anyway, **go ahead, integrating the linear acceleration should work for a very short time, especially if you do not need accurate results.** You also have to assume some initial velocity (zero probably). – Ali Mar 31 '12 at 19:43