Kerbal Space Program
Posted on Wed 25 August 2021 in games
I am usually late to proverbial parties, but I think I’ve outdone myself by discovering the computer game Kerbal Space Program roughly 10 years after it first became playable. It’s the kind of game that triggers my “I’ll optimize this by writing a script”, so here are a few of the tools I wrote, or interesting tools I found online:
- ∆v chart by Kowgan (local copy)
- Alex Moon's Launch Window Planner
- A multi-gravity assist planner
- Another planner
- Eric Meyer's Resonant Orbit Calculator
- Parachute planner by JackTex
- Electricity generation & storage
- Engine selection
- CommNet link budget
- CommNet line of sight
- Mining
- Orbit transfer
- Interplanetary departure from a moon
- Mission planner (work in progress)
- Multi-engine planner
And some random notes:
-
When launching from KSC to rendez-vous with something in a circular orbits at 100km altitude: For vertical launches with "my usual ascend profile", launch when the target is 26º before the KSC position (viewable as Phase Angle). For spaceplane launches (with RAPIERs and 10º pitch up all the way), launch when the target is 16º before the KSC.
-
When starting from a 100km circular orbits around Kerbin, a deorbit burn down to Pe=40km will touch down 152º later. Craft consists of:
- Mk3-1 Command module
- RC-L01 (for storing science and remote control of probes)
- Large Heath Shield
- Mk16-XL Parachute
- 2 × Mk2-R Radial-Mount Parachute
-
For interplanetary travel, you need ~930m/s of Δv to leave Kerbin SoI starting from a 100kmAGL orbits, and an additional 100~1000m/s to reach other planets. Design for a high enough TWR to do this in a reasonable time. Multi-impulse departures are possible: as long as the apoapsis is < 8.9MmASL (9.5Mm), the Mun will not alter your orbits. The below table tries to keep burns <2 minutes until we cross the orbits of the Mun.
TWR [GKerbin] | Burns for escape | Burns for 2100m/s |
---|---|---|
1.79 | 53s | 120s |
1.5 | 63s | 56s + 87s |
1.0 | 95s | 84s + 130s |
0.75 | 111s + 15s | 111s + 174s |
0.696 | 120s + 16s | 120s + 186s |
0.5 | 120s + 47s + 23s | 120s + 47s + 261s |
0.25 | 2×120s + 94s + 45s | 2×120s + 94s + 522s |
0.1 | 6×120s + 115s + 113s | 6×120s + 115s + 1305s |
-
Most engines produce a constant thrust while on. Its fuel consumption scales with the time the engine is on. But the energy scales with the distance the force is applied. This means that running an engine at a higher speed, yields more kinetic energy for the same amount of fuel. This is known as the Oberth effect.
When starting out at Minmus, this means that it could be beneficial to first spend some ∆v to dive into Kerbin, and burn at periapsis for the escape trajectory. Escaping from Kerbin from a Minmus orbits requires at least ~115m/s. The boundary seems to be 274.1m/s: for ∆v's above that, it's optimal to first burn 228.1m/s to put our Kerbin periapsis at 70km (just above the atmosphere), and burn the rest of our ∆v there. For a 500m/s total ∆v, this boosts our hyperbolic excess velocity from 670.1m/s (when expended at Minmus orbits) to 1294.8m/s when diving first and spending the remaining ∆v near Kerbin. This is the case for all trajectories to other planets.
-
The orbits of Minmus has an inclination of 6°. Ideally, we want to launch in this orbital plane to avoid plane-change maneuvers. Launching into a 6° inclined orbits can be done from launch sites with a latitude of less than 6°, i.e. the Kerbal Space Center. The Longitude of the ascending node of Minmus’s orbits is 78°. So we can either launch slightly northbound when KSC passes 78° right ascension, or slightly southwards when KSC passes 258°. In-game, it’s not easy to read out the current right ascension. We can, however see the Longitude of the Ascending Node (LAN) of our current orbits in the second orbital info pane:
Since KSC is in the southern hemisphere, our current position is 90° before our ascending node. In other words: launch slightly south (97°) when LAN reads 348°, or slightly north (83°) when LAN reads 168°. You need to eyeball these directions, especially at the beginning of the launch, when mostly vertical, where the Heading-indicator is very sensitive. I do my gravity turns to the right. In that case, you can align the 90° line on the navball with the longer tick mark of the G-meter for 83° departures. 97° departures should aim for the letter G in the G-meter.
-
Launch windows for the first few years:
Departure Date | Arrival Date | Destination | ∆v (m/s) |
---|---|---|---|
Y1 D98 | Y1 D64 | Moho | 5165 |
Y1 D196 | Y4 D138 | Jool | 5043 |
Y1 D231 | Y2 D75 | Duna | 1678 |
Y1 D242 | Y6 D227 | Eeloo | 3635 |
Y1 D269 | Y1 D405 | Moho | 5031 |
Y1 D390 | Y3 D93 | Dres | 3526 |
Y2 D86 | Y2 D243 | Moho | 4833 |
Y2 D160 | Y2 D357 | Eve | 2741 |
Y2 D242 | Y5 D304 | Jool | 4978 |
Y2 D245 | Y2 D386 | Moho | 5242 |
Y2 D257 | Y7 D20 | Eeloo | 3556 |
Y2 D393 | Y3 D86 | Moho | 5748 |
Y3 D83 | Y3 D225 | Moho | 4481 |
Y3 D120 | Y4 D283 | Dres | 3072 |
Y3 D270 | Y7 D63 | Eeloo | 3644 |
Y3 D275 | Y6 D216 | Jool | 4902 |
Y3 D305 | Y4 D160 | Duna | 1645 |
Y3 D366 | Y4 D63 | Moho | 5695 |
Y3 D401 | Y4 D162 | Eve | 2560 |
Y4 D84 | Y4 D207 | Moho | 4179 |
Y4 D226 | Y6 D108 | Dres | 3348 |
Y4 D289 | Y5 D40 | Moho | 5383 |
Y4 D294 | Y7 D365 | Eeloo | 3943 |
Y4 D306 | Y7 D159 | Jool | 4976 |