Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clearScreen.
- set navMode to "surface".
- set startalt to alt:radar.
- set cutoff to false.
- set specificport to ship:dockingports[0].
- set throtvar to 0.
- set steervar to ship:srfretrograde.
- lock steering to steervar.
- lock throttle to throtvar.
- print "Waiting for suicide burn".
- set procstep to 0.
- until cutoff = true {
- set uTTI to addons:tr:timetillimpact.
- set thrust to ship:availablethrustat(ship:q).
- set accel to thrust / ship:mass.
- set udecceltime to ship:airspeed / accel.
- set decceltime to round(udecceltime).
- set TTI to round(uTTI).
- print TTI.
- print decceltime.
- }
- until cutoff = true {
- wait until decceltime + 3 = TTI.
- print "Initiating suicide burn".
- set throtvar to 1.0.
- set procstep to 1.
- if procstep = 1 and ship:airspeed <= 10 {
- print "Beginning deployment sequence".
- set steervar to ship:up.
- if ship:airspeed >= 3 {
- set throtvar to 1.0.
- } else {
- set throtvar to 0.0.
- }
- }
- if alt:radar - startalt <= 3 {
- set procstep to 2.
- print "Deploying cargo".
- specificport:undock().
- set steervar to heading(90,90).
- set throtvar to 1.0.
- SAS off.
- wait 1.
- set steervar to heading(90,45).
- wait 2.
- print "Deployment complete".
- set ship:control:pilotmainthrottle to 0.
- unlock steering.
- unlock throttle.
- set cutoff to true.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment