-
Notifications
You must be signed in to change notification settings - Fork 2
/
Main.kc
38 lines (35 loc) · 966 Bytes
/
Main.kc
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
module Main;
import KOS::Builtin unqualified;
import KOS::Math unqualified;
import KOS::IO unqualified;
import KOS::Cockpit unqualified;
import KOS::Vessel unqualified;
import KOS::Maneuver unqualified;
import KOS::Time unqualified;
import KOS::Drawing unqualified;
import Rocket::Launch as Launch;
import Rocket::Maneuver as Maneuver;
Void Main() {
PrintAt("Hello World", 0, 0);
Launch::Launch(Launch::KerbinAscent);
// Don't forget the solar panels
Panels = True;
Maneuver::CircularizeAtApoapsis();
Maneuver::ExecuteNext();
// 10 sec stay
wait(10);
// reentry burn
lock Steering = Ship.Retrograde;
wait(10);
lock Throttle = 1;
wait until (Ship.Orbit.Periapsis < 35000);
unlock Throttle;
unlock Steering;
// wait for atmosphere
wait until (Ship.Altitude < 70000);
Panels = False;
lock Steering = Ship.SrfRetrograde;
// wait until lower altitude for chute deployment
wait until (Ship.Altitude < 3000);
Chutes = True;
}