Two aircraft approaching each other.

Two aircraft approaching each other.

Postby charleslinquist » Sun Jun 10, 2018 7:55 pm

If I draw an imaginary sphere of "x" diameter around a GPS coordinate. I would like to know if a vector (also a GPS coordinate with a direction) will intersect the sphere, and if so, what is the approximate time that the sphere will be breached.

My end goal is:

If I create an imaginary sphere around a drone that I am flying, and an ADS-b signal tells me that an aircraft is approaching (I have the GPS coordinates, direction and velocity of the approaching aircraft), I would like to know if the approaching aircraft will intersect the imaginary sphere - and when.

I am making the assumption that both aircraft continue on their present course and speed.

I would like to be able to determine if an approaching airplane will get within "X" meters from my drone. I will be able to calculate the results several times a second, so I will be able to deal with either aircraft changing directions.

Is there is any equation that will provide an answer? I'll then convert that equation to Python so my on-board computer can solve the problem.
charleslinquist
 
Posts: 1
Joined: Sun Jun 10, 2018 7:37 pm
Reputation: 0

Re: Two aircraft approaching each other.

Postby shyamjayakannan » Sun Mar 15, 2026 8:51 am

Both your drone and the aircraft will have a starting point and a velocity vector to describe. Let the starting point for the drone be [tex]\vec p_1=x_1\hat i+y_1\hat j+z_1\hat k[/tex] and its velocity be [tex]\vec v_1=a_1\hat i+b_1\hat j+c_1\hat k[/tex]. Similarly, let the starting point for the aircraft be [tex]\vec p_2=x_2\hat i+y_2\hat j+z_2\hat k[/tex] and its velocity be [tex]\vec v_2=a_2\hat i+b_2\hat j+c_2\hat k[/tex]. Now, the vector representing the distance between them will be the difference between their position vectors.
So, [tex]\vec d=\vec p_2-\vec p_1+t(\vec v_2-\vec v_1)=\{x_2-x_1+t(a_2-a_1)\}\hat i+\{y_2-y_1+t(b_2-b_1)\}\hat j+\{z_2-z_1+t(c_2-c_1)\}\hat k[/tex], where [tex]t[/tex] is the time since the measurement of the positions and velocities. We are interested in the magnitude of the distance between them:
[tex]\left|\vec d\right|=\sqrt{\{x_2-x_1+t(a_2-a_1)\}^2+\{y_2-y_1+t(b_2-b_1)\}^2+\{z_2-z_1+t(c_2-c_1)\}^2}[/tex]

Now, you can equate this to whatever distance you wish to check and find out the value of [tex]t[/tex]. Note that this will result in a quadratic equation in [tex]t[/tex]. Neglect any negative root because we are only interested in [tex]t>0[/tex] (after the measurement was taken) and it is possible that there are no solutions, in which case the distance will always be greater than what you have chosen.

shyamjayakannan
 
Posts: 114
Joined: Sun Feb 02, 2025 12:23 pm
Reputation: 136


Return to Geometry - Analytic geometry, Projective geometry



Who is online

Users browsing this forum: No registered users and 1 guest