1
$\begingroup$

Sorry if this question is dumb, and I know is physics 101, but I'm not that good with physics.

I'm writing an iPhone program that by collecting the acceleration data of the device tries to replicate the motion of the device in an virtual environment.

To simplify things, let's consider just one axis.

If the device is at position 0 with acceleration 0 and speed 0, if it receives an acceleration of 1.25G, what it will be it's position after 1.22 seconds, considering that the acceleration will last for the whole 1.22 seconds?

$\endgroup$
8
  • $\begingroup$ If you know how to calculate the final speed, divide the final speed by two to get the average speed, and multiply the average speed by the time to get the distance. $\endgroup$
    – Ron Maimon
    Commented Dec 12, 2011 at 10:34
  • 1
    $\begingroup$ the laws of motion should help, s=ut+1/2 at^2 etc. Any a-level text book will have all the details. $\endgroup$
    – Nic
    Commented Dec 12, 2011 at 11:22
  • 1
    $\begingroup$ Hi Nicolae, and welcome to Physics Stack Exchange! You're right that this is kind of a trivial question at face value - not because it's "physics 101" level, but because all you need to do is look up a formula. It's as if you go to the English Language & Usage site and ask them for a synonym of, say, "complicated" - they'll just tell you that you should have checked a thesaurus. SE sites are not really the place for such "general reference" questions. (cont.) $\endgroup$
    – David Z
    Commented Dec 12, 2011 at 20:55
  • $\begingroup$ (cont.) But you're lucky in that there is a sense in which I think this question could be more complex: you will have to not only know the equation, but also numerically compute the position by integrating the acceleration over time, and there are some subtleties involved in that sort of numerical computation which a good answer could definitely address. $\endgroup$
    – David Z
    Commented Dec 12, 2011 at 20:57
  • $\begingroup$ The only way this gets interesting if if you don't know how the phone is oriented, it if the orientation is changing. There are some neat ways I can imagine to estimate that missing data, but your accuracy will still degrade over time. $\endgroup$
    – Colin K
    Commented Dec 19, 2011 at 5:09

2 Answers 2

4
$\begingroup$

We are looking for the position, say $s$, of the object at a certain time $t$. Given initial conditions $t_0$ (initial time), $v_0$ (velocity at $t_0$), $s_0$ (position at $t_0$) and a constant acceleration $a$ during a time interval $t - t_0$.

We use the following equation to determine the position $s$ at time $t$:

$$s = s_0 + v_0(t-t0) + \frac {1}{2}a(t-t_0)^2$$

(This page would be helpful if you need more.)

Hope this helps!

$\endgroup$
2
$\begingroup$

The existing answers are fine if the accelerations are constant enough. If you collect the data with the accelerometer of the device, there's a very good chance that the accelerations you're dealing with is not constant.

There are some numerical integration methods (Euler, Verlet, Runge-Kutta, ...) to integrate the accelerations of moving bodies, so we can know its position as a function of time. You can do a bit of research on Wikipedia, pick one that you understand (I don't recommend Euler however). Still, the methods (especially the second-order ones) are often based on the fact that the equation $ s = s_0 + v_0 t + \frac12 gt^2 $ holds approximately true for small intervals of time.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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