Wednesday, 22 May 2013

Custom Flags in Kerbal Space Program

Since Kerbal Space Program 0.20 was released, it has been possible to create custom flags! Here is a guide on how to get your custom flag into Kerbal:

You can either use an existing image flag created by someone else, or create your own. To create your own in Photoshop, open a new document with 256 pixels width and 160 pixels height.

Create a 256 x 160 px image
Next, apply whatever graphics you want to grace your magestic flag. In this case, an NS2 Onos staring down a soon-to-be-munched Marine:

Now there's something you don't see every day
Kerbal Space Program flags are Portable Network Graphics (PNG) files, so save the flag in PNG format. Then, navigate to the Kerbal Space Program flag directory. In my case this is:

E:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\GameData\Squad\Flags

Replace "E" with whatever drive you have installed Kerbal on. If Kerbal is installed outside Steam, this path will be different. No matter where Kerbal is, the important part is \GameData\Squad\Flags. Drop the newly minted flag in there!

UWE flags sitting with the defaults
Now, start Kerbal Space Program. If the game is already running, it will need to be restarted after adding new flags.

Unknown Worlds flags ready to conquer some... Unknown Worlds
The custom flags inserted into the \flags directory will now be available in all flag selection screens. Here is a download link to the UWE flags used in this tutorial: https://www.dropbox.com/sh/hj1o0wx16xk94g5/KGE0jpAA4V

Thursday, 16 May 2013

Station 400 P5: Docking Boom & Lighting Array

Part One | Two | Three | Four

After a construction hiatus in Part Four, it was time to resume cobbling together my giant orbital launchpad: Station 400.

The docking boom launch vehicle rises into the morning sky, Mun in background
The next component was to be a docking boom that would allow multiple craft to dock clear of the station hull. The boom was launched using my tried-and-tested triple-booster launch system, but it did see the debut of a new 'tug' design, carrying about 80% more fuel than the previous model.

Transferring fuel between tanks after burning to chase down Station 400
The impetus for the new design was the realisation that tugs were arriving at Station 400 with only about one third of their fuel remaining, even when carrying light loads. Their ability to perform Mun-and-back missions with medium sized payloads was questionable.

Unfortunately, the first of these new tugs suffered from the misalignment of the three fuel pipes connecting the outer booster tanks to the main tank. Thankfully, fuel could be transferred in orbit through the structural pylons.

Tug maneuvering docking boom on approach to Station 400
Previous trips to Station 400 had required sunlight for docking. I did not want future missions to be beholden to the time of launch hence, 'Tug Mk III' also features added docking lights near the payload docking port.

Tug Mk III illuminating the dark side of Station 400 with on-board lights
Unlike the tug used to attach the spar section in part two, the docking boom tug did not feature a bow Reaction Control System section. This meant the docking procedure was a 'line it up and drive it forwards' affair - The imbalance of having the payload forward of all RCS ports meant translation maneuvers  were not an option.
Docking boom attached to Station 400 at top, with tug still docked
Despite this restriction, docking was a success and the number of ports available for visiting craft was doubled.
Lighting boom launch vehicle at liftoff - The triple-booster design
While having lighting on the tugs was clearly a big step forward, approaching Station 400 in the dark was still going to be tricky. Unless the tug was looking straight at the station hull, the darkness would make accurate visual approaches nearly impossible. Therefore, Station 400 needed a way to light itself up for oncoming craft: Enter the lighting tower.

Tug 'Mk IIIb' now with an extra RCS fuel tank
Tug Mk III was good, but I felt it was a little short on RCS monopropellant to be truly dependable and flexible. For the lighting boom mission, it featured an added RCS fuel tank below the payload docking port. Let us call it Tug Mk IIIb - Because lots of names means lots of fun!

Tug Mk III lighting up Station 400 on approach
Docking the lighting tower was a similar affair to the docking boom mission - The lack of forward RCS thrusters meant it was essential to line the payload up and move it in forwards.

Lighting tower only metres from its new home
The connection was made without a hitch, and the lighting tower was in position. Unfortunately, I had made a poor design decision. Separator rings disconnect craft without applying force. Theoretically, that makes them good in docking situations, where one does not want any sudden movements. Unlike decoupler rings, they do not stay connected to their host craft upon activation. That meant that when I disconnected the lighting tower from the tug, I was left with a floating piece of debris.

Separation ring floating just in front of the newly installed lighting tower
No dead Kerbals, and no debris. Those are my rules. Debris makes navigation difficult - Both by cluttering the map and creating the risk of collisions. It is also just not 'nice.' So, I set about trying to nudge the debris away from Station 400 with the tug.

Tug Mk III with debris piece, Station 400 in the background
The effort was only partially successful. Having lined up the debris piece, I flew the tug toward it and managed to snag it on the nose. There is stayed for a time, and in that time I managed to move it about two kilometres away from Station 400. At that point, it slipped off and smashed through the tug's port solar array, destroying it. After an extended period of trying to reacquire the debris, the tug ran out of RCS mono-propellant.

Tug Mk IIIb re-enters the atmosphere before disintegrating on splashdown
Rather than risk creating another much bigger piece of debris, I directed the damaged tug to burn retrograde for a destructive re-entry. The debris piece would have to be captured by a purpose built craft in a future mission.

The lighting tower illuminates the dark side of Station 400
The lighting tower performed as intended, casting a soft light over the station hull. One day, a second tower on the other side of the station will complete the nexus joint in the centre of the spar piece.

Wednesday, 15 May 2013

Station 400 Part Four: Munshot


What is the point of having a space station 400 kilometres above a planet if you do not use it for anything fun? After several 'construction' missions in parts 1, 2, and 3 - It was time for Station 400 to do something useful.

S-PLS launches at sunrise
Enter the Small Probe Launch System, or S-PLS. This small(er) rocket is designed to lift a small probe to a 400km orbit, where a rendezvous with Station 400 may be made The rocket is excessively powerful for this task, as one of the essential design parameters was that it leave no debris in orbit after a launch.

That is no problem for the first and second stages. With a careful (though not terribly efficient) launch vector, they can be left to fall back to the planet surface by themselves. The third stage must however be capable of burning the probe into high orbit, and de-orbiting itself for burn up in the atmosphere.

Third stage separation - A small rocket motor, fuel tank, and the probe itself
The purpose of this S-PLS mission is twofold: 1. Put a probe into orbit around the Mun, as a precursor to future missions. 2. Free up a docking port on Station 400 for the attachment of further structural elements.

