Help calculating distance between two moving objects

  • Context: Undergrad 
  • Thread starter Thread starter CraigDNeo
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around calculating the distance between two moving race cars at specific points, given their velocities and times at various distances. Participants explore methods for determining average velocity, acceleration, and distance, while addressing the complexities introduced by non-constant acceleration.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant outlines their calculations for average velocity and acceleration for two objects, seeking guidance on how to determine the distance between them.
  • Another participant notes that the assumption of constant acceleration is invalid due to the provided time values, suggesting that kinematic equations for constant acceleration cannot be applied.
  • A suggestion is made to collect more data points to better model the motion of the cars, as the current data may not be sufficient for accurate calculations.
  • Some participants propose using a linear approximation of acceleration over time, while others suggest that a more complex model may be necessary, such as a cubic relationship based on calculus.
  • There is discussion about the implications of air drag and traction on the cars' acceleration, indicating that real-world conditions complicate the calculations.
  • Participants express uncertainty about the validity of their calculations and seek clarification on how to derive coefficients for their models.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach to calculate the distance between the two cars. There are competing views on whether to assume constant acceleration or to model acceleration as varying over time.

Contextual Notes

Limitations include the reliance on limited data points and the assumption of linearity in acceleration, which may not hold true in real-world scenarios. The discussion highlights the complexity of accurately modeling the motion of the cars given the available information.

  • #31
And yes we get times at those points too.
 
Physics news on Phys.org
  • #32
CraigDNeo said:
And yes we get times at those points too.

So you can get x=[60,330, 660, 1000,1320] - a list of distances and t=[t[1],t[2],t[3],t[4],t[5]] a list of times when the car passed those points.

In the original case, we only had two distances, [60,330] and two times [t[1],t[2]] and we basically said that x(t) is of the form x(t)= k[2]t^2+k[3]t^3 where k[2] and k[3] are constants that we want to find. I think we said k[2]=A/2 and k[3]=B/2. Now we have 5 distances, and we can say x(t)=k[2]t^2+k[3]t^3]+k[4]t^4+k[5]t^5+k[6]t^6 and we have 5 constants that we want to find. We do the same procedure to find them, only its more complicated. Sometimes its better to reduce the number of constants to 4 or 3, it depends on your data. Do you have some actual data for a car at these 5 points?
 
  • #33
Here is an example for an 1/8th mile (660). Most of the races (90%) are eighth mile. And this is three points of data, and would somewhat less confusing to start with for me at least. Thanks again for your interest and feedback.

Car 1
60 feet 1.3389s
330 feet3.909s
660 feet 6.1023s
660 MPH 112.36

Car2
60 feet 1.4216s
330 feet 3.9436
660 feet 6.0951s
660 MPH 114.36

we do not get MPH for 60 or 330, only for 660, sometimes 1000 and if they are doing quarter mile, then we get the MPH at 1320.
 
  • #34
so would we do something like this then

X = At^3 + Bt2^2 + C*t + D for 0, 60, 330 and 660. Then solve for A, B, C and D. My other question is that when solving for these unknowns, which data point would you start with?
 
  • #35
CraigDNeo said:
so would we do something like this then

X = At^3 + Bt2^2 + C*t + D for 0, 60, 330 and 660. Then solve for A, B, C and D. My other question is that when solving for these unknowns, which data point would you start with?

But we know that when t=0, X=0 so D=0. You can calculate the velocity by taking the time derivative of X, so V=3At^2+Bt/2+C. But we know that the velocity is zero at t=0, so that means C=0. (See how knowing the velocity helps?)

The general way we are doing it is this: (lets use A0, A1, A2 ... as our constants)

X(t) = A0 + A1 t + A2 t^2 + A3 t^3 +A4 t^4 + ... etc

where we carry out the sum as far as we want. Now we know that A0=0 and A1=0 because the position and velocity at t=0 are zero. That takes care of X=0. Now we have points at X=60, 330, and 660. That will give us three equations, and that means we can't solve things unless we have three or less unknowns. So let's use three unknowns.

X(t) = A2 t^2 + A3 t^3 + A4 t^4

Thats the equation we want to use. Make three equations using X=60, 330, and 660 and the times that you have for each of those three positions. Then you will have 3 equations and you can solve them for A2, A3, and A4.

It doesn't matter which one you solve for first. You can solve these by hand with a calculator, but its even better if you have a computer program that solves linear equations. There is a pretty good one at http://wims.unice.fr/wims/en_tool~linear~linsolver.en.html

Just type in something like 4=2*A2+3*A3 on the first line, 6=3*A2+7*A3 on the second line, hit the solve button, and it will give you the values for A2 and A3. Type in your 3 equations and it will solve for A2, A3, and A4.

If you want to use velocity, at 660, then you have another equation, and you can put in another constant. You can have

X(t)=A2 t^2+A3 t^3+A4 t^4+A5 t^5

the velocity is

V(t) = 2 A2 t +3 A3 t^2 + 4 A4 t^3 + 5 A5 t^4

Just put in your velocity at 660, and the time at 660, and use this as your fourth equation, then put the four equations into the solver and it will solve for A2, A3, A4 and A5.
 
Last edited:
  • #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.
 
  • #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

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 9 ·
Replies
9
Views
1K
  • · Replies 47 ·
2
Replies
47
Views
5K
  • · Replies 22 ·
Replies
22
Views
2K
  • · Replies 128 ·
5
Replies
128
Views
11K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 39 ·
2
Replies
39
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K