Advertisement
sumguytwitches

Hathi Sera To Orbit

Mar 4th, 2024
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1.  
  2. ImaRocket().
  3. lock x to 90.
  4. lock p to 90.
  5. lock steering to heading(x,p).
  6. set steeringmanager:rollcontrolanglerange to 180.
  7. displayDV().
  8. brakes off.
  9. ImtheRedBaron().
  10. lock x to 90. lock p to 0.
  11. lock steering to heading(x,p).
  12. lock calchead to body:geopositionof(ship:facing:vector):heading.
  13.  
  14. lock throttle to (10-groundspeed)/3.
  15. wait until calchead > 88 and calchead < 92.
  16. info("launching").
  17. ImaRocketPlane().
  18. ImtheRedBaron(false).
  19.  
  20. lock rpmtarget to 460.
  21. lock throttle to 1.
  22. lock p to 30. rcs on. setangle(30).
  23. when alt:radar > 50 then {
  24. info("flight").
  25. setangle(90).
  26. for vec in vectors set vec:gimbal:limit to 10.
  27. gear off.
  28. lock p to max(25,min(80,90-(apoapsis/45e3)*90)).
  29. steeringmanager:resetpids().
  30. rcs off.
  31.  
  32. }.
  33.  
  34. lock steering to heading(x,p).
  35. when airspeed > 275 then { info("props off"). props off. }
  36. when altitude > 14e3 or ship:oxidizer < 100 then {info("nukes"). startup(nukes).}
  37. //when apoapsis > body:atm:height-30e3 then lock steering to prograde.
  38. when apoapsis > 125e3 then {
  39. info("warp to circularize").
  40. lock throttle to 0.
  41. set warp to 1. wait 1. warpto(time:seconds + eta:apoapsis - 60).
  42.  
  43. lock desiredVel to vxcl(up:vector,velocity:orbit):normalized * sqrt(body:MU/(body:Radius + altitude)).
  44. lock dV to desiredVel - velocity:orbit.
  45. lock steering to lookdirup(dV, ship:facing:topvector).
  46. when true then {
  47. if vang(facing:vector,dV) > 2 lock throttle to 0. else lock throttle to dv:mag / 2.
  48. if dv:mag > 0.03 return true. else {print "complete". lock throttle to 0. }}
  49.  
  50. }
  51. when ship:liquidfuel < 0.1 then {
  52.  
  53. set remaining to sqrt(body:mu / (ship:obt:apoapsis + body:radius)) - velocity:orbit:mag.
  54. print remaining.
  55. set ship:name to remaining:tostring().
  56. }
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement