sumguytwitches

Manta Landing

May 6th, 2021 (edited)
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. gear on.
  2. fuelcells on.
  3. lights off.
  4. list engines in es.
  5. for e in es e:activate.
  6. set es to ship:partsdubbedpattern("vector").
  7. for e in es {set e:gimbal:limit to 6. e:gimbal:doaction("free gimbal",true). }
  8. lock throttle to 0.
  9. bays off.
  10. rcs on.
  11. toggle ag2.
  12. brakes on.
  13. set servos to ship:modulesnamed("ModuleRoboticRotationServo").
  14. for s in servos {
  15. s:setfield("damping", 80).
  16. s:setfield("traverse rate", 40).
  17. s:setfield("locked",false).
  18. s:setfield("motor",true).
  19. }
  20. function tilt2 {
  21. parameter tlt is 0.
  22. for s in servos s:setfield("target angle", tlt).
  23. }.
  24. tilt2(0).
  25.  
  26.  
  27.  
  28.  
  29. lock altR to alt:radar.
  30. lock acc to max(1,(max(0.1,vdot(up:vector,facing:vector)) * ship:availablethrust * 0.2) / mass - body:mu / (body:radius^2)).
  31. lock throttle to (-verticalspeed - 1) - sqrt(2 * acc * max(altR - 70 + verticalspeed * 0.5,0.1)).
  32. when verticalspeed > 0 then {
  33. lock throttle to 0.
  34. lock steering to lookdirup(up:vector,facing:topvector).
  35. }
  36. lock steering to lookdirup(-velocity:surface + vxcl(up:vector, -velocity:surface * 0.3) + up:vector * 5, facing:topvector).
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
Add Comment
Please, Sign In to add comment