Calculating if two objects will come within a given distance

Click For Summary

Discussion Overview

The discussion revolves around calculating whether two objects with given initial positions and velocity vectors will come within a specified distance of each other, and determining the point of closest approach. The scope includes mathematical reasoning and technical exploration related to motion in a two-dimensional plane.

Discussion Character

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

Main Points Raised

  • One participant describes their approach using linear functions to express the positions of the objects over time and proposes taking the derivative to find the closest approach.
  • Another participant questions the initial setup regarding velocities, suggesting a need for clarification.
  • A participant mentions developing software for quadcopters and emphasizes the need for a solution focused on two-dimensional calculations.
  • One participant provides a complex mathematical expression derived from their calculations and discusses solving for the time of closest approach, while expressing uncertainty about the efficiency of their method.
  • Another participant suggests an alternative approach by considering the motion from the perspective of one object, proposing to analyze the distance between the two objects as one moves at a reverse velocity.
  • A later reply agrees with the idea of switching to a rest frame to simplify the problem, indicating a potential consensus on this alternative approach.

Areas of Agreement / Disagreement

Participants express various methods and approaches to the problem, with some suggesting alternative perspectives. There is no clear consensus on the best method, and multiple competing views remain regarding the most effective way to calculate the closest approach.

Contextual Notes

Some participants' approaches depend on specific assumptions about the motion and initial conditions, and the discussion includes unresolved mathematical steps and complexities related to extending the problem into three dimensions.

ferret_guy
Messages
18
Reaction score
0
I am having trouble calculating if two objects with initial positions and velocity vectors will come within a given distance of one another and if so calculating where the closest approach is. Can anyone point me in the right direction?

My initial thoughts are that both are linear functions where:
d=tv
y=tv(cos \theta )+y_{i}
x=tv(sin \theta)x_{i}
The distance is:
d = \sqrt {( {x_1 - x_2 })^2 +( {y_1 - y_2 })^2}
Expanding to:
d = \sqrt {( {(tv_{2}sin \theta_{2}+x_{2_{i}})- (tv_{1}sin \theta_{1}+x_{1_{i}}) })^2 +( {(tv_{2}cos \theta_{2}+y_{2_{i}})- (tv_{1}cos \theta_{1}+y_{1_{i}}) })^2 }
My next thought is to take the derivative with respect to time to find the turning point of the graph and thus the closest approach to one another. If the turning point is when t is negative then t0 is the closest approach and if it is greater than t0 then the value is the closest approach
 
Last edited:
Physics news on Phys.org
explain your problem with proper velocities?
 
I am writung some software for quadcopters and I need to be able to see if they will come within some distance of one another I think the best solution is to just find the closet approach. Only need a 2d solution as they are all on the same plane
 
After using wolfram mathematica I have found that the differential is:
\left(\frac{2 \left(v_2 \sin \left(\theta _2\right)-v_1 \sin \left(\theta _1\right)\right) \left(-x_{1_i}+x_{2_i}-t v_1 \sin \left(\theta _1\right)+t v_2 \sin \left(\theta _2\right)\right)+2 \left(v_2 \cos \left(\theta _2\right)-v_1 \cos \left(\theta _1\right)\right) \left(-y_{1_i}+y_{2_i}-t v_1 \cos \left(\theta _1\right)+t v_2 \cos \left(\theta _2\right)\right)}{2 \sqrt{\left(-x_{1_i}+x_{2_i}-t v_1 \sin \left(\theta _1\right)+t v_2 \sin \left(\theta _2\right)\right){}^2+\left(-y_{1_i}+y_{2_i}-t v_1 \cos \left(\theta _1\right)+t v_2 \cos \left(\theta _2\right)\right){}^2}}\right)

and solving for when d/dt =0 gives:
\frac{v_1 \left(-\sin \left(\theta _1\right)\right) x_{1_i}+v_2 \sin \left(\theta _2\right) x_{1_i}+v_1 \sin \left(\theta _1\right) x_{2_i}-v_2 \sin \left(\theta _2\right) x_{2_i}-v_1 \cos \left(\theta _1\right) y_{1_i}+v_2 \cos \left(\theta _2\right) y_{1_i}+v_1 \cos \left(\theta _1\right) y_{2_i}-v_2 \cos \left(\theta _2\right) y_{2_i}}{v_1^2 \sin ^2\left(\theta _1\right)+v_2^2 \sin ^2\left(\theta _2\right)-2 v_2 v_1 \sin \left(\theta _1\right) \sin \left(\theta _2\right)+v_1^2 \cos ^2\left(\theta _1\right)+v_2^2 \cos ^2\left(\theta _2\right)-2 v_2 v_1 \cos \left(\theta _1\right) \cos \left(\theta _2\right)}

and knowing that it only equals zero in one location I can solve for that point in time to find the closest distance and position of closest approach. Seems like there could be a better way, and if done in 3d would give even more ridiculous results. Is there a better way?
 
ferret_guy said:
I am having trouble calculating if two objects with initial positions and velocity vectors will come within a given distance of one another and if so calculating where the closest approach is. Can anyone point me in the right direction?

well suppose in the plane there are two vehicles each located by a position and velocity vector
say at r(1) and r(2) there velocity being v(1) and v(2) at time t=t(1);
i do not know but if you are sitting on one and observing the closest approach - why don't you apply a reverse velocity to your self as well as the other one- so you go to rest and the body (other) has a net velocity v(1) + v(2) a vector addition.
the distance between 1 and 2 is r= r(1)- r(2) a vector addition at t=t(1) initial time.
so if you analyse the motion of 2 with respect to 1 and minimize the distance as time advances ,i think you can get a way out...how do you feel about this approach?
 
ferret_guy said:
Seems like there could be a better way
As drvrm said, choosing the rest frame of one of the objects reduces the mathematical complexity of such problems.
 

Similar threads

Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K