Advertisement
wirawafiy1

Basic launch script

Nov 8th, 2023
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. // Basic Launch Script for Low Orbit
  2. // By Wafiy12 - twitch account
  3.  
  4. // Set desired altitude in meters
  5. SET ALTITUDE TO 100000.
  6.  
  7. // Launch rocket
  8. LOCK THROTTLE TO 1.
  9. WAIT UNTIL SHIP:ALTITUDE > 1000.
  10. STAGE.
  11.  
  12. // Gravity turn
  13. LOCK STEERING TO HEADING(90, 0).
  14. UNTIL SHIP:ALTITUDE > ALTITUDE - 10000 {
  15. IF SHIP:SURFACEVELOCITY:MAG < 1000 {
  16. LOCK THROTTLE TO 1 - (SHIP:ALTITUDE / (ALTITUDE - 10000)).
  17. } ELSE {
  18. LOCK THROTTLE TO 0.5.
  19. }
  20. }
  21.  
  22. // Circularize orbit
  23. LOCK STEERING TO PROGRADE.
  24. UNTIL SHIP:APOAPSIS > ALTITUDE - 1000 AND SHIP:PERIAPSIS > ALTITUDE - 1000 {
  25. IF SHIP:VELOCITY:SURFACE:MAG < 50 {
  26. LOCK THROTTLE TO 0.1.
  27. } ELSE {
  28. LOCK THROTTLE TO 0.5.
  29. }
  30. }
  31.  
  32. // Done
  33. LOCK THROTTLE TO 0.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement