224 lines
5.7 KiB
Matlab
224 lines
5.7 KiB
Matlab
function hf = new_Dunch_Mode_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)-6.31041666666667)/2 (ScrSz(4)-4.66666666666667)/2 6.311041666666667 4.66666666666667 ], ...
|
||
'Tag','Fig1', ...
|
||
'ToolBar','none');
|
||
|
||
|
||
|
||
if(ID_STAG==1)
|
||
%**********************************************************
|
||
drmao8(-0.1,0.4,1.0,0.4,60,'k-',0.2,1);
|
||
drmao8(0.19,1.84,0.19,8.0,35,'k-',0.2,1);
|
||
drmao8(0.35,1.0,1.0,1.0,30,'k-',0.2,1);
|
||
%----------------------
|
||
xxx0=0.19;
|
||
xxx1=0.35;
|
||
hgs = 15;
|
||
|
||
clear xxx;
|
||
clear yyy;
|
||
for ii=1:hgs
|
||
|
||
xxx(ii)=xxx0+(ii-1)*(xxx1-xxx0)/hgs;
|
||
yyy(ii)=0.35/xxx(ii);
|
||
xxx(ii+1)=xxx0+ii*(xxx1-xxx0)/hgs;
|
||
yyy(ii+1)=0.35/xxx(ii+1);
|
||
drmao8(xxx(ii),yyy(ii),xxx(ii+1),yyy(ii+1),1,'k-',0.2,-1);
|
||
end
|
||
|
||
%------------------------
|
||
drmao8(0.02,2.5,0.02,8.0,30,'k-',0.2,1);
|
||
%----------------------
|
||
yyy0=0.4;
|
||
yyy1=2.5;
|
||
hgs=15;
|
||
|
||
clear xxx;
|
||
clear yyy;
|
||
for ii=1:hgs
|
||
|
||
yyy(ii)=yyy0+(ii-1)*(yyy1-yyy0)/hgs;
|
||
xxx(ii)=0.05/yyy(ii);
|
||
yyy(ii+1)=yyy0+ii*(yyy1-yyy0)/hgs;
|
||
xxx(ii+1)=0.05/yyy(ii+1);
|
||
drmao8(xxx(ii),yyy(ii),xxx(ii+1),yyy(ii+1),1,'k-',0.2,1);
|
||
if(ii==2|ii==1)
|
||
drmao8(xxx(ii),yyy(ii),xxx(ii+1),yyy(ii+1),2,'k-',0.2,1);
|
||
end
|
||
end
|
||
%**********************************************************
|
||
end
|
||
|
||
if(ID_STAG==3)
|
||
%**********************************************************
|
||
drmao8(-0.1,0.4,0.7,0.4,60,'k-',0.15,1);
|
||
drmao8(0.08,1.84,0.08,6.0,30,'k-',0.15,1);
|
||
drmao8(0.15,1.0,0.7,1.0,40,'k-',0.15,1);
|
||
%----------------------
|
||
xxx0=0.08;
|
||
xxx1=0.15;
|
||
hgs = 11;
|
||
|
||
clear xxx;
|
||
clear yyy;
|
||
for ii=1:hgs
|
||
|
||
xxx(ii)=xxx0+(ii-1)*(xxx1-xxx0)/hgs;
|
||
yyy(ii)=0.15/xxx(ii);
|
||
xxx(ii+1)=xxx0+ii*(xxx1-xxx0)/hgs;
|
||
yyy(ii+1)=0.15/xxx(ii+1);
|
||
drmao8(xxx(ii),yyy(ii),xxx(ii+1),yyy(ii+1),1,'k-',0.15,-1);
|
||
end
|
||
|
||
%------------------------
|
||
drmao8(0.02,2.5,0.02,6.0,20,'k-',0.15,1);
|
||
%----------------------
|
||
yyy0=0.4;
|
||
yyy1=2.5;
|
||
|
||
hgs=18;
|
||
|
||
clear xxx;
|
||
clear yyy;
|
||
for ii=1:hgs
|
||
|
||
yyy(ii)=yyy0+(ii-1)*(yyy1-yyy0)/hgs;
|
||
xxx(ii)=0.05/yyy(ii);
|
||
yyy(ii+1)=yyy0+ii*(yyy1-yyy0)/hgs;
|
||
xxx(ii+1)=0.05/yyy(ii+1);
|
||
drmao8(xxx(ii),yyy(ii),xxx(ii+1),yyy(ii+1),1,'k-',0.15,1);
|
||
if(ii==2|ii==1)
|
||
drmao8(xxx(ii),yyy(ii),xxx(ii+1),yyy(ii+1),2,'k-',0.15,1);
|
||
end
|
||
end
|
||
|
||
%**********************************************************
|
||
end
|
||
|
||
if(ID_STAG==2)
|
||
%**********************************************************
|
||
drmao8(-0.1,0.4,1.0,0.4,60,'k-',0.2,1);
|
||
drmao8(0.08,1.875,0.08,8.0,30,'k-',0.2,1);
|
||
%----------------------
|
||
x0=0.08;
|
||
x1=0.375;
|
||
hgs=22;
|
||
|
||
for ii=1:hgs
|
||
|
||
xxx(ii)=x0+(ii-1)*(x1-x0)/hgs;
|
||
yyy(ii)=0.15/xxx(ii);
|
||
xxx(ii+1)=x0+ii*(x1-x0)/hgs;
|
||
yyy(ii+1)=0.15/xxx(ii+1);
|
||
drmao8(xxx(ii),yyy(ii),xxx(ii+1),yyy(ii+1),1,'k-',0.2,-1);
|
||
if(ii==2|ii==1)
|
||
drmao8(xxx(ii),yyy(ii),xxx(ii+1),yyy(ii+1),2,'k-',0.2,-1);
|
||
end
|
||
end
|
||
|
||
%------------------------
|
||
drmao8(0.02,2.5,0.02,8.0,28,'k-',0.2,1);
|
||
%----------------------
|
||
y0=0.4;
|
||
y1=2.5;
|
||
|
||
hgs=12;
|
||
|
||
for ii=1:hgs
|
||
|
||
yyy(ii)=y0+(ii-1)*(y1-y0)/hgs;
|
||
xxx(ii)=0.05/yyy(ii);
|
||
yyy(ii+1)=y0+ii*(y1-y0)/hgs;
|
||
xxx(ii+1)=0.05/yyy(ii+1);
|
||
drmao8(xxx(ii),yyy(ii),xxx(ii+1),yyy(ii+1),1,'k-',0.2,1);
|
||
if(ii==2|ii==1)
|
||
drmao8(xxx(ii),yyy(ii),xxx(ii+1),yyy(ii+1),2,'k-',0.2,1);
|
||
end
|
||
end
|
||
%**********************************************************
|
||
end
|
||
|
||
end
|
||
|
||
function lg = new_legend(figh, position)
|
||
|
||
if nargin<2
|
||
position = [0.7113 0.7937 0.1980 0.1200];
|
||
end
|
||
lg = axes('Parent',figh, ...
|
||
'Units','normalized',...
|
||
'ButtonDownFcn','moveaxis', ...
|
||
'box','on',...
|
||
'CameraUpVector',[0 1 0], ...
|
||
'Color',[1 1 1], ...
|
||
'DrawMode','fast', ...
|
||
'Position', position, ...
|
||
'Tag','Axes1', ...
|
||
'XTick',[],...
|
||
'YTick',[],...
|
||
'XColor',[0 0 0], ...
|
||
'YColor',[0 0 0], ...
|
||
'ZColor',[0 0 0]);
|
||
|
||
end
|
||
|
||
|
||
function yy=drmao8(x1,y1,x2,y2,gs,s,h,der)
|
||
|
||
if((x2-x1)~=0)
|
||
x=x1:(x2-x1)/gs:x2;
|
||
end
|
||
|
||
if((x2-x1)==0)
|
||
for i=1:gs+1
|
||
x(i)=x1;
|
||
end
|
||
end
|
||
|
||
if((y2-y1)~=0)
|
||
y=y1:(y2-y1)/gs:y2;
|
||
end
|
||
|
||
if((y2-y1)==0)
|
||
for i=1:gs+1
|
||
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)
|
||
xp=x(i)-0.7/6*h*sin(yy);
|
||
if(y2<y1)
|
||
xp=x(i)+0.7/6*h*sin(yy);
|
||
end
|
||
yp=y(i)-h*cos(yy);
|
||
tl02=plot([xp,x(i)],[yp,y(i)],'k-');
|
||
set(tl02,'Linewidth',1);
|
||
end
|
||
|
||
end
|
||
|
||
|
||
|