Help calculating distance between two moving objects

  • Thread starter CraigDNeo
  • Start date
In summary, the conversation discusses the process of calculating the distance between two moving objects at a given point, when the objects are starting from rest at the same time and moving in a straight line. The conversation includes discussions on calculating average velocity and acceleration, determining a reference point, and accounting for non-constant acceleration in real-life scenarios. The suggested method involves obtaining more data points and assuming linear acceleration in time to approximate the distance between the two objects.
  • #36
I put these into the linear solver for a
60 foot in 1.083s,
330 foot in 3.112s
660 foot in 4.83s

60 = A*1.17 + B*1.21 + C*1.31
330 = A*9.67 + B*30.08 + C*93.55
660 = A*23.33 + B*112.68 + C*544.23

and I get this in return
{ a = 63.82661360552823, b = -13.508610964551533, c = 1.273497212701 }

Now taking these values an finding the distance this car is as opposed to the other car,

for example, the other car's (CAR2) time at the 330 was 2.7038

So, my confusion currently, is calculating the other cars distance, do I still do the following:

X(t) = (A + B + C * 2.7038) * (2.7038)^2/2?

Then I would get 330 -X(t) = distances CAR1 is ahead or behind CAR2.
 
Physics news on Phys.org
  • #37
CraigDNeo said:
I put these into the linear solver for a
60 foot in 1.083s,
330 foot in 3.112s
660 foot in 4.83s

60 = A*1.17 + B*1.21 + C*1.31
330 = A*9.67 + B*30.08 + C*93.55
660 = A*23.33 + B*112.68 + C*544.23

and I get this in return
{ a = 63.82661360552823, b = -13.508610964551533, c = 1.273497212701 }

Now taking these values an finding the distance this car is as opposed to the other car,

for example, the other car's (CAR2) time at the 330 was 2.7038

So, my confusion currently, is calculating the other cars distance, do I still do the following:

X(t) = (A + B + C * 2.7038) * (2.7038)^2/2?

Then I would get 330 -X(t) = distances CAR1 is ahead or behind CAR2.

X(t)=At^2+Bt^3+Ct^4 is the form of the equation for the position of any car. For car 1 we say X1(t)=A1 t^2+B1 t^3 + C1 t^4 where X1(t) is the position of car 1 at any time t, A1, B1, C1 are the ABC's we calculate for car 1 by substituting car 1's distances (60,330,66) and car 1's times into that equation. You have just done this for car 1.

For car 2, we have X2(t)=A2 t^2+B2 t^3 + C2 t^4 where X2(t) is the position of car 2 at any time t, A2, B2, C2 are the ABC's we calculate for car 2 by substituting car 2's distances (60,330,66) and car 2's times into that equation. You have to do the same thing for car 2.

Now we calculate how far car 2 is ahead of car 1 at time t by calculating X2(t)-X1(t). I see you said "Then I would get 330 -X(t) = distances CAR1 is ahead or behind CAR2." You are being not very clear. X2(t)-X1(t) is how far car 2 is ahead of car 1 at time t. 330-X1(t) is the distance car 2 is ahead of car 1, but at what time? - at the time that car 2 crossed the 330 mark, and you have to be sure that this is the time that you substitute into X1(t).
 
Last edited:
  • #38
Ok, now I think I understand. If below is CAR1
60 foot in 1.083s,
330 foot in 3.112s
660 foot in 4.83s

60 = A*1.17 + B*1.21 + C*1.31
330 = A*9.67 + B*30.08 + C*93.55
660 = A*23.33 + B*112.68 + C*544.23

and I get this in return
{ a = 63.82661360552823, b = -13.508610964551533, c = 1.273497212701 }

and we know that CAR2 was at the 330 in 2.7038 so this would be X2(2.038)

then X(t) = (At^2 + Bt^3 + Ct^4) so this would then be

X1(t) = (63.83 * (2.7038)^2 + (-13.51) * (2.7038)^3 + 1.27 * (2.7038)^4, so this would tell me the distance CAR1 traveled in CAR2's 330 foot time. so then I would be able to do
X2(t) - X1(t), and X2(2.7038) we know for CAR2 is 330 feet, the X1(2.7038) is what we calculated, which comes to 304.06, so CAR2 (330) - CAR1 (304) = @25.94 feet.I am still working on putting the velocity at the 660 in for the fourth equation.

Thanks again so much for your time and feedback, I have truly learned so much from this thread, and it is greatly appreciated.
 
  • #39
CraigDNeo said:
Thanks again so much for your time and feedback, I have truly learned so much from this thread, and it is greatly appreciated.

Yes - you are doing it right.

You are using 3 constants for 3 measurements, 4 for 4 measurements, etc. The next thing you might want to learn is that all of your measurements have errors in them. If you had 100 measurements, you probably would not want to use 100 constants, because the X(t) would be going through every point, trying to get not only the X(t) but all the little errors too. You don't need an X(T) that is that exact. So you might have 100 measurements, but you only need maybe 6 constants to get the X(t) so that it doesn't bother going through all the errors too. Just remember that there is a way to do that, called "least squares curve fitting". You probably don't need to learn this more complicated method if you have just a few measurements, but if you ever do have a lot of measurements, it might be the next thing you want to learn.
 

Similar threads

Back
Top