f_xy.m

来自「对运动声目标进行航迹跟踪」· M 代码 · 共 31 行

M
31
字号
%% The subfunction is employed to solve the coordinates of moving target;
%% 2005-10-1;MDY;

function [x,y]=f_xy(bite1,bite2,x1,y1,x2,y2)

% % IP: 193 196 198;
%     bite1=90+bite1;
%     bite2=90+bite2;
%% IP: 190 195 197;
    bite1=90-bite1;
    bite2=90-bite2;
%     bite1=90+bite1;
%     bite2=90-bite2;
% %     bite1=90-bite1;
% %     bite2=90+bite2;

    K1=tan(bite1*pi/180);
    K2=tan(bite2*pi/180);
    
    if K1==K2
        x=[];y=[];
    else
        
    x=((y2-y1)+(K1*x1-K2*x2))/(K1-K2);
    y=y1+K1*(x-x1);
    
    end
          


   

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?