GEAkonstanty;
a=13000000
e=0.2
rp=a-a*e
v0=sqrt(GMZ*(2/rp-1/a))
n=sqrt(GMZ/a^3)
%te=3600
Mt=te*n
Et=kepler(Mt,e,10)
rtel=a*(1-e*cos(Et))
vtel=sqrt(GMZ*(2/rtel-1/a))
[t,u]=ode23(@(t,u)satellite(t,u,GMZ),[0 te], [rp 0 0 v0]); 
m=length(t)
rt23=sqrt(u(m,1)^2+u(m,3)^2)
vt23=sqrt(u(m,2)^2+u(m,4)^2)
deltar=rtel-rt23
deltav=vtel-vt23
plot(u(:,1),u(:,3))
clearvars u;
[t,u]=ode45(@(t,u)satellite(t,u,GMZ),[0 te], [rp 0 0 v0]); 
m=length(t)
rt45=sqrt(u(m,1)^2+u(m,3)^2)
vt45=sqrt(u(m,2)^2+u(m,4)^2)
deltar=rtel-rt45
deltav=vtel-vt45

 
