{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW1_2 - Problem 2 Apollo Orbit Table of Contents 1(a 1(b...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Problem 2 - Apollo Orbit Table of Contents ................................................................................................................................. 1 (a) ............................................................................................................................ 1 (b) ............................................................................................................................ 2 (c) ............................................................................................................................ 2 (d) ............................................................................................................................ 3 clear;clc; miu=1/82.45;mius=1-miu; (a) From this part, we can see the two orbits of different time span are the same. So we can say the period T=6.19216933 options = odeset( 'RelTol' ,1e-9, 'AbsTol' ,[1e-9 1e-9 1e-9 1e-9]); [T1,F1]=ode45(@apollo,[0 100],[1.2 0 0 -1.04935751],options); % T=100 figure(1) plot(F1(:,1),F1(:,2)) grid on hold on [Tv,Fv]=ode45(@apollo,[0 6.19216933],[1.2 0 0 -1.04935751],options); %T=6.19216933 l=plot(Fv(:,1),Fv(:,2), 'r:' ); set(l, 'linewidth' ,2); plot(mius,0, 'o' ,-miu,0, '*' ) hold off legend ( 'T=100' , 'T=6.19216933' , 'Moon' , 'Earth' ) xlabel( 'x' ) ylabel( 'y' ) title ( 'The Orbit of Apollo' ) 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
(b) posa=[Fv(:,1) Fv(:,2)]; pose=[-miu 0];posm=[mius 0]; d=zeros(length(Tv),1); for i=1:length(Tv) d(i)=(Fv(i,1)-pose(1))^2+(Fv(i,2))^2; end dis=sqrt(min(d))*238000-4000; disp( 'The minimum distance between Apollo and the surface of the earth is' ) disp(dis) The minimum distance between Apollo and the surface of the earth is
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}