Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clearscreen.
- print "Initializing launch sequence".
- wait 1.
- set flightstatus to 1.
- set throtvar to 1.0.
- set shipdir to heading(90,90).
- set maxAP to 100000.
- set maxPAP to 100000.
- lock apoapsis to maxAP.
- print "Target apoapsis set to maxAP".
- wait 1.
- lock steering to shipdir.
- print "Launch heading set".
- wait 1.
- lock throttle to throtvar.
- print "Throttle set to full".
- wait 1.
- print "Go for launch".
- stage.
- wait 0.001.
- if flightstatus = 1 {
- if altitude < maxAP {
- if altitude > 10000 and altitude < 20000 {
- set shipdir to heading(90,80).
- wait 0.001.
- }
- if altitude > 20000 and altitude < 30000 {
- set shipdir to heading(90,70).
- wait 0.001.
- }
- if altitude > 30000 and altitude < 40000 {
- set shipdir to heading(90,60).
- wait 0.001.
- }
- if altitude > 40000 and altitude < 50000 {
- set shipdir to heading(90,50).
- wait 0.001.
- }
- if altitude > 50000 and altitude < 60000 {
- set shipdir to heading(90,40).
- wait 0.001.
- }
- if altitude > 60000 and altitude < 70000 {
- set shipdir to heading(90,30).
- wait 0.001.
- }
- if altitude > 70000 and altitude < 80000 {
- set shipdir to heading(90,20).
- wait 0.001.
- }
- if altitude > 80000 and altitude < 90000 {
- set shipdir to heading(90,10).
- wait 0.001.
- }
- if altitude >90000 {
- set shipdir to heading(90,0).
- wait 0.001.
- }
- if altitude >= maxAP {
- set throtvar to 0.
- set flightstatus to 2.
- print "Launch status complete. Preparing to enter orbit".
- wait 0.001.
- }
- }
- }
- if flightstatus = 2 {
- if maxPAP < maxAP {
- set shipdir to prograde.
- wait 1.
- set throtvar to 1.
- }
- if maxPAP >= maxAP {
- set throtvar to 0.
- print "Orbit achieved".
- set flightstatus to 3.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment