I'm working on an android application which can calculate device's movement in 6 direction. I think I can use acceleration as;

"**x=a.t^2**" but a is not a constant. And this is the problem. How can I calculate the total movement??