پاسخ : حل معادله بیضی
هادی جان بلاخره درست شد ولی دهنو سرویس کرد حالا می دونی مشکل چیه چند تا پارامتر دیگه هم باید اضافه کنم
حال کردی اینو رسم کن حرکت ماهواره به دور زمینه
فقط یه چیز می شه اینو متحرکش کرد تو متلب
clear
clc
rmin=2;
rmax=10;
a=(rmax+rmin)/2;
b=sqrt(rmax*rmin);
e=(rmax-rmin)/(rmax+rmin);
p=a*(1-e^2);
%E%
ts1=0:1/10:2*pi+0.02;
m=3.987*(10^14);
T=2*pi*(sqrt((a^3)/m));
M=2*pi*ts1/T;
f = @(E)(M-E+e.*sin(E));
fsolve(f,1);
A = sqrt((1+e)/(1-e))* tan (ans/2);
C = atan(A);
D = 2*C;
r=p/(1+e*cos(D));
%Satellite%
ts=0:1/20:2*pi;
xs=2*rmin+a*cos(ts);
ys=b*sin(ts);
%Center%
t=0;
xo=0*cos(t);
yo=0*sin(t);
%Circle min%
tm=0:1/10:2.5*pi;
rmin=p/(1+e);
xm=rmin*cos(tm);
ym=rmin*sin(tm);
%Circle Max%
tM=0:1/10:2.5*pi;
rmax=p/(1-e);
xM=rmax*cos(tM);
yM=rmax*sin(tM);
%Satellite%
plot(xs,ys,'g*'
hold on
%Center%
plot(xo,yo,'.'
hold on
%Circle min%
plot(xm,ym,'k--'
hold on
%Circle Max%
plot(xM,yM,'m.-'
hold off
axis equal;
هادی جان بلاخره درست شد ولی دهنو سرویس کرد حالا می دونی مشکل چیه چند تا پارامتر دیگه هم باید اضافه کنم
حال کردی اینو رسم کن حرکت ماهواره به دور زمینه
فقط یه چیز می شه اینو متحرکش کرد تو متلب
clear
clc
rmin=2;
rmax=10;
a=(rmax+rmin)/2;
b=sqrt(rmax*rmin);
e=(rmax-rmin)/(rmax+rmin);
p=a*(1-e^2);
%E%
ts1=0:1/10:2*pi+0.02;
m=3.987*(10^14);
T=2*pi*(sqrt((a^3)/m));
M=2*pi*ts1/T;
f = @(E)(M-E+e.*sin(E));
fsolve(f,1);
A = sqrt((1+e)/(1-e))* tan (ans/2);
C = atan(A);
D = 2*C;
r=p/(1+e*cos(D));
%Satellite%
ts=0:1/20:2*pi;
xs=2*rmin+a*cos(ts);
ys=b*sin(ts);
%Center%
t=0;
xo=0*cos(t);
yo=0*sin(t);
%Circle min%
tm=0:1/10:2.5*pi;
rmin=p/(1+e);
xm=rmin*cos(tm);
ym=rmin*sin(tm);
%Circle Max%
tM=0:1/10:2.5*pi;
rmax=p/(1-e);
xM=rmax*cos(tM);
yM=rmax*sin(tM);
%Satellite%
plot(xs,ys,'g*'

hold on
%Center%
plot(xo,yo,'.'

hold on
%Circle min%
plot(xm,ym,'k--'

hold on
%Circle Max%
plot(xM,yM,'m.-'

hold off
axis equal;
دیدگاه