Take the 2-minute tour ×
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Ron Maimon Dec 12 '11 at 10:34
1  
the laws of motion should help, s=ut+1/2 at^2 etc. Any a-level text book will have all the details. –  Nic Dec 12 '11 at 11:22
1  
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.) –  David Z Dec 12 '11 at 20:55
    
(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. –  David Z Dec 12 '11 at 20:57
    
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. –  Colin K Dec 19 '11 at 5:09
show 3 more comments

2 Answers 2

up vote 4 down vote accepted

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!

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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