13.11.2015 Views

Dynamics cheat sheet

my dynamics notes - 12000.org

my dynamics notes - 12000.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Algorithm 3 Hohmann rendezvous algorithm, case 2<br />

1: function hohmann rendezvous 2(θ 0 , r 1 , r 2 , N, µ)<br />

π<br />

2: θ 0 := θ 0 180 (<br />

⊲ convert from degrees to radian<br />

( ) ) 3/2<br />

3: θ H := π 1 − r1 +r 2<br />

2r 2<br />

⊲ Find Hohmann ideal phase angle before transfer<br />

4: if θ 0 = θ H and N = 0 then ⊲ adjust for special case<br />

5: a := r 2+r 1<br />

2 (√<br />

6: TOF := π<br />

)<br />

a 3<br />

µ<br />

7: else<br />

8: ω 2 := √ µ<br />

r2<br />

3<br />

9: t 2 := (2π−θ 0)+2πN<br />

ω 2<br />

10: a 1 := rt+r 1<br />

2<br />

11: a 2 := rt+r 2<br />

2<br />

12: TOF := π<br />

(√<br />

a 3<br />

1<br />

µ<br />

+ a3 2<br />

µ<br />

)<br />

⊲ angular speed of slower satellite in rad/sec<br />

⊲ find time of light of the slower satellite<br />

⊲ time of flight for the fast satellite<br />

13: r t := solve (t 2 = T OF ) for r t ⊲ Solve numerically for r t<br />

14: end if<br />

15: return TOF<br />

16: end function<br />

An example implementation is below<br />

1 hohmann_rendezvous_2:= proc({<br />

2 theta::numeric:=0,<br />

3 r1::numeric:=0,<br />

4 r2::numeric:=0,<br />

5 N::nonnegint:=0,<br />

6 mu::numeric:=3.986*10^5})<br />

7 local theta0,thetaH,TOF;<br />

8 theta0 := theta*Pi/180;<br />

9 thetaH := Pi*(1-((r1+r2)/(2*r2))^(3/2));<br />

10 if theta0 = thetaH and N = 0 then<br />

11 proc()<br />

12 local a:=(r1+r2)/2;<br />

13 TOF:= Pi*(sqrt(a^3/mu));<br />

14 end proc()<br />

15 else<br />

16 proc()<br />

17 local t2,a1,a2,rt,omega2;<br />

18 omega2 := sqrt(mu/r2^3);<br />

19 t2 := ((2*Pi-theta0)+2*Pi*N)/omega2;<br />

20 a1 := (rt+r1)/2;<br />

21 a2 := (rt+r2)/2;<br />

22 TOF := Pi*(sqrt(a1^3/mu)+sqrt(a2^3/mu));<br />

23 rt := op(select(is, [solve(t2=TOF,rt)], real));<br />

24 end proc()<br />

25 fi;<br />

26 eval(TOF);<br />

27 end proc:<br />

And calling the above for two different cases gives<br />

86

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!