Advertisement
Guest User

almosot_there

a guest
Jul 5th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. set steerHeading to 90.
  2. set ecc to (((ship:apoapsis+body:radius)+(ship:periapsis+body:radius))/((ship:apoapsis+body:radius)-(ship:periapsis+body:radius))).
  3.  
  4. wait until eta:apoapsis <= 60.
  5. set warp to 0.
  6. print "Circularization.".
  7.  
  8. wait until eta:apoapsis < 20.
  9. lock steering to heading(steerHeading, 0).
  10.  
  11. UNTIL ecc <= 0.01 {
  12.  
  13.     if eta:apoapsis < 20 {
  14.     lock steering to heading(steerHeading, 0).
  15.     }
  16.  
  17.     else if eta:apoapsis <= 10 {
  18.     if ship:verticalspeed < -4 {
  19.         lock steering to heading(steerHeading, 10).
  20.     }
  21.     if ship:verticalspeed < -2 {
  22.         lock steering to heading(steerHeading, 5).
  23.     }
  24.     if ship:verticalspeed > 2 {
  25.         lock steering to heading(steerHeading, -5).
  26.     }
  27.     if ship:verticalspeed > 4 {
  28.         lock steering to heading(steerHeading, -10).
  29.     }
  30.     }
  31.  
  32.     else if ship:verticalspeed <= 0 {
  33.     lock throttle to 1.
  34.     }
  35.  
  36.     else if ship:periapsis >= (ship:apoapsis*0.70) {
  37.     lock throttle to 0.7.
  38.     }
  39.  
  40.     else if ship:periapsis >= (ship:apoapsis*0.85) {
  41.     lock throttle to 0.25.
  42.     }
  43.  
  44.     else if ship:periapsis >= (ship:apoapsis*0.95) {
  45.     lock throttle to 0.
  46.     lock steering to heading(steerHeading,0).
  47.         print "Circularization complete.".
  48.     }
  49.  
  50.     WAIT 0.001.  // This line is Vitally Important.
  51. }
  52.  
  53. print "Orbit eccentriccity = " + ecc.
  54. wait 2.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement