Guest User

execnode.ks

a guest
Jan 4th, 2015
884
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // execute maneuver node
  2. lock throttle to 0.
  3. set nd to nextnode.
  4. set burntime to nd:deltav:mag/(maxthrust/mass).
  5. print "Burn time needed: " + round(burntime,2) + " seconds".
  6. wait until nd:eta < burntime/2+60.
  7. lock steering to nd.
  8. print "Setting up before burning...".
  9. wait until nd:eta < burntime/2.
  10.  
  11. print "Burning...".
  12.  
  13. if nd:deltav:mag >= 50
  14.     lock throttle to 1.
  15.    
  16. wait until nd:deltav:mag < 50.
  17.  
  18. if nd:deltav:mag >= 20
  19.     lock throttle to 0.5.
  20.    
  21. wait until nd:deltav:mag < 20.
  22.  
  23. if nd:deltav:mag >= 10
  24.     lock throttle to 0.2.
  25.  
  26. wait until nd:deltav:mag < 10.
  27.  
  28. if nd:deltav:mag >= 0.5
  29.     lock throttle to 0.05.
  30.  
  31. wait until nd:deltav:mag < 0.5.
  32.  
  33. lock throttle to 0.01.
  34.  
  35. wait until nd:deltav:mag < 0.2.
  36.  
  37. lock throttle to 0.
  38.  
  39. print "Maneuvering success.".
  40.  
  41. unlock throttle.
  42. unlock steering.
Advertisement
Add Comment
Please, Sign In to add comment