wirawafiy1

Aalaunch

Jun 4th, 2023
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. CLEARSCREEN.
  2. SWITCH TO 0.
  3. COPY ABORBIT TO 1.
  4. COPY ACORBIT TO 1.
  5. COPY ADORBIT TO 1.
  6. SWITCH TO 1.
  7.  
  8. LOCK THROTTLE TO 1.0. // 1.0 is the max, 0.0 is idle.
  9.  
  10. PRINT "Counting down:".
  11. FROM {local countdown is 10.} UNTIL countdown = 0 STEP {SET countdown to countdown - 1.} DO {
  12. PRINT "..." + countdown.
  13. WAIT 1.
  14. }
  15.  
  16. WHEN MAXTHRUST = 0 THEN {
  17. STAGE.
  18. Preserve.
  19. }
  20.  
  21. On ship:maxthrustat(0) {
  22. if stage:ready{
  23. stage.
  24. }
  25. return stage: number > 0.
  26. }
  27.  
  28. print "Jebediah: I forgot my snacks!".
  29.  
  30.  
  31. SET MYSTEER TO HEADING(90,90).
  32. LOCK STEERING TO MYSTEER.
  33. UNTIL SHIP:APOAPSIS > 100000 {
  34.  
  35. IF SHIP:VELOCITY:SURFACE:MAG < 100 {
  36. SET MYSTEER TO HEADING(90,90).
  37.  
  38. } ELSE IF SHIP:VELOCITY:SURFACE:MAG >= 100 AND SHIP:VELOCITY:SURFACE:MAG < 200 {
  39. SET MYSTEER TO HEADING(90,80).
  40. PRINT "Pitching to 80 degrees" AT(0,15).
  41. PRINT ROUND(SHIP:APOAPSIS,0) AT (0,16).
  42.  
  43.  
  44. } ELSE IF SHIP:VELOCITY:SURFACE:MAG >= 200 AND SHIP:VELOCITY:SURFACE:MAG < 300 {
  45. SET MYSTEER TO HEADING(90,70).
  46. PRINT "Pitching to 70 degrees" AT(0,15).
  47. PRINT ROUND(SHIP:APOAPSIS,0) AT (0,16).
  48.  
  49. } ELSE IF SHIP:VELOCITY:SURFACE:MAG >= 300 AND SHIP:VELOCITY:SURFACE:MAG < 400 {
  50. SET MYSTEER TO HEADING(90,60).
  51. PRINT "Pitching to 60 degrees" AT(0,15).
  52. PRINT ROUND(SHIP:APOAPSIS,0) AT (0,16).
  53.  
  54. } ELSE IF SHIP:VELOCITY:SURFACE:MAG >= 400 AND SHIP:VELOCITY:SURFACE:MAG < 500 {
  55. SET MYSTEER TO HEADING(90,50).
  56. PRINT "Pitching to 50 degrees" AT(0,15).
  57. PRINT ROUND(SHIP:APOAPSIS,0) AT (0,16).
  58.  
  59. } ELSE IF SHIP:VELOCITY:SURFACE:MAG >= 500 AND SHIP:VELOCITY:SURFACE:MAG < 600 {
  60. SET MYSTEER TO HEADING(90,40).
  61. PRINT "Pitching to 40 degrees" AT(0,15).
  62. PRINT ROUND(SHIP:APOAPSIS,0) AT (0,16).
  63.  
  64. } ELSE IF SHIP:VELOCITY:SURFACE:MAG >= 600 AND SHIP:VELOCITY:SURFACE:MAG < 700 {
  65. SET MYSTEER TO HEADING(90,30).
  66. PRINT "Pitching to 30 degrees" AT(0,15).
  67. PRINT ROUND(SHIP:APOAPSIS,0) AT (0,16).
  68.  
  69. }.
  70.  
  71. }.
  72.  
  73. PRINT "100km apoapsis reached, cutting throttle".
  74.  
  75. SET SHIP:CONTROL:PILOTMAINTHROTTLE TO 0.
  76.  
  77. global throt is 0.
  78. lock throttle to throt.
  79. lock steering to prograde.
  80. until periapsis >= 100000 {
  81. IF eta:apoapsis < 30 AND throt <1 {
  82. SET throt to 1.}
  83. If eta:apoapsis >50 and throt >0 {
  84. Set throt to 0. }
  85. IF eta:apoapsis >1000 and throt <1 {
  86. Set throt to 1. }
  87. }
  88. unlock steering.
  89. unlock throttle.
  90.  
  91. Print "check".
  92.  
  93. print "all go".
  94.  
  95. run aborbit(749750).
Add Comment
Please, Sign In to add comment