
#1
Dec210, 10:50 PM

P: 4

Hi guys,
Sorry I am not into physics that much, basically I am a software developer..., my question might be silly., but, I want to calculate distance between two points. The situation here is  if an object is moved from say point x to point y in t amount of time with an acceleration which is not constant, can we calculate the distance between those points? We dont know what are the positions of x and y. All we know is how much time did they take to move the object from x to y and acceleration at every second. Thanks, aspr 



#2
Dec310, 12:05 AM

P: 1,262

As long as the initial velocity is zero (or otherwise known), it's no problem. How's your calculus?
Acceleration is the derivative of velocity, which itself is the derivative of displacement (i.e. position). [tex] a \equiv \frac{dv}{dt} \hspace{1in} v \equiv \frac{dx}{dt} [/tex] To find a change in displacement (x), one must integrate (reverse the derivative) of velocitywhich may require first integrating the acceleration. Numerically, there are lots of different methods to perform integrations. The simplest method, is Euler's method (pronounced Oiler). To find the velocity at some time `2', given the velocity at `1' you do: [tex] v_2 = v_1 + a_{1,2}\times \Delta t [/tex] Where delta t is the time interval, and [tex]a_{1,2}[/tex] is the acceleration between 1 and 2. 



#3
Dec310, 09:58 AM

P: 4

Thanks for the reply zhermes.
Yes, I think initial velocity is zero because we are moving an object from still position (point x). After moving some distance it stops at point y. I was good at calculus when I was in high school., it has been 6 years since then and now I am very bad at it. I am sure if I go and check out some tutorials or notes I think i can get my calculus back. I did search the web and I found out this: Please correct me if I am wrong v = v[tex]_0[/tex] + at; (Is 'a' here average acceleration? because it might be different at start, in the middle and at end.) v = at (since v[tex]_0[/tex] = 0); v = dx/dt; at = dx/dt; dx = at * dt??? Is this how i need to approach? if so what should I do from there? 



#4
Dec310, 10:13 AM

P: 15

Calculate distance  accleration, time, distance
What you have is right, but at the same time, not quite. In your question, you said that the acceleration is changing. The equation that you posted, however, can only, sadly, be used for constant acceleration. If you do some extra work, tinker with it and whatnot, you might be able to get it right, but otherwise, I'd go for a different approach.
As Zhermes has so kindly explained, the acceleration is simply the slope of the graph of the velocity, and velocity is simply the slope of the graph of position. Yes, I'm starting at the basics for Calc. here, but I'm not sure how much you remember. Finding the slope of an equation with respect to x is done by simply taking the derivative of the equation. What you need to do is the opposite. Starting with an equation for acceleration (which I sincerely hope that you have, rather than a set of numbers. If the latter is the case, I'll have to fix this up a bit.), you simply take the integral twice. If you'd post the equation for acceleration, as well as any questions you have, I'd be more than willing to help you as much as I can. 



#5
Dec310, 03:18 PM

P: 1,262





#6
Dec310, 04:51 PM

P: 4

Hey zhermes, you got me right., I was thinking of developing an application to build my portfolio. I want to develop an application which can calculate height of an object taking help of the accelerometer in iPhone, something like a pedometer but the person wont move he just moves his phone.
Sorry I should have said this before.. but yes thats what I am trying to develop and.. I have to get my physics right. So now do you understand the question clearly or did I make a mess? Thanks, aspr 



#7
Dec310, 05:17 PM

P: 1,262

Okay, gotcha! That's a really awesome ideaI've always wanted to try using the accelerometer data in iPhone apps.
Lets make sure the concepts are clear first, consider a simper situation. You have a known constant velocity `v' (no acceleration), and you want to find the displacement. Velocity is just the change in displacement over the change in time [tex]v = d/t[/tex] thus to find the distance, you multiple your velocity by your time interval: [tex]d = v \Delta t[/tex]. If your velocity is changing, this doesn't work. If your velocity was ALMOST constant, it would be pretty accurate though.... thus, lets use time intervals small enough that the velocity can be TREATED as constant. Thus the change in distance for at some particular moment in time `i,' will be: [tex] \Delta d_i = v_i \Delta t[/tex] where I'm assuming that the time interval is the same at every point in time (i.e. the phone is sampling the velocity [or acceleration or whatever] ever [tex]\Delta t[/tex] period). Thus, if the distance we've gone so far is [tex]x_i[/tex], and we want to find the distance at the next instant in time, [tex]x_{i+1} = x_i + \Delta x[/tex], we simply do: [tex] x_{i+1} = x_i + v_i \Delta t[/tex]. No problem. Now in your case, the velocity isn't constant, so we have to do the exact same thing with the velocity first, then apply it to the displacement: [tex]v_{i+1} = v_i + a_i \Delta t [/tex] and combine that with the above. Okay, end result for your application, using Euler's method (which I have been describing): your code might look something like this (note: i don't actually know what any of the iPhone accelerometer objects or methods are called):
Let me know if anything is unclear. 



#8
Dec510, 04:54 PM

P: 4

Thanks zhermes.
In iPhone we can set an timer and call the getAcceleration method so we can decide what deltaT should be. I also came to know that the iPhone accelerometer is not that good and it has lot of spikes. I havnt started this app yet., but I will work on this and update you. It might take sometime for me to understand this and I am moving to a new apt so it might take more. I will try it out and surely update you on this. Thank you so much for the help..... 



#9
Dec510, 05:05 PM

P: 1,262

Interesting... cool.
Happy to help asprsaiI'd really like to hear how it goes! 


Register to reply 
Related Discussions  
How to calculate the time and distance needed to heat an object  Classical Physics  6  
Given mass, distance, and time, calculate power  Introductory Physics Homework  4  
Calculate distance given accleration, initial & final speed  Introductory Physics Homework  1  
Dark Energy, Distance to Galaxies and Distance in time.  Cosmology  3 