Determine point of interception

조회 수: 8 (최근 30일)
Rose
Rose 2020년 3월 12일
편집: John D'Errico 2020년 3월 12일
Hi Guys,
I have this problem in which I have a target moving which I want to intercept. From its initial position St (x,y,z) it moves with constant velocity Vt (Vx,Vy,Vz). I want to intersect the target with a chaser, which is located at Sc(x,y,z). It is initially not moving, but when the intercept course is determined it will move at 150 m/s.
At any point in time I want to calculate the point of interception, hence to determine the x,y,z coordinates of intercept, and the time to this interception (to later determine the vx,vy,vz components of the 150m/s velocity). To do so, I used vector relations, as shown in the image attached. I reasoned that the vector from the chaser to the interception point is equal to the difference between the x,y,z coordinates of he target and the chaser (St-Sc) plus Vt*time.
I used the following code to determine the time of intercept and the corresponding coordinates of the interception point.
However, the results that I get do not add up. I get a time to intercept, and some x,y,z of the interception point.
However, multiplying the time to intercept t_ip with the velocity of the chaser (150m/s) does not result in the distance sqrt((x_ip-x_c)^2+(y_ip-y_c)^2+(z_ip-z_c)^2), which it should...
Can anyone find the mistake in my code or in my assumptions?
s_t=[x,y,z] %m
v_t=[vx,vy,vz] %m/s
s_c=[x_c,y_c,z_c]; %m/s
v_c=150 %m/s
a=(v_c.^2-v_t.^2); % Using simple geometry, define a,b,c used to solve quadratic equations at^2+bt+c=0
b=(-2*(s_o-s_c).*v_t);
c=-1*(s_o-s_c).^2;
t_ip(1)=(-b+sqrt((b.^2-4.*a.*c)))/(2.*a); % Solve the quadratic equation for t_intercept
t_ip(2)=(-b-sqrt((b.^2-4.*a.*c)))/(2.*a); % Solve the quadratic equation for t_intercept
t_ip=t_ic(t_ip>0); % Negative t indicates that intercept is in the past, which is not usefull hence remove from the list
t_ip_r=isreal(t_ip); % T with imaginary parts indicate that intercept is not possible
t_ip=t_ic(t_ip_r); % Limit the list with intercept times to only real numbers
t_ip=min(t_ip); % If more than 1 time remains, multiple intercepts are possible, select the lowest time/earliest intercept moment
x_ip=x+vx*t_ip; % Calculate x of intercept point
y_ip=y+vy*t_ip; % Calculate y of intercept point
z_ip=z+vz*t_ip; % Calculate z of intercept point

답변 (1개)

John D'Errico
John D'Errico 2020년 3월 12일
편집: John D'Errico 2020년 3월 12일
It looks like you have made an error in the mathematics.
Without deriving your equations from scratch, I note that you use a vector form for the target velocity.
v_t=[vx,vy,vz] %m/s
In fact, the true velocity of the target is the Euclidean norm of that vector, thus sqrt(vx^2 + vy^2 + vz^2). Yes, you can break it down in to vector components, thus velocities in x,y,z as you have done, but the overall velocity is the norm of the vector.
Likewise, you write these lines:
v_c=150 %m/s
a=(v_c.^2-v_t.^2);
So v_c is the chaser velocity, which is a SCALAR variable, not a vector. When you add or subtract a scalar and a vector, the result is to implicitly expand the scalar to the same size as the vector. What then is a? I'll expand it, to show a as the VECTOR:
a = [150^2 - vx^2, 150^2 - vy^2, 150^2 - vz^2]
So what you did is implicitly assume the chase vehicle is moving with a velocity vector of [150 150 150], thus a velocity of 150 m/s in EACH of x,y, and z. In effect, the chase vehicle is moving with a true velocity of 259.8 m/s, NOT 150 m/s.
norm([150 150 150])
ans =
259.807621135332
And that is a fundamental problem in your mathematics, though there may be other problems. I won't bother to rederive your equations, because it is clear this is an error. I'll let you do the mathematics to fix the problem, since this is your task to do in the end.

카테고리

Help CenterFile Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by