Files
sunny360vfe_proj/tasks/mode/new_ShortPeriod_Figure.m
2025-06-04 14:13:22 +08:00

165 lines
4.7 KiB
Matlab
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
function hf = new_ShortPeriod_Figure(ID_STAG)
STR_STAG = {'A种飞行阶段)'
'B种飞行阶段)'
'C种飞行阶段)'};
set(0,'Units','inches');
ScrSz=get(0,'ScreenSize');
hf = figure('Color',[1 1 1], ...
'FileName','', ...
'Units','inches',...
'NumberTitle','off', ...
'PaperOrientation','landscape', ...
'PaperPosition',[18 36.87222197842831 805.8897360000001 521.5311080431434], ...
'PaperType','a4letter', ...
'PaperUnits','points', ...
'Position',[ (ScrSz(3)-4.7917)/2 (ScrSz(4)-5.0938)/2 4.7917 5.0938 ], ...
'Tag','Fig1', ...
'ToolBar','none');
oxmin=1.0;
oxmax=100.0;
oymin=0.1;
oymax=100.0;
%************
if(ID_STAG==1)
%*****A种飞行阶段**************************
drlogm(1.0,sqrt(10),100.0,sqrt(1000),40,'k-',0.06,0);
drlogm(1.0,sqrt(3.6),100.0,sqrt(360),40,'k-',0.06,0);
drlogm(1.0,sqrt(0.16),100.0,sqrt(16),40,'k-',-0.06,0);
drlogm(1.0/0.28,1.0,100.0,sqrt(28),30,'k-',-0.06,0);
drlogm(1.0,1.0,1.0/0.28,1.0,12,'k-',-0.06,0);
drlogm(1.0,0.6,0.6^2/0.16,0.6,8,'k-',-0.06,0);
%******************************************
end
if(ID_STAG==3)
%*****C种飞行阶段**************************
drlogm(1.7,sqrt(10*1.7),100.0,sqrt(1000),40,'k-',0.06,0);
drlogm(2.7,sqrt(3.6*2.7),100.0,sqrt(360),40,'k-',0.06,0);
drlogm(0.6^2/0.096,0.6,100.0,sqrt(9.6),32,'k-',-0.06,0);
drlogm((0.85)^2/0.16,0.85,100.0,sqrt(16),30,'k-',-0.06,0);
drlogm(2.7,0.85,0.85^2/0.16,0.85,5,'k-',-0.06,0);
drlogm(2.7,0.85,2.7001,sqrt(3.6*2.7),7,'k-',-0.08,-1);
drlogm(1.7,0.6,0.6^2/0.096,0.6,7,'k-',-0.06,0);
drlogm(1.7,0.6,1.7001,sqrt(10.0*1.7),10,'k-',-0.08,-1);
%******************************************
end
if(ID_STAG==2)
%*******B种飞行阶段**********************
drlogm(1.0,sqrt(10*1),100.0,sqrt(10*100),40,'k-',0.06,0);
drlogm(1.0,sqrt(3.6*1),100.0,sqrt(3.6*100),40,'k-',0.06,0);
drlogm(1.0,sqrt(0.085*1),100.0,sqrt(0.085*100),40,'k-',0.06,0);
drlogm(1.0,sqrt(0.038*1),100.0,sqrt(0.038*100),40,'k-',0.06,0);
%******************************************
end
hla=plot([oxmin,oxmax],[oymax,oymax],'k-');
hlb=plot([oxmin,oxmax],[oymin,oymin],'k-');
hlc=plot([oxmin,oxmin],[oymin,oymax],'k-');
hld=plot([oxmax,oxmax],[oymin,oymax],'k-');
set(hla,'LineWidth',0.5);
set(hlb,'LineWidth',0.5);
set(hlc,'LineWidth',0.5);
set(hld,'LineWidth',0.5);
hltx06=text(10^(2+0.025),sqrt(16.0),'0.16');
hltx07=text(10^(2+0.025),sqrt(28.0),'0.28');
hltx08=text(10^(2+0.025),sqrt(360.0),'3.6');
hltx09=text(10^(2+0.025),sqrt(1000.0),'10.0');
set(hltx06,'Color',[.5 .5 .5]);
set(hltx07,'Color',[.5 .5 .5]);
set(hltx08,'Color',[.5 .5 .5]);
set(hltx09,'Color',[.5 .5 .5]);
set(hltx06,'FontName','楷体');
set(hltx06,'FontSize',9);
set(hltx07,'FontName','楷体');
set(hltx07,'FontSize',9);
set(hltx08,'FontName','楷体');
set(hltx08,'FontSize',9);
set(hltx09,'FontName','楷体');
set(hltx09,'FontSize',9);
set(gca,'XScale','log','YScale','log');
grid on;
ht = ylabel('短 周 期 频 率(rad/s');
set(ht,'FontName','楷体');
set(ht,'FontSize',10);
set(ht,'Color','b');
ht = xlabel('n_y^\alpha g/rad');
set(ht,'FontName','楷体');
set(ht,'FontSize',10);
set(ht,'Color','b');
% htt = title([' 短周期频率要求',char(STR_STAG(ID_STAG))]);
% set(htt,'FontName','楷体');
% set(htt,'FontSize',12);
% set(htt,'Color','r');
% set(htt,'Units','normalized');
% set(htt,'position',[0.4960 -0.1738 0]);
%===========================================
set(gca,'Xcolor',[.5 .5 .5]);
set(gca,'Ycolor',[.5 .5 .5]);
axis([oxmin,oxmax,oymin,oymax]);
end
function yy=drlogm(x1,y1,x2,y2,gs,s,h,der)
%drlogm(1.7,sqrt(10*1.7),100.0,sqrt(1000),40,'k-',0.06,0);
lx=log10(x1):(log10(x2)-log10(x1))/gs:log10(x2);
x=10.^lx;
if((y2-y1)~=0)
ly=log10(y1):(log10(y2)-log10(y1))/gs:log10(y2);
y=10.^ly;
end
if((y2-y1)==0)
for i=1:gs+1
ly(i)=log10(y1);
y(i)=y1;
end
end
%yy=atan((y2-y1)/(x2-x1)/360);
yy=der*45/57.3;
tl01=plot(x,y,s);
set(tl01,'Linewidth',1);
hold on
for i=1:length(x)
lxp=lx(i)-2/3*h*sin(yy);
xp=10.^lxp;
if(y2<y1)
lxp=lx(i)+2/3*h*sin(yy);
xp=10.^lxp;
end
lyp=ly(i)+h*cos(yy);
yp=10.^lyp;
tl02=plot([xp,x(i)],[yp,y(i)],'k-');
set(tl02,'Linewidth',1);
end
end