Why is this wrong? Calculate 3D position from acceleration

169 Views Asked by At

I would like to ask a question related to math/physics since I'm just a developer and I don't have enough physics knowledge to solve this problem alone.
I'm trying to calculate a 3d position having the acceleration.
Before explaining any further, I try to give you a more context.
Actually I'm trying to build a sort of "Playstation Move" using an accelerometer + gyroscope sensor for a Unity Project. Without explaining in depth, imagine that I've this sensor that, applying a force, gives me those value.
In Unity (software to develop videogames), I've a 3d object placed (imagine a cube) in a 3d World (so I know its starting position).
Some people said that, to calculate the position, I need to Integrate twice the acceleration and I understand. But, according to acceleration formula (If i understood properly):
Having $m = meters$ and $s = seconds$

$a= m/s^{2}$

So, using the inverse, I can easily do something like this:

$a \cdot s^{2} = m$

From my point of view, this seems a correct calculation and I don't need to integrate anything.
Can I ask you why my idea is wrong and why I need to Integrate twice instead?
I hope I explained well what's my doubt.
PS: I know that could be a stupid question, but I can't find anything related.

1

There are 1 best solutions below

8
On BEST ANSWER

The formula for the acceleration is $$a=\frac{d^2x}{dt^2},$$ where the value $x$ describes the position of a particle at a given time. From this definition, it should be clear that given $a$ (the acceleration), you can calculate $x$ (the position) by integrating $a$ twice (because, roughly speaking, integration is a reverse operation to derivation).


I do not know where you got the formula $a=\frac{m}{s^2}$. That expression itself does not make much sense, since $m$ and $s$ are not defined.

Note: If by $m$ you mean meters, and $s$ stands for seconds, then $\frac{m}{s^2}$ is not equal to acceleration, but is only the unit of acceleration. In that case, the equation $a=\frac{m}{s^2}$ is incorrect, and in fact nonsensical, because the left side of the equation holds a value, while the right side of the equation does not (it only has a unit).