Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. lock steering to srfprograde.//nose forward
  2. set tr1 to transferall("liquidfuel",ship:parts,ship:partstagged("fronttank")).
  3. set tr2 to transferall("oxidizer",ship:parts,ship:partstagged("fronttank")).
  4. set glide to 0.27.//the glide slope the plane will try to keep
  5. set ksc_longitude to -74.7.
  6. set ksc_latitude to -0.0486.
  7. lock targetheight to (ksc_longitude-ship:longitude)*constant:degtorad*kerbin:radius*glide+80.
  8. wait until altitude < 70000.
  9. print "Reentry starting, fuel forward, airbrakes active.".
  10. set tr1:active to true.
  11. set tr2:active to true.
  12. ag3 on.//airbrakes
  13. wait until altitude < 55000.
  14. print "Reaction wheels off, engines standby.".
  15. ag1 off.//reaction wheels and engine mode
  16. wait until groundspeed < 1000.
  17. print "Reentry successfull, navigating to space center.".
  18. ag3 off.//airbrakes off
  19. lock steering to heading(90+200*(ship:latitude-ksc_latitude)+ship:velocity:surface:y/10,-10+min(max((targetheight-altitude)/100,-5),5)).
  20. until alt:radar < 200 {
  21. print "Altitude should be: " + targetheight at (0,15).
  22. print "Altitude currently: " + altitude at (0,16).
  23. print "Latitude deviation: " + (ship:latitude-ksc_latitude) at (0,17).
  24. print "Northward velocity: " + ship:velocity:surface:y at (0,18).
  25. wait 1.
  26. }
  27. lock steering to heading(90,-verticalspeed/2-alt:radar/100).//FLARE to reduce vertical speed!
  28. gear on.
  29. wait until alt:radar < 15.
  30. lock steering to heading(90,3).
  31. brakes on.
  32. ag3 on.
  33. wait until groundspeed < 0.1.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement