代码拉取完成,页面将自动刷新
function [ p_f, v_f, t_f ] = get_interception_params( p_im, p_d, vr, ti, resolution)
%GET_INTERCEPTION_TRAJ 此处显示有关此函数的摘要
% 此处显示详细说明
if nargin <5
resolution = pi/180;
end
[phi_im, lambda_im, ~] = cart2polar(p_im);
[phi_d, lambda_d, ~] = cart2polar(p_d);
theta = get_azimuth(phi_im, lambda_im,phi_d, lambda_d);
M_f2c = build_M_f2c(phi_im, lambda_im, theta);
tt_in = [];
vv_c = [];
tt_out = [];
ggamma = 0:resolution:pi/2;
dd = [];
global ATMOS_HEIGHT
for gamma = ggamma
v_f = [sin(gamma) * vr, cos(gamma) * vr, 0]';
v_c = M_f2c * v_f;
vv_c = [vv_c, v_c];
t_in = ATMOS_HEIGHT / vr;
while get_h(p_im + v_c * t_in) < ATMOS_HEIGHT
t_in = t_in + 1;
end
p_f = p_im + v_c * t_in;
tt_in = [tt_in, t_in];
[d, t_out] = get_deviation(p_f, v_c, p_d);
dd = [dd, d];
tt_out = [tt_out, t_out];
end
[~, i] = min(dd);
t_in = tt_in(i);
t_out = tt_out(i);
v_f = vv_c(:,i);
p_f = p_im + v_f * t_in;
t0 = ti - (t_in + t_out);
t_f = t0 + t_in;
end
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。