0

I am trying to calculate an intercepting vector based on Velocity Location and time of two objects.

I found an post covering my problem but was left over with some technical questions i could not ask because my reputation is below 50.

Calculating Intercepting Vector

The answer marked as best goes over the process of how to solve my problem, however when i tried to calculate myself, i could not understand how the vectors of position and velocity are converted to a real number.

genpfault
  • 51,148
  • 11
  • 85
  • 139
Schrottiy
  • 35
  • 5
  • Hi, what do you mean with "converted to a real number"? Position and velocity are vectors: what you get out of the algebra (I am referring to the accepted answer to the post you linked to) is a way of computing the coordinates of the point at which the interceptor meets the target. – picchiolu Jan 11 '23 at 02:19
  • Yes but the coordinates the inceptor meets the target is calculated with the time until the inceptor meets the target. and to calculate the time there is an quadratic equation used with vectors, i don't know how to handle these vectors when trying to get t1 and t2 via ABC formula – Schrottiy Jan 11 '23 at 02:33
  • Indeed, there are vectors, but they are either squared (so, you get their magnitude) or involved in dot products (which return a scalar): what you are left with is a standard quadratic equation in the variable ```t```. Have you computed the squares and the dot products? – picchiolu Jan 11 '23 at 02:38
  • oh i tought i had to square each vector component, instead of getting thier mangnitude, because ther are no || x || magnitude lines. – Schrottiy Jan 11 '23 at 02:49

1 Answers1

1

Using the data provided here for the positions and speeds of the target and the interceptor, the solving equation is the following:

enter image description here

plugging in the numbers, the coefficients of the quadratic equation in t are:

s_t = [120, 40]; v_t = [5,2]; s_i = [80, 80]; v_i = 10;
a = dot(v_t, v_t)-10^2
b = 2*dot((s_t - s_i),v_t)
c = dot(s_t - s_i, s_t - s_i)

Solving for t yields:

delta = sqrt(b^2-4*a*c)
t1 = (b + sqrt(b^2 - 4*a*c))/(2*a)
t2 = (b - sqrt(b^2 - 4*a*c))/(2*a)

With the data at hand, t1 turns out to be negative, and can be discarded.

picchiolu
  • 1,120
  • 5
  • 20