Advertisement
wirawafiy1

Look

Jun 4th, 2023
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. // Launch script to land on the Moon and return to Kerbin
  2.  
  3. // Stage setup
  4. LOCK THROTTLE TO 1.
  5. LOCK STEERING TO HEADING(90, 90). // Launch eastward
  6.  
  7. // Liftoff
  8. WAIT UNTIL ALTITUDE > 1000. // Wait for launch
  9. WAIT UNTIL SHIP:ALTITUDE > 25000. // Wait for gravity turn
  10. LOCK THROTTLE TO 0.8. // Reduce throttle for efficiency
  11.  
  12. // Gravity turn
  13. WAIT UNTIL SHIP:ALTITUDE > 45000. // Continue gravity turn
  14. LOCK STEERING TO HEADING(90, 85). // Gradually turn eastward
  15.  
  16. // Circularization
  17. WAIT UNTIL SHIP:PERIAPSIS > 70000. // Wait for desired apoapsis
  18. LOCK THROTTLE TO 0. // Cut engines
  19.  
  20. // Translunar injection (TLI)
  21. WAIT 5. // Wait for coast
  22. LOCK THROTTLE TO 1. // Ignite engines
  23. WAIT UNTIL SHIP:PERIAPSIS > 70000. // Wait for desired apoapsis
  24. LOCK THROTTLE TO 0. // Cut engines
  25.  
  26. // Moon approach
  27. LOCK STEERING TO PROGRADE. // Point towards prograde
  28. WAIT UNTIL SHIP:PERIAPSIS > 30000. // Start circularization burn
  29. LOCK THROTTLE TO 0.5. // Reduce throttle for precision
  30.  
  31. // Lunar landing
  32. WAIT UNTIL SHIP:PERIAPSIS < 10000. // Start landing burn
  33. LOCK THROTTLE TO 0.2. // Reduce throttle for descent
  34. WAIT UNTIL SHIP:ALTITUDE < 1000. // Cut engines at low altitude
  35. LOCK THROTTLE TO 0. // Cut engines
  36.  
  37. // Return to Kerbin
  38. LOCK STEERING TO UP. // Point towards Kerbin
  39. LOCK THROTTLE TO 1. // Ignite engines
  40. WAIT UNTIL SHIP:PERIAPSIS > 70000. // Wait for desired apoapsis
  41. LOCK THROTTLE TO 0. // Cut engines
  42.  
  43. // Reentry and landing
  44. WAIT UNTIL SHIP:PERIAPSIS < 35000. // Start reentry burn
  45. LOCK STEERING TO HEADING(90, 90). // Point towards landing site
  46. LOCK THROTTLE TO 1. // Ignite engines for landing
  47. WAIT UNTIL ALTITUDE < 1000. // Cut engines at low altitude
  48. LOCK THROTTLE TO 0. // Cut engines
  49.  
  50. // Mission complete
  51. PRINT "Mission complete! Welcome back to Kerbin!".
  52.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement