sumguytwitches

Athena 2 takeoff

Nov 10th, 2020 (edited)
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. switch to 0.
  2. ship:partsdubbedpattern("cockpit")[0]:controlfrom().
  3. list engines in es. for e in es e:shutdown().
  4. set steeringmanager:maxstoppingtime to 6.
  5. run airplanesteer.
  6. lights off.
  7. set es to ship:partsdubbedpattern("wolf").
  8. for w in es if vang(w:facing:vector, ship:facing:vector) > 10 w:activate().
  9.  
  10. for w in es set w:gimbal:limit to 10.
  11. for w in es if vang(w:facing:vector, ship:facing:vector) < 10 set w:gimbal:limit to 100.
  12. lock throttle to 0.
  13. bays off.
  14. rcs on.
  15. //toggle ag1.
  16. brakes off.
  17. set servos to ship:modulesnamed("ModuleRoboticRotationServo").
  18. for s in servos {
  19. s:setfield("damping", 80).
  20. s:setfield("traverse rate", 40).
  21. s:setfield("locked",false).
  22. s:setfield("motor",true).
  23. }
  24. function tilt2 {
  25. parameter tlt is 0.
  26. for s in servos s:setfield("target angle", -tlt + 90).
  27. }.
  28. tilt2(0).
  29. set x to 90.
  30. set p to 0.
  31. lock steering to heading(x, p).
  32. set gotime to false.
  33. when gotime then { tilt2(min(max(10,alt:Radar/10), 90)). return alt:Radar < 2000. }.
  34. wait 0.25.
  35. lights on.
  36.  
  37. lock throttle to 1.
  38.  
  39. when abs(steeringmanager:angleerror) < 15 then { set gotime to true. lock throttle to 1. set p to 20. for e in es e:activate(). }
  40. when alt:radar > 20 then gear off.
  41. when alt:Radar > 2000 then { rcs off. for e in es if e:position:x > 0 set e:gimbal:limit to 100. }
  42. when apoapsis > body:atm:height + 20000 then lock throttle to 0.
  43. when apoapsis > body:atm:height + 10e3 then { lock steering to prograde. for e in es if e:position:x > 0 set e:gimbal:limit to 100. }
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
Add Comment
Please, Sign In to add comment