Search code examples
physicsequationquadratic

Calculate intercepting vector?


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.


Solution

  • 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.