-
Notifications
You must be signed in to change notification settings - Fork 0
/
four.ks
76 lines (65 loc) · 1.25 KB
/
four.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
CLEARSCREEN.
print "Starting countdown:".
from { local countdown is 10. } until countdown = 0 step {set countdown to countdown -1.} do {
print countdown .
wait 1.
}
lock steering to up.
lock throttle to 1.
stage.
when ship:altitude > 10000 then {
LOCK STEERING TO R(0,0,-90) + HEADING(90,45).
}
when ship:apoapsis > 80000 then {
LOCK STEERING TO R(0,0,-90) + HEADING(90,0).
}
print "Burning to raise apoapsis".
until ship:obt:apoapsis > 100000 {
wait 0.5.
if MAXTHRUST = 0 {
stage.
}
}
lock throttle to 0.
print "Waiting for apoapsis.".
until ETA:APOAPSIS < 5 {
wait 0.5.
}
LOCK STEERING TO R(0,0,-90) + HEADING(90,0).
lock throttle to 1.
print "Buring to raise periapsis".
until ship:obt:periapsis > 90000{
wait 0.5.
if MAXTHRUST = 0 {
stage.
}
}
lock throttle to 0.
//We are now in orbit
until ETA:periapsis < 10 {
wait 0.5.
}
lock throttle to 0.5.
LOCK STEERING TO R(0,0,-90) + HEADING(90,0).
until ship:obt:apoapsis > 2863330 {
wait 0.01.
if MAXTHRUST = 0 {
stage.
}
}
lock throttle to 0.
stage.
AG1 on.
until ETA:apoapsis < 3 {
wait 0.1.
}
lock throttle to 0.1.
LOCK STEERING TO R(0,0,-90) + HEADING(90,0).
until ship:obt:periapsis > 2863330 {
wait 0.01.
if MAXTHRUST = 0 {
stage.
}
}
lock throttle to 0.
print "Desired orbit found".