function [h,finish,dir]= mycheck(t,y)
global r_maa param2 c_aero m_keha
distance=sqrt(y(1)^2+y(2)^2)-r_maa;

h=[distance,distance-10.];
finish=[1,0];
dir=[0,0];


if distance < 5.
r_keha=20.;
s_keha=pi*r_keha^2;
param2=c_aero*s_keha*500./m_keha;
end

end


