Kerbal Space Program

Kerbal Space Program

Not enough ratings
Docking maneuver done right
By Unheil
This tutorial will explain how to reliably dock two vessels in vanilla KSP. It's a step by step instruction to the fundamentals of correctly aligning and steering towards another vessel's docking port without the need to guess or use intuition. Using the steps explained here (and a minimum of practice), docking will loose its horrors and become one of the easier things to do in KSP.
   
Award
Favorite
Favorited
Unfavorite
Preface
I've seen some docking tutorials on Youtube and Steam that basically rely on "feeling", "intuition" or whatever you might call a well trained skill for three dimensional perception and ship handling on a 2D screen.

However, when it comes to docking I think relying purely on estimations and intuition is bad style, even for Kerbonauts - and you will certainly agree when you try career mode on ultra hard and crashed your first ships together. ;)

So, I wanted to show a way of docking that is a bit more reproducible in terms of using instruments (the navball), knowing what keybind is used for what translation direction (camera locking), and having a generic procedure to follow. With that, docking becomes fairly easy and I don't even bother using docking mode, tho' it either doesn't harm in any way.
Prerequisites
To follow this tutorial it is required that you are able to handle basic KSP game mechanics, like understanding prograde and retrograde vectors or setting up a ship with properly aligned RCS thrusters. This tutorial starts after a successful rendez-vous maneuver, so if you need help with that, check tutorials on that topic first and come back here when you succeeded.

Before starting a docking procedure, some preparations need to be made. I assume you plan to control and steer one vessel, typically (but not necessarily) the lighter and more agile one, to another ("stationary") vessel.

Make sure to check the following points:
  1. You have two vessels that are able to dock, i.e. have same size docking ports and can stabilize their rotation.
  2. Your non-stationary (docking) vessel has properly aligned RCS thrusters, so you can translate using RCS without inducing much spin, and without using high amounts of monopropellant to stabilize using SAS.
  3. You have successfully finished a rendez-vous maneuver in space. This tutorial does not cover rendez-vous and also does not cover docking under gravitation.
  4. I assume your vessels are within a range where you can clearly see both docking ports, i.e. somewhere below 100m. The closer, the better.
  5. The relative speed of both vessels must be zero.
  6. Your vessel is on the correct side of the stationary vessel, so you have a direct line ov view between the docking ports.
  7. The stationary vessel must not rotate. It can be helpful to switch to the stationary vessel and activate SAS and/or RCS to hold it stable. If you need to conserve ressources, you might want to turn SAS and/or RCS off when the vessel has stabilized. However, when equipped with enough reaction wheels and electrical power, you can leave SAS on.
  8. All fragile equipment, i.e. solar panels and antennas, between and around both docking ports is retracted.
Preparation: Port alignment and camera set-up
The first step to successful docking is a proper camera set-up and port alignment. To do so, follow these steps:
  1. First, select the target docking port on the stationary vessel and choose "select target" from the context menu. This will place a well visible target marker on the port and also (and more importantly) sets the target indicator on the navball to that port.
  2. Select the docking port that you want to dock with on your controlled vessel and choose "control from here". This will change your "forward" direction of the vessel in direction away from the docking port. This is an extremely important step, as it really changes all keybinds to reflect this new forward direction, and also affects the navball and distance calculations, so do not leave it out.
  3. Now, turn your vessel (just rotate!) so that the docking ports align (roughly) in parallel. That DOES NOT (necessarily) mean that the docking ports face each other in a direct line. It simply means that the ports' docking rings are parallel to each other. Move your camera away and around both ships to control the ports look parallel from all sides. It's not necessary to have it perfect, but do it as good as you can.
  4. After parallel alignment, hit "v" to switch camera mode until you are in "locked" mode. In this mode, the camera is exactly aligned to your docking port, so "up" on the screen is up on your vessel, etc.
  5. Turn the camera to look from behind the docking port (in direction "foward" with the port).

Doing the dock
Now that you've all set up nicely, docking becomes quite an easy task, basically you simply need to translate the already aligned docking ports towards each other. Since the alignment is already done, there is no need to rotate any more, which removes a lot of complexity.

