Advertisement
sumguytwitches

Hathi VI to orbit

Apr 10th, 2024
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1.  
  2. set shipbounds to ship:bounds.
  3. SetAngle(90).
  4. startup(turbos).
  5. startup(vectors).
  6. lock x to 90.
  7. lock p to 0.
  8. lock steering to heading(x,p).
  9. ImtheRedBaron(false).
  10. lock throttle to (101e3-apoapsis)/1000.
  11. when shipbounds:bottomaltradar > 1 then {gear off.}
  12. when airspeed > 100 then {
  13. lock p to 12.
  14. }
  15. when airspeed > 220 then props off.
  16. when airspeed > 400 then {
  17. shutoff(vectors).
  18. }
  19. when airspeed > 1100 then {
  20. startup(vectors).
  21. startup(nukes).
  22. }
  23. when altitude > 30e3 then shutoff(turbos).
  24.  
  25. when altitude > body:atm:height and eta:apoapsis < 15 then {
  26. info("circularize").
  27. lock desiredVel to vxcl(up:vector,velocity:orbit):normalized * sqrt(body:MU/(body:Radius + altitude)).
  28. lock dV to desiredVel - velocity:orbit.
  29. lock steering to lookdirup(dV, ship:facing:topvector).
  30. when true then {
  31. if vang(facing:vector,dV) > 2 lock throttle to 0. else lock throttle to dv:mag / 2.
  32. if dv:mag > 0.03 return true. else {
  33. print "complete".
  34. lock throttle to 0.
  35. GoToSleep().
  36. displayDV().
  37. set complete to true.
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement