Thursday, 29 August 2013

The Final Frontier: Fake Space, Part 2: Orbital Boogaloo


[If you haven't read the first part of "The Final Frontier: Fake Space", this probably won't make much sense.]

Jebediah Kerman just couldn't stay awake.  He tried to keep his head up, but his eyelids felt like they were made of lead.  He couldn't help it; he allowed himself a yawn, hoping it would go unnoticed.

"Mr Kerman!" Jebediah's focus snapped to the angry Professor as he thwacked his cane against the desk.  "Finding my lecture about space a tad boring, are we?  You could do with paying attention more than most.  Your last three Ballistic High Jumps have been pathetic, barely touching 20 kilometres.  Shape up soon or you're off the Program!"  He paused, exasperated.  "That's enough for today.  Class dismissed."


Jebediah left, shunning the other cadets.  It was three weeks since Jedgan Kerman's disappearance, and talk about it had subsided.  Most had decided he must have landed on the other side of Kerbin, probably to abscond to a tropical island.  Somehow, Jebediah's gut told him this wasn't true, that Jedgan had gone up and not come down.  It kept him up at night, the idea that the Outer Space High Jumps could somehow break the rules his teachers were so certain about.  The ancient Kerbal texts mentioned something called "orbit", which became a catalyst for his obsessions.  He had a theory that if he angled his ship a certain way, he might find a way to make his Jump go on forever; these experiments however, had resulted in what were considered sub-par attempts.  The potential humiliation of being wrong stopped him from communicating these theories, but nevertheless he was determined to discover the secret... of "orbit".

Houston, we have a problem: this rocket sucks balls.
Enough of that nonsense (for now).  In this post I'll be talking about how I approached the challenge of getting into orbit in Kerbal Space Program.  The game features some excellent tutorials, including one on how to fly your spaceship once you are actually in orbit, but is rather reticent in terms of how to get into orbit.  As you might expect, the internet came to my rescue, in the form of a detailed wiki and a useful YouTube video.  I absorbed this information, but in the spirit of creativity, designed the Orbitron I according to my own ideas of what constituted an orbit-worthy rocket.  I soon discovered that my trio of solid boosters, while powerful, made the rocket too unstable for precise adjustments in mid-flight.  Reluctantly, I discarded the boosters in favour of the fuel tanks and engines suggested on the wiki page I'd found.

Almost perfect... maybe add some wings?
So I built this 2-stage rocket featuring what seemed like ridiculously tiny fuel tanks and piddling engines; I couldn't really believe it would get off the ground, but the wiki begged to differ.  It felt a bit dirty just making my rocket according to someone else's designs, but at least it would fly straight, right?  ...It did not fly straight.  Can anyone guess why?  It's that white rectangle attached to the side of the command pod at the top of the rocket, a parachute module I'd started using in some of the later Rocket-A-Matic's - and it was pulling my rocket's nose off-course, despite barely weighing anything.  It was at this point that I realised that the game's "symmetry" button wasn't just there to simplify the attachment of way too many solid boosters; symmetry keeps your craft pointing in a straight line, and without it, this happens.
Asymmetry = having a bad time, basically.

The blue line is the trajectory,
featuring a small arrow marking the"apoapsis".
I replaced my ill-advised side-mounted parachute with a different one on the pod's nose and took another swing at getting Jeremiah Kerman into orbit.  The first step is to fly directly upwards until the ship reaches between 9,000-10,000 metres - which with the previous flawed design was almost impossible, with my rocket insisting on doing loop-de-loops.  With my balanced, symmetrical Orbitron III, however, this was no problem and I graduated to step 2: gradually tilt 45 degrees East.  In order to do this, I had to familiarise myself with the interface's blue-and-orange "Navball", which with a bit of practice and concentration can be used to delicately change which direction the rocket heads in.

If you're a fellow Kerbalnaut, the game's tutorials explain this much better than I ever could, but for you non-rocketeers, things are about to get rather technical, so please bear with me: the direction your rocket is travelling in is referred to as "prograde", while the opposite direction is called "retrograde"; each is represented by a symbol on the Navball.  Once I have the rocket pointing 45 degrees East, it's generally a good idea to switch to the map screen (pictured above).  In this mode, time still passes and you control the ship as normal - this is why the Navball is so important, as it allows you to fly your rocket without looking at it up close.  At this point, another intimidating term comes into play: the rocket's "apoapsis" - the highest altitude point of your trajectory (think "apex", for short).  As the rocket accelerates, the apoapsis increases, which I can observe by hovering the mouse over the arrow marking the apoapsis.  Once this number gets above 70,000m (at which point Jeremiah will officially be "in space"), it's time to throttle down and let the ship coast towards its apoapsis (if I keep saying it, you'll understand, right?)  Once the rocket's almost there, I change the heading to due East, so another 45 degrees, and turn the engine all the way up again.  It's at this point that something cool starts happening, something that made me feel for the first time like I knew what I was doing in this game.

It may not look much, but this was a fairly
awesome moment.
What happens is this: the blue line gradually starts to become a circle.  The end of that line marked the predicted end of the rocket's flight, either splashing down in the sea or coming to a bumpy stop on land.  But as I accelerate prograde (East), that end point gets closer and closer to the edge of the planet's horizon, and eventually goes all the way around so that there is no starting point and no ending point.  This gives birth to another confusing term: once your trajectory is a circle, it has a "periapsis", the lowest altitude height.  As you can see here, the circle is not quite complete: this is because the periapsis is lower than 70km, which means that the ship will re-enter the planet's atmosphere, which will slow it down until starts to drop back down.  My brave Kerbalnaut Jeremiah is not technically in orbit until the periapsis is high enough to avoid this fate, and to solve this problem you simply accelerate prograde (still East) while on or near the apoapsis; as you burn fuel at the highest point, the lowest point gets higher and higher.  Once both are above 70km, he is officially in orbit.

My heart skipped a beat the first time I raised the periapsis to above the height of the apoapsis, because the game expressed this by spinning the arrows around the blue circle, giving me the impression that I was losing control of my trajectory - until I realised that what had happened was the periapsis had become the apoapsis.  Before long, I felt more confident in manipulating a spacecraft in orbit, and playing around with the apoapsis and periapsis using the techniques described above.  This experimentation turned out to be overambitious, as Jebediah suddenly ran out of fuel.  In order to make his return journey, he needed me to accelerate retrograde (slow the rocket down, basically) while near the apoapsis, thereby lowering the periapsis and turning the circle back into a curved line.  With no fuel left, Jebediah will suffer a similar fate to his comrade Jedgan Kerman, drifting endlessly around the planet Kerbin, so close to home and yet so far.

 Playing this game is a constant learning process - in this case I learned to leave some fuel in the tank - but more importantly I learned how to get into orbit, the first leg in my road of discovery with Kerbal Space Program.  In the next edition of "The Final Frontier: Fake Space", I will be aiming my sights a bit farther, and try to get a spaceship in orbit around the Mun.

1 comment:

  1. I really really want Jebediah to succeed, he reminds me of a young me.

    ReplyDelete