To translate your ship corretly, simply follow these steps:
  1. RCS and SAS on.
  2. Check for the direction to the target. If you already see the target marker on the navball, use it. If the target is too far away, simply orient on the sceen with the correctly aligned camera ("locked" mode and looking from behind).
  3. Use J (left), L (right), I (down), K (up) to translate sidewards towards the target.
  4. Use H (forward) and N (backwards) to translate foward or reduce fwd. speed.
  5. Keep speed low, I suggest staying below 0.5 m/s first (use time warp if necessary), but you can go much quicker with only little practice.
  6. Now that you are moving roughly towards the target, check the navball. As soon as the target marker appears (if not already there):
    • Use translation keys to bring your prograde marker a bit beyond the target marker (to it's edge on the opposite side to the navball center). You can move the prograde like a cursor with JKLI keys. Also try H/N and check speed.
    • Contiuously keep track of the target marker with the translation keys. When the target comes closer, the markers drift apart (as you probably will have some "sideways" vector). Keeping the markers together will reduce sideways translation when getting closer. Ideally, you want to reduce the distance of the markers to zero when they hit the navball center.
    • fwd/aft translation will move the marker on a straight line to/from the center of the navball.
  7. Continue until docked. The ship might shake in the magnetic pull of the docking ports. If you're slowly approaching you might want to turn off SAS and let the magnets do their magic.



Why "beyond" the marker?
Especially when being positioned very "sidewards" of the target port, Instead of putting the prograde marker directly to the target marker, go a little beyond. This will bring your ship on a route missing the target port in some distance. However, bringing the markers together during the approach will slowly remove your sideways movement. With this technique you will fly a nicely curved path from the side into the front of the target port, making the maneuver more reliable.

Dealing with problems
With this routine and a little bit of practice, docking can quickly become a non-issue. However, especially in the beginning, you might encounter some problems, some of which I will address here:

First of all, any vessel rotation during the translation phase is likely to prevent you from successfully docking. So make very sure that both vessels are stable, SAS active on the target if possible, and don't touch WSAD keys (if it's not for purely intended correctional purposes).

Related to that is misaligned RCS thrusters. If your RCS is not properly aligned, using the translation keys will result in spinning. Partly, this can be encountered by SAS and reaction wheels, or by RCS+SAS using high amounts of monopropellant. So, as a rule of thumb, during your ship design better use two full sets of RCS thrusters. That means you have at least eight(!) four-way RCS nozzles, four of them on the top and four on the bottom of a rocket/ship, with the center of mass well in the middle of these two sets. Also check center of mass with full and empty tanks. If they deviate too much, guess the fuel status that you are likely to have while docking and optimize your thruster positioning for that.

If you're low on RCS fuel during docking, remember that fuel is for speed, not for distance. So, you can simply take a slow approach and conserve fuel. However, if you constantly waste RCS due to wobbling/shaking, check your ship design and maybe use struts.

With extremely low approach speeds (like 0.1 m/s) and long distances (several hunded meters), you might encounter orbital drift. That means you directly aim for the target vector, but finally will not hit. That is due to slightly different orbits caused by slightly different velocities. So, taking a very long approach time into account (maybe going halfway around the planet or more), ships might drift apart. So, do not over-do RCS conservation and time warp.

Too high speeds and too steep approach vectors might cause docking to fail as the magnetic drag of the ports might not suffice then (or you bounce off, or simply explode). Avoid steep approach vectors (docking sideways), and remember to aim beyond.

Last but not least, bad initial port alignment (not parallel) can become an issue. Double check and if necessary correct any time. For beginners it might be helpful to stop translation (move prograde marker to center of navball and hit N until zero speed) and re-align, then continue approach.

Oh, and... Hail The Kraken!
Summary and check list
Here's all of the above put together in two brief check lists:

Preparation:
  • <100m to target
  • realtive speed 0.0 m/s
  • zero rotation on target vessel
  • position on the correct side for docking
  • ports aligned to be parallel
  • equipment retracted
  • "control from here" and "select target" selected on the ports
  • camera in locked mode and positioned behind the own docking port / ship

Maneuver:
  • RCS, SAS on
  • translate roughly towards target using aligned camera
  • use navball as soon as target marker visible
  • use translate keys to position prograde marker slightly beyond target marker (at the edge of the target marker)
  • continuously translate, align markers tighter when approaching towards the navball center
  • (optional) turn SAS off when in magnet range


4 Comments
Unheil  [author] Jan 17, 2023 @ 4:06am 
(2/2) Also, for good reason I said and showed pictures on why to NOT put the markers perfectly on each others - this works only well if alrady having the ports already in line. Then, telling beginners in a guide to simply "correct your translational position until SAS has you pointed in line with the target, then begin your approach" is not helpful, as it does not explain how to achieve that. Putting the marker a bit BEYOND the target actually corrects the translational position and lets you fly a nice curve towards the target if coming in sidewards, otherwise it's not necessary but doesn't harm either.
Unheil  [author] Jan 17, 2023 @ 4:03am 
(1/2) @brian.mathew.richer, I had some issues with your method, as it did not always work for me. Sometimes the vessels got into "swinging" trying to (over-)compensate the movement of each other, sometimes SAS is not allowing to track a target dependent on the SAS module installed or the pilot level (you need HEC2 or higher, or a level 3+ pilot). However, eyeballing the ports to be parallel always worked for me and takes like 10 or 20 seconds.
brian.mathew.richer Jan 16, 2023 @ 3:55pm 
There's another good beginner method that involves taking both craft and setting their SAS to "Target" This takes alignment out of the equation and all you have to do is control your approach speed and make sure the yellow circle stays on the pink circle. If the target is a hard to rotate station, doing the same method only from your shuttle will still give most of the same benefits. Correct your translational position until SAS has you pointed in line with the target, then begin your approach.
Sphinx Jan 15, 2023 @ 1:18pm 
nice