S-PLS on approach to Station 400
It is possible that the S-PLS launch system could propel a small probe into comfortable Mun orbit. But is highly unlikely that it could do so without leaving debris in orbit. There are two things that Station 400 avoids: Space debris, and dead Kerbals. So instead of reaching for the Mun with the launch system, the probe (let's call it 'Mun-1' would use an existing 'tug' as its inter-body motor.

The Station 400 core 'tug' undocks from the station
The 'tug' in question positioned the station core in orbit way back in part one. It is a fully self-contained robotic vehicle, over-engineered for its original task so that it could perform flexible mission roles in future. After separating from the station, the tug had to be flown to rendezvous with S-PLS - which was holding 1km away.

A lack of mono-propellant fuel made the rendezvous harder
Unfortunately I failed to switch my brain on before separating the tug. The mono-propellant fuel tanks were almost completely empty, which meant little room to maneuver with the Reaction Control System (RCS) on approach to S-PLS. Of course, the enormous tanks on-board Station 400 are completely full!

Separating S-PLS stage 3 from Mun-1
As the tug closed within one hundred metres, the stage three motor was separated from Mun-1. Note that while it is able to fly by itself, it does not feature solar panels, batteries, or other systems necessary for extended operation.

S-PLS stage 3 burns retrograde for destructive re-entry.
The reason for the lack of systems is that it is intended to be able to fly itself for only one purpose: Destructive re-entry. Having separated from Mun-1, its motor burnt through remaining fuel, sending it plummeting towards the surface of Kerbin.

Tense moments as the tug approaches Mun-1
Given the lack of mono-propellant available to the tug, docking with Mun-1 was truly a 'one shot' proposition. While the approach was not fantastic, it was successful!

Tug docked to Mun-1, Station 400 in the background
With the two craft connected, the burn to Mun could begin.

Tug engine firing towards Mun, with Station 400 in the foreground
Achieving rendezvous with Mun meant burning into its path, close enough for its gravity to exert an effect on Mun-1. Once that effect was felt, an 'encounter' had begun.

Plotting burns to enter a stable orbit around Mun
By burning retrograde relative to the path of the encounter, Mun-1 could be slowed enough to enter a stable orbit.

Mun-1 separates from the tug
Once in orbit, Mun-1 was detached from the tug. Note the use of a separator ring at the tip of the nose cone. The system was designed to leave no waste in space.

Tug firing pro-grade before terminal impact with Mun
Having performed its duties, the tug could be destroyed via impact with Mun's surface. First a retrograde burn zero'd its orbital velocity, then a pro-grade burn accelerated it towards the target point. Speed at impact was over 2,000ms relative to Mun's surface.

Mun-1 deploys instruments
The mission was a complete success. Mun-1 is now in orbit around Mun, having made use of spare motors connected to Station 400. This is exactly the kind of mission I hope to replicate on a much larger scale using the station.

Sunday, 7 April 2013

Station 400 Part Three: Spar

 
Constructing a Kerbal station requires joints at which heavy components come together. These joints are crucial - If they are weak, the station may come apart during an imbalanced RCS maneuver or heavier-than-planned docking impact.
 

A node joint attached to Station 400
Initially, Station 400 received a simple node joint on the bow docking port. Upon reflection, I decided that such a simple joint was probably not as structurally sound as it could be. Station construction could also be sped up by launching a larger piece.
 
Liftoff of the bow spar with four main engines and eight boosters
The bow spar of Station 400 is almost twice as heavy and more than twice as long as the core section. This necessitated a large and complex launch vehicle. The spar runs the full length of the vehicle with a small 'tug' third stage motor to maneuver it during docking. The tug features a full RCS, complemented by RCS ports on a nose-cone section.
 
Failure of a component of the bow-spar lead to the breakup of the launch vehicle
The initial launch of the bow-spar was a disaster. Exhaust from separation motors placed to bring the main engines clear of the payload caused a living-quarters component to explode, and the entire vehicle to disintegrate before reaching orbit. Luckily, the whole thing was being flown by a drone, not a Kerbal!
 
Successful separation of the main engines on second attempt
After adjusting the position of the separation motors, the spar was successfully launched. The launch vehicle features a very odd solid rocket booster configuration attached to the bow component of the tug. Because the spar is shaped awkwardly, tall, and full of heavy fuel it is very hard to get much angle on the launch trajectory without making the launch vehicle unstable in the atmosphere.
 
The tug firing solid rocket boosters to chase down Station 400
The solution was to add more delta-v capability to the tug. But its own engine was not very powerful, and a larger one added too much weight. Further complicating matters, there was no room on the base of the tug for boosters: All the surface area was taken up by the main engine attachment points, RCS ports and fuel tanks, batteries and auxiliary solar panels.
 
 
Tug engine firing to close distance with Station 400
The system was awkward and unintuitive, but worked very well. The spent boosters jettisoned cleanly and the approach to the station began. As the new bow-spar neared, it was necessary to detach the smaller node-joint attached earlier to clear the bow docking port.
 
RCS firing to separate node from the station
This activity provided an excuse to create a light show, as the joint and its tug re-entered Kerbin's atmosphere.
 
Node joint re-entering the atmosphere after separation
With the bow docking port clear, the spar could begin final approach. The bow/stern tug system worked brilliantly. The stern section of the tug featured a full RCS, deactivating the forward ports created a very well balanced spacecraft. With RCS ports on the extreme ends of the heavy, unwieldy spar, the whole maneuver was easier than that of docking the MCAEV1 earlier.
 
Bow-spar lining up for docking with Station 400 - Note bow/stern tug configuration
Aligning Station 400 along a North/South axis and engaging the autopilot to hold it there made the docking process significantly easier. Such an alignment means the station does not rotate along the x-axis as it orbits the planet.

Less than 100m separating two large heavy objects travelling 1,800m/s at an altitude of 400km

Despite the effectiveness of the bow/stern tug, the docking was still difficult. It was not a simple process of aligning the docking ports, the spar also needed to be aligned on the correct angle with the rest of the station.
 
The bow-spar connected to the station
The above picture clearly shows the bow/stern tug connected on the left and right ides of the spar structure. They will eventually be disconnected to make room for more components. The spar itself features two large fuel tanks, 'living' space for eight Kerbals, RCS tanks and a node joint re-enforced with structural links. The core-tug remains docked to the aft core docking port and an MCAEV1 to the dorsal small docking port.
 
View from core cockpit out over the starboard side of the newly attached spar
The re-enforced node joint became immediately useful when I accidentally throttled up the tug engine after docking. The core and spar flexed against each other, but the spar did not flex at all. With living space now available on the station, there was also an opportunity for a bit of a spacewalk:
 
Space-suite lights illuminating the dark site of the station

Until the connection of the bow-spar, the above Kerbal had been sitting in the MCAEV1 cockpit. Relocating him to the spar provided an excuse to fly around the station using his Extra-Vehicular-Activity suit! Look out for part-four soon.


Saturday, 6 April 2013

Station 400 Part Two: Test Rendezvous


A space station needs a name. As this station is designed as a base for future missions, and it is 400km above Kerbin's surface, I settled on the name Station 400. Having successfully launched the core of Station 400, it was time to test docking.

The 'MCAEV1' sits on the Kerbin launch pad
The vehicle for that task was to be a very simple single-Kerbal craft. In grandiose space program style, it is called the Manned Controlled Atmospheric Entry Vehicle 1 - MCAEV1. Further acronyms shall be developed in a concerted effort to confuse readers and myself.

Liftoff with primary engine and eight boosters firing
 Kerbal Space Program suffers from a fundamental inequality:


That is, the time one could take to explore all of KSP's sandbox possibilities does not equal the time left after subtracting 'In Real Life' stuff, like work and sleep. Therefore it is important to maximise the value of all time spent playing KSP, so as to explore as much of it as possible.

After separation of boosters, MCAEV1 continues on main engine power
That fundamental inequality is why MCAEV1 is the first vehicle to dock with Station 400. It would have been easier and simpler to send a simple disposable drone craft into orbit to test docking. But doing so would not have allowed for this spectacular lightshow:

Re-entry of an earlier MCAEV1 test-flight
The initial launch of MCAEV1 was a failure. A staging error meant that main engine separation occurred far too early in the ascent, and the vehicle did not have sufficient power to reach a 400km orbit. This presented the opportunity to conduct the above atmospheric re-entry test, and proves the adage that making all missions multi-purpose and versatile will improve your overall KSP experience.

Cockpit view during initial ascent 
Achieving a 400km orbit with MCAEV1 proved very easy once the staging error of the first flight was corrected. The launch vehicle was tremendously powerful, if not particularly efficient. Like the core, MCAEV1 used a 'tug' third stage to position it in the correct orbit after main-engine separation.

Third stage: 'tug' firing away from the main engine
Unlike the core, MCAEV1's tug featured no Reaction Control System (RCS) and no independent control. Both systems were provided by the re-entry vehicle. After the 400km orbit was achieved, I came to regret this design decision.

Separation from the 'tug' for approach to Station 400
Because the 'tug' could not be independently controlled, it simply sat in orbit after separation. There is no way for it to be de-orbited, which means there is a piece of space junk floating around near the station. Sometimes, their orbits come within two kilometres of each other. Future launches to the station will feature de-orbit systems for all stages, to minimise the build up of space junk around Kerbin.

Final approach to Station 400, note the nav-ball indicators
Final approach in MCAEV1 proved more difficult that expected. The craft has a full RCS, but weighs almost nothing. That made it very twitchy. To make the situation worse, my skills with the precise docking control system were rusty, and I had to revert to the orbital control system.

Station solar panels retracting as MCAEV 1 nears
Station 400's core features two small dorsal/ventral docking ports, and it was the dorsal port for which MCAEV1 was destined. Due to my erratic RCS adjustments, I retracted the solar panels to minimise the risk of collision. KSP's 'permadeath' system makes final docking approaches nailbiting and exciting experiences.

RCS firing to adjust for drift along the x-axis during final approach
As the docking collars edged ever closer, it became apparent that Station 400 would need a lighting system to assist rendezvous in the shadow of Kerbin. Luckily, this manoeuvre was performed in bright sunlight.

Docking complete, solar panels re-deploy.
After a successful docking test, it is time to add more components to the station and begin growing it into a real multi-mission platform. Thingy. Look out for that in part three!