function [w,anglew]=getparamwind(Hz)
global Vw azimyt
if(Hz>=0 & Hz<185)
Vw=5; azimyt=260;
end
if(Hz>=185 & Hz<380)
Vw=9; azimyt=285;
end
if(Hz>=380 & Hz<668)
Vw=10; azimyt=277;
end
if(Hz>=668 & Hz<771)
Vw=11; azimyt=265;
end
if(Hz>=771 & Hz<1165)
Vw=11; azimyt=265;
end
if(Hz>=1165 & Hz<1382)
Vw=11; azimyt=268;
end
if(Hz>=1382 & Hz<1510)
Vw=11; azimyt=269;
end
if(Hz>=1510 & Hz<1934)
Vw=11; azimyt=270;
end
if(Hz>=1934 & Hz<2087)
Vw=12; azimyt=285;
end
if(Hz>=2087 & Hz<2206)
Vw=13; azimyt=291;
end
if(Hz>=2206 & Hz<2935)
Vw=11; azimyt=295;
end
if(Hz>=2935 & Hz<2957)
Vw=6; azimyt=318;
end
if(Hz>=2957 & Hz<3001)
Vw=6; azimyt=319;
end
if(Hz>=3001 & Hz<3142)
Vw=5; azimyt=320;
end
if(Hz>=3142 & Hz<3303)
Vw=4; azimyt=325;
end
if(Hz>=3303 & Hz<3423)
Vw=3; azimyt=350;
end
if(Hz>=3423 & Hz<4039)
Vw=3; azimyt=348;
end
if(Hz>=4039 & Hz<4427)
Vw=3; azimyt=340;
end
if(Hz>=4427 & Hz<4682)
Vw=3; azimyt=335;
end
if(Hz>=4682 & Hz<4776)
Vw=3; azimyt=347;
end
if(Hz>=4776 & Hz<5271)
Vw=3; azimyt=352;
end
if(Hz>=5271 & Hz<5298)
Vw=2; azimyt=16;
end
if(Hz>=5298 & Hz<5445)
Vw=2; azimyt=18;
end
if(Hz>=5445 & Hz<5606)
Vw=2; azimyt=25;
end
if(Hz>=5606 & Hz<5820)
Vw=3; azimyt=16;
end
if(Hz>=5820 & Hz<6020)
Vw=4; azimyt=5;
end
if(Hz>=6020 & Hz<6622)
Vw=5; azimyt=5;
end
if(Hz>=6622 & Hz<6855)
Vw=8; azimyt=5;
end
if(Hz>=6855 & Hz<6939)
Vw=9; azimyt=18;
end
if(Hz>=6939 & Hz<7273)
Vw=9; azimyt=23;
end
if(Hz>=7273 & Hz<7490)
Vw=10; azimyt=43;
end
if(Hz>=7490 & Hz<7531)
Vw=10; azimyt=55;
end
if(Hz>=7857 & Hz<8286)
Vw=9; azimyt=60;
end
if(Hz>=8286 & Hz<9102)
Vw=9; azimyt=35;
end
if(Hz>=9102 & Hz<9530)
Vw=11; azimyt=40;
end
if(Hz>=9530 & Hz<10060)
Vw=15; azimyt=40;
end
if(Hz>=10060)
Vw=20; azimyt=45;
end
w=Vw;
anglew=azimyt;
%---------------------------------------------------------
function varargout = edit7_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = pushbutton2_Callback(h, eventdata, handles, varargin)
cla;
global m c s sw g v0 teta ro H Vmax L anglew azimyt Vw
m=[]; c=[]; s=[]; g=[]; v0=[]; teta=[]; ro=[]; H=[]; Vmax=[]; L=[]; anglew=[]; azimyt=[]; Vw=[];
Lx=0;
Ly=0;
H=str2double(get(handles.edit1, 'String'));
m = str2double(get(handles.edit3, 'String'));
c = str2double(get(handles.edit4, 'String'));
s = str2double(get(handles.edit6, 'String'));
sw = str2double(get(handles.edit14, 'String'));
v0 = str2double(get(handles.edit2, 'String'));
angleG= str2double(get(handles.edit5, 'String'));
g = 9.81;
teta =-angleG/180*pi;
anglew=str2double(get(handles.edit7, 'String'));
kyrs=anglew/180*pi; % угол курса
[t w te ye ie ]=ODE(teta,kyrs,v0,H);
plot(w(:,1), w(:,2), 'LineWidth', 3);
grid on;
te
Lx=floor(ye(1))
Ly=floor(ye(2))
L=floor(sqrt(Lx^2+Ly^2))
Vz=abs(floor(ye(6)))
% --------------------------------------------------------------------
function varargout = edit8_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = edit9_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = edit10_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = edit11_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = edit12_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = radiobutton1_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = edit13_Callback(h, eventdata, handles, varargin)
%----------------------------------------------------------------------
function [T, W, TE, YE, IE]=ODE(teta, kyrs, v0,H)
tmax = 10000;
dt = [0 tmax];
w0=[];
w0 = [0 0 H v0*cos(teta)*sin(kyrs) v0*cos(teta)*cos(kyrs) v0*sin(teta)];
opt = odeset('Events',@ex8events,'RelTol', 1e-8, 'AbsTol', 1e-8);
[t w te ye ie ] = ode45(@jump, dt, w0, opt);%=================================решатель диффиренциальных уравнений
if te>0
tmax=floor(te);
end
dt = [0 tmax];
t=[];
w=[];
Hmax_v=[0 0];
N=0;
wan=0;
w0 = [0 0 H v0*cos(teta)*sin(kyrs) v0*cos(teta)*cos(kyrs) v0*sin(teta)];
opt = odeset('RelTol', 1e-8, 'AbsTol', 1e-8);
[t w ] = ode45(@jump, dt, w0, opt);%=================================решатель диффиренциальных уравнений
T=t;
W=w;
TE=te;
YE=ye
IE=ie;
%----------------------------------------------------
function varargout = edit14_Callback(h, eventdata, handles, varargin)
% --------------------------------------------------------------------
function varargout = pushbutton3_Callback(h, eventdata, handles, varargin)
cla;
global m c s sw g v0 teta ro H Vmax L anglew azimyt Vw
m=[]; c=[]; s=[]; g=[]; v0=[]; teta=[]; ro=[]; H=[]; Vmax=[]; L=[]; anglew=[]; azimyt=[]; Vw=[];
Lx=0;
Ly=0;
H=str2double(get(handles.edit1, 'String'));
m = str2double(get(handles.edit3, 'String'));
c = str2double(get(handles.edit4, 'String'));
s = str2double(get(handles.edit6, 'String'));
sw = str2double(get(handles.edit14, 'String'));
v0 = str2double(get(handles.edit2, 'String'));
angleG= str2double(get(handles.edit5, 'String'));
g = 9.81;
teta =-angleG/180*pi;
anglew=str2double(get(handles.edit7, 'String'));
kyrs=anglew/180*pi; % угол курса
[t w te ye ie ]=ODE(teta,kyrs,v0,H);
plot(w(:,2), w(:,3), 'LineWidth', 3);
set(gca, 'XDir', 'reverse');
grid on;
te
Lx=floor(ye(1))
Ly=floor(ye(2))
L=floor(sqrt(Lx^2+Ly^2))
Vz=abs(floor(ye(6)))
%-----------------------------------------------------------
function varargout = pushbutton4_Callback(h, eventdata, handles, varargin)
cla;
global m c s sw g v0 teta ro H Vmax L anglew azimyt Vw
m=[]; c=[]; s=[]; g=[]; v0=[]; teta=[]; ro=[]; H=[]; Vmax=[]; L=[]; anglew=[]; azimyt=[]; Vw=[];
Lx=0;
Ly=0;
H=str2double(get(handles.edit1, 'String'));
m = str2double(get(handles.edit3, 'String'));
c = str2double(get(handles.edit4, 'String'));
s = str2double(get(handles.edit6, 'String'));
sw = str2double(get(handles.edit14, 'String'));
v0 = str2double(get(handles.edit2, 'String'));
angleG= str2double(get(handles.edit5, 'String'));
g = 9.81;
teta =-angleG/180*pi;
anglew=str2double(get(handles.edit7, 'String'));
kyrs=anglew/180*pi; % угол курса
[t w te ye ie ]=ODE(teta,kyrs,v0,H);
plot(w(:,1), w(:,3), 'LineWidth', 3);
grid on;
te
Lx=floor(ye(1))
Ly=floor(ye(2))
L=floor(sqrt(Lx^2+Ly^2))
Vz=abs(floor(ye(6)))