-
Notifications
You must be signed in to change notification settings - Fork 0
/
v40.ks
44 lines (35 loc) · 1.16 KB
/
v40.ks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FUNCTION TILT {
PARAMETER minimum_altitude.
PARAMETER angle.
WAIT UNTIL ALTITUDE > minimum_altitude.
PRINT "Locking heading to " + angle + " degrees".
LOCK STEERING TO HEADING (90, angle).
}
CLEARSCREEN.
PRINT "Launch program initiated".
LOCK STEERING TO UP. LOCK THROTTLE TO 1.
PRINT "Counting down:".
FROM {local countdown is 3.} UNTIL countdown = 0 STEP {SET countdown to countdown - 1.} DO {
PRINT "..." + countdown.
WAIT 1.
}
PRINT "LAUNCH!". STAGE.
WAIT UNTIL VERTICALSPEED > 100. TILT(0, 80).
WAIT UNTIL VERTICALSPEED > 200. TILT(0, 70).
WAIT UNTIL VERTICALSPEED > 300. TILT(0, 60).
WAIT UNTIL VERTICALSPEED > 400. TILT(0, 50).
WAIT UNTIL VERTICALSPEED > 500. TILT(0, 40).
WAIT UNTIL VERTICALSPEED > 600. TILT(0, 30).
WAIT UNTIL VERTICALSPEED > 700. TILT(0, 20).
WAIT UNTIL APOAPSIS > 70000.
PRINT "Coasting to space".
TILT(0, 10). LOCK THROTTLE TO 0.01.
WAIT UNTIL SHIP:ALTITUDE > 70000.
TILT(0, 5). LOCK THROTTLE TO 1.
WAIT UNTIL STAGE:LIQUIDFUEL < 1.
STAGE. UNLOCK STEERING.
WAIT UNTIL ALT:RADAR < 5000.
PRINT "Deploying parachutes".
STAGE. WAIT 1. STAGE.
WAIT UNTIL VERTICALSPEED >= 0.
PRINT "Landed! (Or Splashed!) Program terminated, thanks for flying!".