-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrovoland_test.ks
106 lines (82 loc) · 1.73 KB
/
rovoland_test.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//
//
// lock stuff
lock throttle to 0.0.
lock steering to UP.
//lock vel to SHIP:VERTICALSPEED.
//set alt to ALT:RADAR.
set cut to true.
// testbed
stage.
wait until SHIP:VERTICALSPEED >= 20.
lock steering to Up + R(15,0,0).
wait until SHIP:PARTSTAGGED("S1")[0]:FLAMEOUT.
// solidbooster
stage.
unlock steering.
wait until SHIP:VERTICALSPEED <= 5.
// fairing.
wait until STAGE:READY.
stage.
// drogue chute
wait until ALT:RADAR <= 1500.
print "deploy drogue chute".
wait until STAGE:READY.
stage.
// main chute
wait until ALT:RADAR <= 750.
print "deploy main chute".
wait until STAGE:READY.
stage.
// heatshield
wait 5.
print "drop heatshield".
wait until STAGE:READY.
stage.
// stage landing rockets
wait until ALT:RADAR <= 250.
print "stage landing rockets".
wait until STAGE:READY.
stage.
// initiate landing sequence
//lock steering to UP.
run lib_hover.
//print alt.
wait until ALT:RADAR <= 100.
print "initiate landing sequence".
// initiate landing sequence
//set speed to 5.
//print SHIP:VERTICALSPEED.
set vd to vecdraw(v(0,0,0), 5*ship:facing:upvector).
set vd:show to true.
set vd:label to "UP".
set target_climbrate to -5.
set target_upspeed to -8.
lock steering to up + R(0, 0, 0).
until false {
print "LOOP".
set vd to vecdraw(v(0,0,0), 5*ship:facing:upvector).
set vd:show to true.
set vd:label to "UP".
if alt:radar <= 50 {
run_hover().
if alt:radar <= 10 {
// cut parachute
if cut {
ag1 on.
set cut to false.
}
if alt:radar <= 10 {
set target_climbrate to -2.
if alt:radar <= 5 {
set target_climbrate to -1.
if alt:radar <= 1 {
stage.
}
}
}
}
}
wait 0.01.
}
// SHIP:VELOCITY:SURFACE:MAG