比例导引+弹道成型导引源程序

来源:互联网 发布:多开程序软件 编辑:程序博客网 时间:2024/04/29 18:15

参考文献:

《几种增大空地导弹落角的制导方式比较》

《Strategic and tactical missile guidance》

clearclc%-----------导弹参数---------V_m=260;%飞行速度 X_m=0;  Y_m=1000; %初始飞行高度  theta_m=0*pi/180; %弹道倾角 %----------目标参数---------V_t=0; %静止目标X_t=5000;Y_t=0;theta_t=0;dtheta_t=0;n_t=0;A_t=0;R=sqrt((X_m-X_t)^2+(Y_m-Y_t)^2);q=atan((Y_t-Y_m)/(X_t-X_m));dR=((X_m-X_t)*(V_m*cos(theta_m)-V_t*cos(theta_t))+(Y_m-Y_t)*(V_m*sin(theta_m)-V_t*sin(theta_t)))/sqrt((X_m-X_t)^2+(Y_m-Y_t)^2);dq=((X_t-X_m)*(V_t*sin(theta_t)-V_m*sin(theta_m))-(Y_t-Y_m)*(V_t*cos(theta_t)-V_m*cos(theta_m)))/((X_m-X_t)^2+(Y_m-Y_t)^2);n_m=-q+theta_m;c=3;qf=-90*pi/180;g=9.8;n=1;t=0;dt=0.01;while (dR<0)    if R>500        t_go=R/abs(dR);        Am=4*dq*abs(dR)+2*abs(dR)*(q-qf)/t_go+g*cos(theta_m); %考虑重力补偿因素的弹道成型制导律    else        Am=4*dq*abs(dR); %比例导引    end    dtheta_m=Am/V_m; %纵向通道:弹道倾角变化函数    theta_m=theta_m+dtheta_m*dt;    %----------------------------计算坐标----------------------------    X_m=X_m+V_m*cos(theta_m)*dt;    Y_m=Y_m+V_m*sin(theta_m)*dt;        alpha=Am/g/(0.3*g);    n_m=-q+theta_m;     R=sqrt((X_m-X_t)^2+(Y_m-Y_t)^2);    q=atan((Y_t-Y_m)/(X_t-X_m));    dR=((X_m-X_t)*(V_m*cos(theta_m)-V_t*cos(theta_t))+(Y_m-Y_t)*(V_m*sin(theta_m)-V_t*sin(theta_t)))/sqrt((X_m-X_t)^2+(Y_m-Y_t)^2);    dq=((X_t-X_m)*(V_t*sin(theta_t)-V_m*sin(theta_m))-(Y_t-Y_m)*(V_t*cos(theta_t)-V_m*cos(theta_m)))/((X_m-X_t)^2+(Y_m-Y_t)^2);            theta_m_store(n)=theta_m;  %保存弹道倾角     Am_store(n)=Am;   %保存纵向过载    alpha_store(n)=alpha;%保存攻角    P_m_store(:,n)=[X_m;Y_m]; %保存拦截弹坐标    n=n+1;    t=t+dt;enddisp('脱靶量为(m):')Rdisp('飞行时间为(s):')tfigure(1)plot(P_m_store(1,:),P_m_store(2,:),X_t,Y_t,'r+')hold onxlabel('X/m')ylabel('Y/m')figure(2)plot((1:n-1)*dt,Am_store/g)hold onxlabel('time/s')ylabel('Acceleration/g')title('加速度')figure(3)plot((1:n-1)*dt,theta_m_store*180/pi)hold onxlabel('time/s')ylabel('\theta_m/°')title('弹道倾角')figure(4)plot((1:n-1)*dt,alpha_store)hold onxlabel('time/s')ylabel('\alpha/°')title('攻角')


0 0
原创粉丝点击