global gm mkr ro0 rox cs;
c=0.47;rk=1.;
p=100000.;mu=29;
rg=8314.;t=300.;
mk=20000;mkr=6371.0; 
gm=3.986004418e+5;

s=pi*rk*rk;
ro0=p*mu/(rg*t);
cs=c*s*0.5*1000./mk;
rox=mu*9814./(rg*t);

y0=[0.;6471.0;7.9;0.];
%y0=[0.;6571.0;7.7885;0.];

options = odeset('RelTol',1e-9,'AbsTol',1e-9,'MaxStep',10.,'InitialStep',5.,'OutputFcn',@mytest);
[t,y]=ode45(@keplerf,[0,50000],y0,options);

phi=0:1:360;
xx=sind(phi);
yy=cosd(phi);
xlabel('x coord');
ylabel('y coord');

plot(xx,yy,'g')
hold on
plot(y(:,1)./mkr,y(:,2)./mkr,'r')


