Difference between revisions of "Tutorial:How to Play"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Posting the start of my tutorial on how to play the game. It's very long, so I'm breaking it into multiple edits.)
 
(Added another section)
Line 166: Line 166:
  
 
Personally, I don't find them useful.  They work, but you can also make things precise enough for docking by other means, without needing an additional type of fuel and additional engines.
 
Personally, I don't find them useful.  They work, but you can also make things precise enough for docking by other means, without needing an additional type of fuel and additional engines.
 +
 +
== Rotating ==
 +
 +
For most purposes, it isn't enough to just provide a lot of force.  You need to provide it in the right direction in order to get where you want to go.  With rockets, that typically means rotating the rocket such that it is pointing away from the direction in which you want to travel.  To do that, you'll need to be able to rotate your vehicle.  That's what this section is about.
 +
 +
=== Law of conservation of angular momentum ===
 +
 +
Linear velocity has an angular version, too.  We'll talk more about coordinate systems in a subsequent section, but your angular velocity is the rate at which your angle about something is changing.  Just as there is linear momentum, there is also angular momentum.  The angular momentum of an object about a point is the vector cross product of the distance from the point to the object and the momentum of the object.  The cross product is algebraically messy and unintuitive, so I won't define it here.
 +
 +
What is important about angular momentum is that it is conserved.  So long as there aren't any external torques applied, the sum of the angular momenta of a system about a fixed point is constant.  No external torques is a weaker condition than there being no external forces applied to the system; I'll explain the concept of torque shortly.  While conservation of momentum explains how rockets work and not much else of consequence in the game, conservation of angular momentum is an extremely important principle with broad consequences.
 +
 +
Conservation of angular momentum works with any object and any point.  In the limit as the point that you are rotating about becomes infinitely far away, it becomes equivalent to ordinary conservation of momentum.  Most combinations of an object and a point really aren't very illuminating--in part because there are external torques on the system.
 +
 +
There are two types of situations in the game where conservation of angular momentum is extremely consequential.  The more complicated and profound one is that of your rocket orbiting some celestial body, such as a planet or moon.  The object whose angular momentum we track is your rocket, and the point is the center of the planet or whatever it is that you're orbiting.  We'll need more terminology before we can make sense of that, so we'll get to it a little later.
 +
 +
The other situation where angular momentum is important is your rocket rotating about its center of mass.  The center of mass of an object is loosely the average position of mass in the object.  For a collection of point masses, it is computed as the (sum of (mass times position)) / (sum of masses).  For continuous, solid objects, you would technically want integrals instead of sums.
 +
 +
Some objects have a center of mass that is pretty simple by symmetry.  For example, the center of mass of a ball is at the center of the ball.  When building rockets, if you place everything with mirror symmetry in the spaceplane hangar, you're guaranteed that the center of mass will be somewhere in the plane that the mirror symmetry is symmetric about.  If you place everything with rotational symmetry in the vehicle assembly building, the center of mass will be somewhere on the vertical line through the center of the rocket.  Both buildings have an option to show you where your center of mass is.
 +
 +
One important thing to understand about the center of mass of an object is that when the object rotates while not being touched by anything else, it rotates about its center of mass.  Thus, in order to rotate your rocket at all, you're usually going to rotate it about the center of mass.
 +
 +
=== Reaction wheels ===
 +
 +
Reaction wheels probably look like magic if you don't know how they work.  The idea is that you're in deep space and not touching anything.  You want to rotate your rocket in a particular direction.  So you fire up the reaction wheels and rotate the entire rocket to exactly the direction you want.  And then you stop, and stay pointing in exactly the direction you wanted.  And it didn't require firing any rockets, but only using some electricity.  And that is actually a real thing.
 +
 +
The first reaction wheels were discovered accidentally.  Some space program had launched a satellite, and it was going along just as they expected.  Then when it started to transmit data back to Earth, it started rotating.  That was a nuisance, so they had to stop it and rotate it back to the intended direction, which wasted fuel.  Then when it started transmitting data again, it started rotating again.  This was rather baffling at first.
 +
 +
Eventually, they figured out what was happening.  When the satellite transmitted data, it rotated some tapes internally as part of the tape drives where it stored data.  In an appropriate reference frame, the satellite had zero net angular momentum before it started transmitting.  When rotating the tape wheels, those wheels had some angular momentum in some direction.  In order for the net angular momentum of the entire satellite to remain zero (as angular momentum is conserved), that caused the entire rest of the satellite to rotate slowly in the opposite direction.
 +
 +
Figuring that out was a huge advance for space rockets.  Instead of needing a bunch of small thrusters all over the place to make it possible to rotate your rocket in arbitrary directions, all that they needed was a few internal wheels.  Want to rotate the rocket in one direction?  Just rotate the wheels in the opposite direction.  Stop the wheels to stop the rocket from rotating.
 +
 +
There are three dedicated reaction wheels objects in the game, with three different radial sizes.  The game simplifies this for you somewhat by allowing all reaction wheels to rotate you in arbitrary directions, and much faster than real-life reaction wheels would tend to.  Furthermore, the game doesn't limit the cumulative torque that reaction wheels can provide, unlike the real-life versions that can only spin so fast.  But reaction wheels are a real thing, not just magic to make the game easier for you.
 +
 +
In addition to the dedicated reaction wheels, most of the pods in the game have some built-in reaction wheels.  These tend to be lower torque than dedicated reaction wheels, so other than for some very small vehicles, you'll typically want to add one or more dedicated reaction wheels.
 +
 +
=== Torque ===
 +
 +
Torque is basically the angular version of force.  Technically, the torque on an object about a particular point is the vector cross product of (the distance from the point about which you rotate to the point where the force is applied) with the force.  Thus, the torque depends not only on the force, but also on the point that you're computing the torque around.
 +
 +
For our purposes, there are again two useful choices for the point that you compute the torque about.  One is the center of mass of your rocket.  The other is the celestial body that you're orbiting.  We'll come back to the latter in a later section.  The torque about the center of mass of your rocket will rotate your rocket.
 +
 +
There are two important cases where the cross product is zero.  One is that cross product of zero with any other vector is always zero.  This means that zero force causes zero torque.  It also means that any force applied to the center of mass of an object applies zero torque to the object.
 +
 +
The other, broader situation is that the cross product of two parallel vectors is zero.  Thus, if the force applied is pointed right at the center of mass of an object, it causes zero net torque, and does not rotate the object.
 +
 +
There are five major sources of torque in the game other than reaction wheels.  They can be intentional or undesirable, but they will cause the rocket to rotate, so it's important to understand them.
 +
 +
==== Asymmetric rocket placement ====
 +
 +
First is if your rockets are placed asymmetrically.  A rocket engine that isn't pointed right at your center of mass will have some torque.  If you have another engine on the opposite side, it will cause the opposite torque.  These cancel out, for a net sum of zero torque.  That's usually what you want, so that you can avoid extra torque when you don't want it.
 +
 +
The vehicle assembly building and spaceplane hangar will both draw this for you.  You can show the sum of the forces, as well as the center of mass.  If the former is pointed right at the latter, you're fine, at least for a rocket.  Making everything use rotational symmetry will accomplish this for you.  For a plane, you want the sum of the forces to be pointed right at the center of mass in the horizontal direction, but possibly not quite in the vertical.
 +
 +
There are two ways to screw up the net force here.  One is if the rockets firing at a given time are placed asymmetrically.  This can happen because of the way that the rocket is built, with one engine not having others to balance it.  Even if the initial design is correct, it can happen if one engine is firing while the other(s) to balance it are not.  It can also happen if something goes awry and blows up some but not all of your engines.
 +
 +
The other way to mess this up is if your center of mass is off-center.  For example, if you stick one extra fuel tank off to one side without a counterpart on the other side, you can end up with a center of mass that is off to the side.  Then even if you properly pair all of your engines, the net force isn't pointing at the center of mass, and so the rocket still rotates.  To avoid this, you need all of your parts to be either paired with other, identical parts using the rotational symmetry tool, or else a single part actually on the center line of the rocket.
 +
 +
==== Engine gimbal ====
 +
 +
In addition to pointing their exhaust in the exact direction that they're facing, some engines can angle the nozzle off to the side.  This is something that can be adjusted from moment to moment, so that you can have the nozzle pointed to the side one moment when you want to turn and centered again a second later when you want to go straight.
 +
 +
Each engine has a maximum amount of gimbal.  Some engines can't gimbal at all, and the maximum angle for most of those that can is very small, such as two or three degrees.  A few engines have a very large gimbal angle, such as 10.5 degrees for the vector or 22.5 degrees for the cub--though the cub can only angle in one axis, not two.
 +
 +
Large gimbal can be handy sometimes, but excessively large gimbal can mean a lot of torque.  With SAS on, this can cause it to overshoot back and forth on angles until the entire ship shakes violently or even flies apart.  Fortunately, you can reduce the maximum gimbal of any rocket engine.  Sometimes it is handy to have a stage that mixes some engines with high gimbal with others with no gimbal at all so that you can still rotate at a decent rate.
 +
 +
==== Aerodynamics ====
 +
 +
Air resistance when in the lower atmosphere is another source of torque.  For planes, this is essential to make the plane fly at all.  For rockets, it's generally undesirable at take-off, but can be helpful to slow you down before landing.
 +
 +
While air resistance mostly slows you down in whatever direction you were going, it can also provide some torque.  Because it pushes so hard, a slight angular tilt can offer considerable torque.  In some cases, it can cause a rocket to flip over shortly after launch.
 +
 +
For a rocket of a fixed size and shape, there will be some amount of force applied to the rocket as it moves in any particular direction.  The force generally varies with the direction, and often by quite a lot.  A pancake moving with its wide face catching the wind will draw a lot of air resistance, for example, but the same shape will get much less if it moves in the direction of an edge.
 +
 +
The most stable direction for a rocket is whichever direction offers the least resistance.  For a long, narrow rocket, this will usually be either retrograde or prograde.  For a short, wide rocket, it can be moving on an edge.  If you're near the direction of minimum wind resistance, aerodynamics will often push you toward it.
 +
 +
There can be multiple local minima that are stable if you're near them.  Additionally, so long as the torque applied by aerodynamics is less than what you can apply with other sources (typically engine gimbal or reaction wheels), you can keep the rocket stable in the direction you want it to be facing.
 +
 +
Ultimately, aerodynamics is very complicated.  New players commonly have to figure out why their rocket is flipping over shortly after launch, and aerodynamics is the culprit.  It often helps to make your rocket have less drag when traveling in the direction you want to go, such as by using aerodynamic nose cones.  Sometimes you need more torque from other sources.  Occasionally, you just have to make the rocket go slower when in the lower atmosphere to keep it stable.
 +
 +
==== Collisions ====
 +
 +
If one object directly pushes on another, it can apply some torque to the other object.  Actually, both objects can apply some amount of torque to each other.  In one sense, this is obvious, and also the simplest example of torque.  But in another sense, it's fairly rare, as you typically don't collide with other objects when deep in space.
 +
 +
The main issue where collisions will spin your rocket around is when landing.  If the ground is uneven and one side of your rocket touches before the other, the ground will apply some torque to spin the rocket away from the side that touched first.  You can reduce this force considerably by touching down at a lower velocity.  It also helps a lot if you can find a level place to land, though this isn't always practical.
 +
 +
==== Rotors ====
 +
 +
The basic goal of a rotor is to apply some torque to rotate some small portion of the ship in one direction, such as helicopter blades.  But as angular momentum is conserved, this rotates the entire rest of your ship in the opposite direction, albeit usually much more slowly.  Even so, if you're reckless with rotors, they can easily cause you to spin out of control.
 +
 +
The solution to this is usually to have an even number of rotors, and spin them in opposite directions.  Thus, when some of them apply torque in one direction, others apply an equal amount of torque in the opposite direction.  The net effect is zero torque on the rest of your ship.
 +
 +
=== Inertia ===
 +
 +
Just mass is resistance to acceleration, so inertia is resistance to rotation.  The amount of angular acceleration of an object is the amount of torque divided by the moment of inertia about the axis that the torque is trying to rotate the object.  Importantly, the moment of inertia is not a single, fixed constant for a single object, but varies with the axis.  The axis of rotation always goes through the center of mass of the object.
 +
 +
Technically, the moment of inertia is the integral over space of the mass density of the object times the square of the distance from the axis of rotation.  You can think of it intuitively as the mass of the object times the square of the "average" distance of parts of the object from the axis of rotation.  It would be more proper to use the root mean square (which is greater than the average) rather than the average, but using the average is probably more intuitive and usually won't lead you too far astray.
 +
 +
One thing that is important to understand is that an object of fixed shape gets larger in all directions, the moment of inertia grows much faster than the mass.  Meanwhile, the aerodynamic forces on it grow proportionally to the cross-sectional surface area, and thus more slowly than the mass.  If you increase the size of the rocket in all dimensions by a factor of n, the aerodynamic forces (including torque) increase by a factor of n^2, the mass by a factor of n^3, and the moment of inertia by a factor of n^5.  That last one is n^3 for the mass times n^2 because the distance from the axis of rotation increases by a factor of n.
 +
 +
Thus, the angular acceleration due to aerodynamic forces decreases by a factor of n^3.  For example, make the rocket twice as big in all dimensions, and the angular acceleration due to aerodynamics will only be 1/8 as big as before.  This is why small rockets are prone to flipping, but a similar shape with a much larger rocket allows you to nearly ignore aerodynamics when taking off.
 +
 +
Another consequence of this is that big rockets are much harder to turn than small ones.  Small probes that only weigh a few tons can commonly spin very fast from the minor reaction wheels inside of a pod or probe core.  Giant stations with a mass of thousands of tons can take minutes to rotate to the direction you wanted, even with a number of dedicated reaction wheels.

Revision as of 22:22, 25 August 2020

Introduction

Welcome to my tutorial of Kerbal Space Program. This guide is targeted at version 1.10.1, which is the latest version as of this writing. It assumes the availability of all expansions, but no mods. Obviously, those can change the game a lot.

So why do we need yet another tutorial? There is a lot of good information out there, including but not limited to elsewhere on this wiki. For one, a lot of it is outdated by now. While this guide will presumably also be outdated someday, there is always a need for new information to update the old that has become obsolete.

But there are two things that I wanted to focus on that most guides don't. First, the lengthy list of parts available to use can be rather bewildering to a new player. I go somewhat systematically through all of the major types of parts and explain what they are for.

Second, this guide has more of a focus on the underlying math and physics than most. Before you run away screaming, that does not mean lengthy algebraic derivations. I'll write down a handful of formulas, but not really do anything with them. But it does mean discussing the three great conservation laws of classical mechanics, explaining how some parts actually work in real life, and defining enough linear algebra terminology to at least give you the right way to think about what is going on.

Moving locally

One of the most basic activities in many games is moving around. Move up, down, left, right, or whatever in order to get where you're going. But as we'll see shortly, moving one direction now and then drifting in orbit could have you moving in a very different direction much later on. That's why this section is only about moving locally, with a separate section for moving globally coming later.

Law of conservation of momentum

Let's start with a few basic definitions. Your velocity is how fast you are moving. This is a three-dimensional vector, which incorporates both your speed and also which direction you are moving. Velocity is intrinsically relative to some frame of reference. If you're driving a car, for example, you might be moving pretty fast relative to the ground, but basically not moving relative to the car.

Loosely, the mass of an object is how much matter it consists of. More technically, mass is resistance to acceleration. The greater the mass of an object, the harder it is to move it very far.

When in an area with a fixed strength of gravity, mass can be interchangeable with weight. That's a good description of moving around on the surface of a planet, but a rather poor model of space travel. Weight is how much force gravity exerts on an object, which depends on the force of gravity in the area. And just to confuse you, gravity and acceleration are, in some weird sense, the same thing.

It turns out that mass in the sense of resistance to acceleration and mass in the sense of affected by gravity are actually the same thing. This conveniently means that your acceleration due to gravity doesn't depend on your mass.

Momentum is mass times velocity. In the mathematical sense, this is a scalar multiple of a vector. Momentum itself is a vector, with both a magnitude and a direction. As with velocity, your momentum depends on your frame of reference, as you could be moving very fast relative to one object and not moving at all (and thus zero momentum) relative to another.

The Law of Conservation of Momentum basically asserts that the sum of the momentum of everything in a system is constant, provided that nothing outside the system interacts with anything inside of it. Having a truly closed system that cannot interact with the rest of the universe at all isn't a common situation unless you consider the entire universe itself, and a model that must start by computing the sum of all momentum in the entire universe isn't likely to be useful.

But for a system to be isolated sometimes is a pretty good approximation on a small scale of time and space. And it's often a pretty good approximation if you allow an accelerating frame of reference where you consider everything in a system relative to what would have happened if the objects had just sat there and not interacted.

Conservation of momentum can be a problem for space travel. Sure, once you get going pretty fast, you keep going pretty fast, at least until gravity has its say. The problem is that if your rocket has to just sit there in space, it can't accelerate to speed up and get you where you want to go.

Specific impulse

The solution to this is that space rockets take stuff up into space so that they can throw it in the opposite direction of where they want to go. If you want to move to the right, then throw a piece of something to the left really hard, and that moves the entire rest of the rocket to the right. If you throw a small percentage of the rocket in one direction, though, the velocity gained in the opposite direction is much smaller in magnitude because it has much higher mass. The real solution is to do this repeatedly, or perhaps more to the point, continuously.

Rocket engines are basically giant bombs with a somewhat controlled explosion to throw burning fuel as hard as you can in the opposite of the direction that you want to go. The harder you can throw it, the more momentum it has, and the more momentum your rocket gains in the opposite direction. As you have to carry your future fuel along with you, firing your exhaust as hard as you can without losing control is very important. Hence the giant bomb approach.

The specific impulse of a rocket engine is basically a measure of its efficiency. The harder it can fire whatever it ejects as it explodes in one net direction, the harder it pushes your rocket in the opposite direction, and the more acceleration you can get from burning a given amount of fuel. Abbreviated as Isp, it is conventionally defined as the average velocity of the fuel ejected divided by 9.81 m/s^2. The latter quantity is the acceleration due to gravity at sea level on Earth, and also on Kerbin.

It should be obvious that if trying to accelerate in a vacuum, being able to eject mass harder in the opposite direction is an advantage. What may be less obvious is that breaking it into more, smaller chunks is also an advantage. Let's suppose, for example, that half of the mass of your rocket is fuel that you can burn and eject, and suppose that you can hurl it away at 3000 m/s, for a reasonably common Isp of a little over 300. If you do that all at once, then you get 1500 m/s of acceleration. Relative to where you started, the fuel will be traveling at 1500 m/s in one direction, and your rocket will be traveling at 1500 m/s in the opposite direction.

But suppose instead that you broke burning the fuel into two chunks. First, you throw back 1/4 of your mass, then you throw another 1/4, now 1/3 of what remains. The first explosion will fire the fuel at 2250 m/s relative to where you started, while accelerating the rocket by 750 m/s in the opposite direction. The second will throw the second batch of fuel at 2000 m/s relative to where the rocket was going, and the rocket another 1000 m/s in the opposite direction. On net, the rocket accelerates by 1750 m/s, which is a lot more than 1500 m/s.

Breaking this into more, smaller explosions yields further gains, though with diminishing returns. In the limiting case of a steady, continuous burn, the best possible acceleration that you can get is about 2079 m/s. The formula, in case you're wondering, is ln(start mass / end mass) * (velocity of ejected fuel), or more conventionally, ln(start mass / end mass) * Isp * 9.81 m/s^2. For those who know calculus, the logarithm naturally shows up by integrating 1/(mass) with respect to mass.

The delta-v approach

This leads to the delta-v way of thinking about what a rocket can do. That would be the Greek letter Delta (which isn't convenient for me to type here) as in "change in" and v for velocity. A given rocket with a given amount of fuel to burn and a given mass of other stuff besides fuel can do up to this amount of change in its velocity by burning fuel and no more.

Crucially, it doesn't have to be all at once. If a rocket has an available delta-V of 2000 m/s, there's no reason why it can't accelerate enough to change its velocity by 1000 m/s now, then wait some days or months, then use the other 1000 m/s later. For example, some now to get on a trajectory with the moon where it wants to land, then wait until it gets close, and some then to actually slow down and land safely.

In many situations, the proper way to think about how much fuel you have left is not in tons or units of liquid fuel. Rather, it is how much delta-v you have left. That's what dictates how far you can go and whether you can get to your intended destination. And back, if you want to come back.

Main rocket engines

Most of the rocket engines in the game rely on combustion to generate the force to fire something backward. You burn rocket fuel with oxidizer to get a good explosion, and that hurls the burnt mixture out the back of the rocket, thus propelling the rocket forward.

Normally, when things burn on Earth, it takes oxygen from Earth's atmosphere to burn with something else. There isn't a bunch of ambient oxygen in the middle of space, however. Thus, if you want to burn something, you've got to bring your own oxygen. There are some engines that don't take this approach and don't require oxidizer, but they all come with severe drawbacks. We'll cover them in a later section.

The game has many different rockets, in many different shapes and sizes. Some are wider than others. Some are longer than others. Some produce more thrust than others. Some cost more than others. In all four of those features, it tends to be the same rockets that are more in all ways. Some rockets are also more efficient than others, in the specific impulse metric explained earlier.

In most practical uses, you'll need to start by considering just how big of a rocket you need, and that will eliminate most of the rockets from contention for a particular use. This is most directly dictated by radial size, as you usually want a rocket to fit nicely on whatever you're attaching it to. There are six common radial sizes for many types of parts in the game: tiny (0.625 m), small (1.25 m), medium (1.875 m), large (2.5 m), extra large (3.75 m), and huge (5 m). For things that are placed in-line--which includes most rocket engines and fuel tanks--you usually want for both components that you're attaching to have the same radial size. This isn't absolutely required, and sometimes there are good reasons not to, but it's commonly more efficient if you do.

Just how much thrust you need to lift your payload plays a huge role. A spark, with its 20 kN of thrust and 0.13 t of mass is a fine engine. So is a rhino, with its 2000 kN of thrust and 9 t mass. But a spark isn't going to do much for you if you're trying to lift 1000 tons off the ground, as you'd need several hundred of them, which would be an incredibly awkward design. Meanwhile, a rhino would be ridiculous overkill for a 2 ton payload, as the weight of the engine alone would make it highly inefficient for the task.

Lower stage liquid engines

Using rockets for liftoff (and in some cases, landings) brings two additional complications. One is that gravity is pulling hard on you, and you don't have unlimited time. If the thrust from your engines is less than the force of gravity, then you don't get off the ground. If you're lucky, you don't move; if not, you fall over and blow up. But just having thrust slightly greater than gravity isn't enough, as then you use huge amounts of fuel to barely move.

This leads to the notion of a thrust to weight ratio. If you click the delta-v icon in the game, it will offer to show you a lot of computed values, including your current thrust to weight ratio. When taking off, you want this to be considerably greater than one, such as 1.3 or 1.5 or 1.7. You don't necessarily want it to be too large, as that means you're using too many or too heavy of rockets. Moving very fast in the lower atmosphere will also mean excessive drag, and can sometimes flip you over and make you lose control.

The other complication of taking off is that rocket engines don't work as well in an atmosphere. The air gets in the way, and so they just don't function as well. Some engines are affected by this far more than others. That's why for Isp and thrust, each engine gives two values, not one: one for performance in a vacuum, and another for 1 atmosphere of pressure, at sea level on Kerbin. In an atmosphere, you burn fuel at the same rate, but it produces less thrust.

Naturally, there are a lot of other amounts of atmospheric pressure besides 1 atmosphere or a vacuum. There are intermediate values, or in some places, pressures of greater than one atmosphere. At low pressures such as 0.01 atmospheres, the numbers for a vacuum are a pretty good approximation. Rocket engines get worse as the pressure increases, and produce no thrust at all at sufficiently high pressures. You can see the exact thrust and Isp for a given rocket engine in the vehicle assembly building by choosing a planet and altitude in the option on the lower right pane.

For taking off from Kerbin, or anywhere else with a thick atmosphere (Laythe, Eve, and the lower atmosphere of Jool), you pretty much have to discard any engines that have a large gap in efficiency between atmosphere and vacuum from consideration for your first stage. Engines with a small efficiency gap between a vacuum or one atmosphere of pressure are much better suited for the lower stages of a takeoff than those with a large gap. Such engines include a cub, vector, mainsail, or mammoth, among others.

Upper stage liquid engines

When out in deep space, you might want to adjust your trajectory by a given amount velocity, which consumes that amount of delta-v. It doesn't really matter how fast you do the maneuver, as you have plenty of time. What matters is how little fuel and cost you can use to do it. Some rockets are intended for the upper stages of an engine, and only intended to be used in a vacuum, or at most in a very thin atmosphere. These commonly focus more on efficiency, in the sense of high specific impulse.

Some engines sacrifice the ability to work well at high pressures in favor of the ability to be more efficient in a vacuum. These are the upper stage liquid engines. There isn't a formal demarcation between those suitable for upper stages versus lower stages, but good examples of upper stage engines include an ant, terrier, cheetah, poodle, wolfhound, or rhino.

With upper stages, you typically have a good idea of how much mass your payload is, and how big of a rocket you want, and how it needs to fit with other parts in your rocket. That will limit you to a handful of reasonable choices, and then you can pick one that seems efficient, in the sense that it can do the job while requiring the least fuel and cost to build.

You can use lower stage engines in deep space, but it's usually significantly less efficient than an upper stage engine. Meanwhile, using an upper stage engine at high pressures will give very poor performance.

Solid fuel boosters

Solid fuel booster rockets are a special type of rocket intended for the very first stage to get you off of the ground and moving upward. They won't get you very far, but they can be a good way to get started. While most liquid fuel rockets have the fuel as a separate component from the rocket proper, for a solid fuel engine, you get an integrated package with both fuel and the engine.

Solid fuel boosters do have some serious drawbacks, however. First of all, unlike liquid fuel engines that respond to the throttle and can be scaled up or down, solid fuel rockets can't be turned off. Once you ignite them, they burn until they are out of fuel, then stop entirely. The early fuel rockets can't gimbal at all, though some that were added to the game much more recently can. Their specific impulse is also pretty bad.

So why use solid fuel boosters at all? One reason is because they're dirt cheap. A kickback can provide about 600 kN of thrust in a lower atmosphere for 62.8 seconds, at a cost of only 2700 funds. There are few ways to get that amount of thrust from liquid fuel engines at double that cost for the engines alone, and that's not counting the additional cost of the fuel.

Solid fuel rockets also provide a lot of thrust in little space. That can also be helpful at liftoff, when you need a ton of thrust to get off of the ground, but want to keep your cross-sectional area small to reduce drag.

Solid fuel rockets are really only good for the first stage to get you off of the ground on Kerbin. Because of their poor efficiency, you don't want to carry all that weight up for use in the upper atmosphere or out in space. They're good for starting on a lot of rockets, but just use them, discard them, and move on. Once you get to launching larger rockets, you can expect to start attaching a bunch of clydesdales to nearly everything.

Specialized engines

It might seem like it's inefficient to have to bring a bunch of liquid oxygen with you so that you can burn it. Isn't there some other way to let you skip the oxygen? Well yes, there is. Several, in fact. But they all have major drawbacks. The specialty engines are the focus of this section.

Nerv atomic rocket

First is the nerv atomic rocket motor. The idea is that it has a nuclear reactor in the rocket that it can use to heat hydrogen to be very hot. As atoms get hotter, they move faster. Have a hole so that there's only one direction that goes out, heat it up, and let it go out the hole. Hydrogen is used for the fuel because it has the lowest molecular weight, and the lower the molecular weight of a molecule, the higher its velocity at a given temperature.

The advantage of the nerv is its enormous specific impulse of 800. For comparison, the highest for a normal rocket in the game is a wolfhound, at 380. So that's why you'd want to use a a nerv.

There are some enormous drawbacks, however. For starters, the thrust to weight ratio is awful, with a 3 ton engine for only 60 kN of thrust. Every single normal liquid or solid rocket in the game has a thrust to weight ratio of at least five times that, and many are more than ten times that. Throw in its poor performance in an atmosphere and at sea level on Kerbin, a nerv can't even lift half of its own weight off the ground, even without any fuel or payload.

They're also expensive, as they cost 10000 funds each. That makes a nerv the seventh most expensive engine in the game, and all of the more expensive engines are much larger with at least 1000 kN of thrust. You can sometimes compensate for a weak engine by just adding more, but that gets expensive with nervs.

The fuel ecosystem for nervs is also not very good. You can use normal fuel tanks and not include the oxidizer, but then your wet to dry mass ratio for your fuel tanks is only 4.6:1 rather than 9:1, which eats up much of their efficiency advantage. Otherwise, you have a handful of pure liquid fuel tanks that you can use, and mostly not of the sizes and shapes you'll want.

The low thrust means that you'll commonly have long burn times to get the change in velocity that you want. That's fine in deep space, but it's not fine in low orbit of a planet with strong gravity. If you try to do a 20 minute burn maneuver when your current orbit has a period of 30 minutes, you're not going to like the results. They are functional for getting you out of low orbit of a planet, but kind of a pain.

Even so, for long distance flights, a nerv is commonly worth using because of its efficiency. There's no sense in using them if you're only orbiting Kerbin or traveling to one of its moons, and they're not that great for going to Eve or Duna, either. But for faraway destinations such as Jool, Moho, or Eeloo, having a stage of Nervs in the middle for the deep space portion can considerably reduce the total mass at launch required to reach your destination.

Dawn engine

Another way to make a rocket engine that fires its exhaust at much higher speeds than normal rockets is the ion engine. The idea here is that you have some xenon gas in an electric field. Normally, as a noble gas, xenon is unreactive and electrically neutral. If you ionize a tiny fraction of the xenon atoms by ripping off an electron, then your electric field can push on that handful of ions with an enormous force while having no force on the rest of the xenon. That handful of ions zip out of the engine at enormous speeds while the rest stay put.

The result is a specific impulse of 4200 in a vacuum. That's more than five times that of a nerv, and more than 11 times that of any liquid or solid fuel rocket. That makes the dawn engine the best in the game at mass efficiency in a vacuum, and by an enormous margin.

Naturally, they come with some enormous drawbacks. First of all, they offer very little thrust, at only 2 kN. That's actually massively more powerful than the real-life versions, which tend to offer about 0.01% that much thrust--naturally measured in mN, not kN. While dawn engines are very efficient for deep space travel, you're either going to need a whole lot of them or else accept that your burns take a very long time.

Second, their fuel tanks are inefficient with a full to empty mass ratio of only about 4:1, as compared to 9:1 for liquid fuel tanks, which implicitly eats up some of that mass efficiency advantage.

Third, they're expensive. A cost of 8000 funds for an engine isn't outlandish, until you realize that you're only getting 2 kN of thrust. Their fuel tanks are even more expensive, as xenon doesn't exactly grow on trees. Xenon costs more than 40000 funds per ton. For comparison, liquid rocket fuel costs less than 100 funds per ton.

Fourth, they use a lot of electricity to maintain a strong electric field. Each dawn engine consumes 8.741 electricity per second while in operation. The mass in electrical equipment that it takes to generate that much electricity that fast can easily make them seem like they're not that efficient anymore.

Fifth, that very weak thrust means very long burn times. For a single dawn engine to drain a single PB-X750 Xenon Container takes more than three hours. You can't time warp while accelerating, either, though you can do up to 4x physics warp. That still requires waiting more than 45 minutes. And remember that even that speed is because they made the engines far more powerful than their real-life counterparts. The real-life ion engines can burn for days or weeks.

Sixth, their xenon fuel cannot be refilled by mining. All other engines in the game allow you to land on some arbitrary planet or moon, use some mining equipment, and completely refill your fuel. But you can't expect to find xenon gas in arbitrary places. On many planets and moons, if they even had xenon in the first place, it would just float off into space and be gone.

Dawn engines are pretty much unusable for lower stages because of their high cost and low thrust. Where they really shine is for bringing a very small payload back to Kerbin, such as a command pod with few Kerbals, an experiment storage unit with valuable data, or some part that you were asked to bring home for a contract. They're great for coming home from Moho. They're less great for faraway planets such as Jool or Eeloo, as solar panels are far less effective there. Dawn engines are also nearly mandatory if you want to put something in low orbit about the Sun.

Jet engines

Another way to provide thrust is to not use rockets at all. Jet engines as used on airplanes are massively more efficient than rocket engines, as they have two huge advantages. First, they only need to carry fuel and not oxygen, as they can grab oxygen out of the air to burn. Second, they don't have to implicitly carry something to hurl off into space, as turbines can push against the air to provide thrust. This results in specific impulse ratings for jet engines ranging from 3200 to 12600. That's competitive with a dawn engine at the low end, and massively more efficient at the high end.

However, jet engines have some enormous drawbacks, too. Their key weakness is a need for oxygen. Thus, they only work in the lower atmosphere, and even then, only if there is oxygen present. So that limits you to Kerbin and Laythe. The problem with this is that if you're in the lower atmosphere of a planet, the first thing you want to do is to get out of the lower atmosphere--either up into space or down on the ground. For most missions, jet engines would be functional for such a short amount of time that their fuel efficiency doesn't matter.

Second, their thrust to weight ratio is awful by the standards of rocket engines, so they provide little thrust for the weight that they bring. It doesn't work to have one engine pointing its exhaust at another, as that would screw up your aerodynamics, so the number of jet engines you can use is sharply limited by your cross-sectional area. You generally need a vehicle to be longer than it is wide or else aerodynamics will try to flip you out of control, so this limits you to small vehicles at launch.

Third, take-offs and landings are a problem. In real-life, there are many airports with runways, and planes generally fly from one to another. Kerbin has only three runways, and Laythe has none at all, which makes take-offs and landings a problem. It is possible to do a vertical take off and landing so as not to need a runway, but this is difficult to construct.

Fourth, jets force you to deal intricately with finicky aerodynamics, which is just plain hard. It's hard in real-life, too, but there, aerospace engineers have much more precise tools available. You can mostly manage rockets by rotational symmetry, which prevents things being slightly off from breaking everything for you. For jets, you can use mirror symmetry for one dimension, but still have to balance things in another dimension with tools that are just too imprecise for the job.

If you look around, you can find a lot of people saying that they did this or that with jets. Most of it is very old and dates to before aerodynamics was redone in version 1.0, so that what they did then won't still work today. You can perhaps make a small jet with no meaningful payload and fly it around, but I haven't found any practical situation where that's not markedly worse than using a rocket. It's best to regard jet engines as being a toy with no practical use in the game.

Rotors

In addition to using the built-in jet engines, it's also possible to roll your own using rotors. Rotors don't use fuel, but rather, rely on electricity. A rotor has two main components, and forces one to spin relative to the other. This can be used to spin propeller blades, helicopter blades, or structural panels to provide a modest amount of thrust.

You can be creative with your use of rotors, but do keep in mind that they're tricky to use well. You can make them into propellers for planes, rather than using jet engines. You can also make helicopters. These don't rely on atmospheric oxygen, so they can also work on Eve or Jool. Indeed, helicopters are the only thing that work far into Jool's lower atmosphere.

Another alternative that lets you avoid the finicky aerodynamics is to use rotors to make a boat engine. That way, if you land in the water while out of fuel, you fire up the boat engine and slowly get back to shore, where you can switch to rover wheels or mine for more rocket fuel. So long as you move slowly enough, aerodynamics won't flip you over and blow you up.

RCS thrusters

One other specialized type of engines is RCS thrusters. These are intended for small, precise movements, especially in deep space. RCS thrusters won't get you into orbit and won't land you, but they might help you line up something just right to have two vehicles dock in space.

Personally, I don't find them useful. They work, but you can also make things precise enough for docking by other means, without needing an additional type of fuel and additional engines.

Rotating

For most purposes, it isn't enough to just provide a lot of force. You need to provide it in the right direction in order to get where you want to go. With rockets, that typically means rotating the rocket such that it is pointing away from the direction in which you want to travel. To do that, you'll need to be able to rotate your vehicle. That's what this section is about.

Law of conservation of angular momentum

Linear velocity has an angular version, too. We'll talk more about coordinate systems in a subsequent section, but your angular velocity is the rate at which your angle about something is changing. Just as there is linear momentum, there is also angular momentum. The angular momentum of an object about a point is the vector cross product of the distance from the point to the object and the momentum of the object. The cross product is algebraically messy and unintuitive, so I won't define it here.

What is important about angular momentum is that it is conserved. So long as there aren't any external torques applied, the sum of the angular momenta of a system about a fixed point is constant. No external torques is a weaker condition than there being no external forces applied to the system; I'll explain the concept of torque shortly. While conservation of momentum explains how rockets work and not much else of consequence in the game, conservation of angular momentum is an extremely important principle with broad consequences.

Conservation of angular momentum works with any object and any point. In the limit as the point that you are rotating about becomes infinitely far away, it becomes equivalent to ordinary conservation of momentum. Most combinations of an object and a point really aren't very illuminating--in part because there are external torques on the system.

There are two types of situations in the game where conservation of angular momentum is extremely consequential. The more complicated and profound one is that of your rocket orbiting some celestial body, such as a planet or moon. The object whose angular momentum we track is your rocket, and the point is the center of the planet or whatever it is that you're orbiting. We'll need more terminology before we can make sense of that, so we'll get to it a little later.

The other situation where angular momentum is important is your rocket rotating about its center of mass. The center of mass of an object is loosely the average position of mass in the object. For a collection of point masses, it is computed as the (sum of (mass times position)) / (sum of masses). For continuous, solid objects, you would technically want integrals instead of sums.

Some objects have a center of mass that is pretty simple by symmetry. For example, the center of mass of a ball is at the center of the ball. When building rockets, if you place everything with mirror symmetry in the spaceplane hangar, you're guaranteed that the center of mass will be somewhere in the plane that the mirror symmetry is symmetric about. If you place everything with rotational symmetry in the vehicle assembly building, the center of mass will be somewhere on the vertical line through the center of the rocket. Both buildings have an option to show you where your center of mass is.

One important thing to understand about the center of mass of an object is that when the object rotates while not being touched by anything else, it rotates about its center of mass. Thus, in order to rotate your rocket at all, you're usually going to rotate it about the center of mass.

Reaction wheels

Reaction wheels probably look like magic if you don't know how they work. The idea is that you're in deep space and not touching anything. You want to rotate your rocket in a particular direction. So you fire up the reaction wheels and rotate the entire rocket to exactly the direction you want. And then you stop, and stay pointing in exactly the direction you wanted. And it didn't require firing any rockets, but only using some electricity. And that is actually a real thing.

The first reaction wheels were discovered accidentally. Some space program had launched a satellite, and it was going along just as they expected. Then when it started to transmit data back to Earth, it started rotating. That was a nuisance, so they had to stop it and rotate it back to the intended direction, which wasted fuel. Then when it started transmitting data again, it started rotating again. This was rather baffling at first.

Eventually, they figured out what was happening. When the satellite transmitted data, it rotated some tapes internally as part of the tape drives where it stored data. In an appropriate reference frame, the satellite had zero net angular momentum before it started transmitting. When rotating the tape wheels, those wheels had some angular momentum in some direction. In order for the net angular momentum of the entire satellite to remain zero (as angular momentum is conserved), that caused the entire rest of the satellite to rotate slowly in the opposite direction.

Figuring that out was a huge advance for space rockets. Instead of needing a bunch of small thrusters all over the place to make it possible to rotate your rocket in arbitrary directions, all that they needed was a few internal wheels. Want to rotate the rocket in one direction? Just rotate the wheels in the opposite direction. Stop the wheels to stop the rocket from rotating.

There are three dedicated reaction wheels objects in the game, with three different radial sizes. The game simplifies this for you somewhat by allowing all reaction wheels to rotate you in arbitrary directions, and much faster than real-life reaction wheels would tend to. Furthermore, the game doesn't limit the cumulative torque that reaction wheels can provide, unlike the real-life versions that can only spin so fast. But reaction wheels are a real thing, not just magic to make the game easier for you.

In addition to the dedicated reaction wheels, most of the pods in the game have some built-in reaction wheels. These tend to be lower torque than dedicated reaction wheels, so other than for some very small vehicles, you'll typically want to add one or more dedicated reaction wheels.

Torque

Torque is basically the angular version of force. Technically, the torque on an object about a particular point is the vector cross product of (the distance from the point about which you rotate to the point where the force is applied) with the force. Thus, the torque depends not only on the force, but also on the point that you're computing the torque around.

For our purposes, there are again two useful choices for the point that you compute the torque about. One is the center of mass of your rocket. The other is the celestial body that you're orbiting. We'll come back to the latter in a later section. The torque about the center of mass of your rocket will rotate your rocket.

There are two important cases where the cross product is zero. One is that cross product of zero with any other vector is always zero. This means that zero force causes zero torque. It also means that any force applied to the center of mass of an object applies zero torque to the object.

The other, broader situation is that the cross product of two parallel vectors is zero. Thus, if the force applied is pointed right at the center of mass of an object, it causes zero net torque, and does not rotate the object.

There are five major sources of torque in the game other than reaction wheels. They can be intentional or undesirable, but they will cause the rocket to rotate, so it's important to understand them.

Asymmetric rocket placement

First is if your rockets are placed asymmetrically. A rocket engine that isn't pointed right at your center of mass will have some torque. If you have another engine on the opposite side, it will cause the opposite torque. These cancel out, for a net sum of zero torque. That's usually what you want, so that you can avoid extra torque when you don't want it.

The vehicle assembly building and spaceplane hangar will both draw this for you. You can show the sum of the forces, as well as the center of mass. If the former is pointed right at the latter, you're fine, at least for a rocket. Making everything use rotational symmetry will accomplish this for you. For a plane, you want the sum of the forces to be pointed right at the center of mass in the horizontal direction, but possibly not quite in the vertical.

There are two ways to screw up the net force here. One is if the rockets firing at a given time are placed asymmetrically. This can happen because of the way that the rocket is built, with one engine not having others to balance it. Even if the initial design is correct, it can happen if one engine is firing while the other(s) to balance it are not. It can also happen if something goes awry and blows up some but not all of your engines.

The other way to mess this up is if your center of mass is off-center. For example, if you stick one extra fuel tank off to one side without a counterpart on the other side, you can end up with a center of mass that is off to the side. Then even if you properly pair all of your engines, the net force isn't pointing at the center of mass, and so the rocket still rotates. To avoid this, you need all of your parts to be either paired with other, identical parts using the rotational symmetry tool, or else a single part actually on the center line of the rocket.

Engine gimbal

In addition to pointing their exhaust in the exact direction that they're facing, some engines can angle the nozzle off to the side. This is something that can be adjusted from moment to moment, so that you can have the nozzle pointed to the side one moment when you want to turn and centered again a second later when you want to go straight.

Each engine has a maximum amount of gimbal. Some engines can't gimbal at all, and the maximum angle for most of those that can is very small, such as two or three degrees. A few engines have a very large gimbal angle, such as 10.5 degrees for the vector or 22.5 degrees for the cub--though the cub can only angle in one axis, not two.

Large gimbal can be handy sometimes, but excessively large gimbal can mean a lot of torque. With SAS on, this can cause it to overshoot back and forth on angles until the entire ship shakes violently or even flies apart. Fortunately, you can reduce the maximum gimbal of any rocket engine. Sometimes it is handy to have a stage that mixes some engines with high gimbal with others with no gimbal at all so that you can still rotate at a decent rate.

Aerodynamics

Air resistance when in the lower atmosphere is another source of torque. For planes, this is essential to make the plane fly at all. For rockets, it's generally undesirable at take-off, but can be helpful to slow you down before landing.

While air resistance mostly slows you down in whatever direction you were going, it can also provide some torque. Because it pushes so hard, a slight angular tilt can offer considerable torque. In some cases, it can cause a rocket to flip over shortly after launch.

For a rocket of a fixed size and shape, there will be some amount of force applied to the rocket as it moves in any particular direction. The force generally varies with the direction, and often by quite a lot. A pancake moving with its wide face catching the wind will draw a lot of air resistance, for example, but the same shape will get much less if it moves in the direction of an edge.

The most stable direction for a rocket is whichever direction offers the least resistance. For a long, narrow rocket, this will usually be either retrograde or prograde. For a short, wide rocket, it can be moving on an edge. If you're near the direction of minimum wind resistance, aerodynamics will often push you toward it.

There can be multiple local minima that are stable if you're near them. Additionally, so long as the torque applied by aerodynamics is less than what you can apply with other sources (typically engine gimbal or reaction wheels), you can keep the rocket stable in the direction you want it to be facing.

Ultimately, aerodynamics is very complicated. New players commonly have to figure out why their rocket is flipping over shortly after launch, and aerodynamics is the culprit. It often helps to make your rocket have less drag when traveling in the direction you want to go, such as by using aerodynamic nose cones. Sometimes you need more torque from other sources. Occasionally, you just have to make the rocket go slower when in the lower atmosphere to keep it stable.

Collisions

If one object directly pushes on another, it can apply some torque to the other object. Actually, both objects can apply some amount of torque to each other. In one sense, this is obvious, and also the simplest example of torque. But in another sense, it's fairly rare, as you typically don't collide with other objects when deep in space.

The main issue where collisions will spin your rocket around is when landing. If the ground is uneven and one side of your rocket touches before the other, the ground will apply some torque to spin the rocket away from the side that touched first. You can reduce this force considerably by touching down at a lower velocity. It also helps a lot if you can find a level place to land, though this isn't always practical.

Rotors

The basic goal of a rotor is to apply some torque to rotate some small portion of the ship in one direction, such as helicopter blades. But as angular momentum is conserved, this rotates the entire rest of your ship in the opposite direction, albeit usually much more slowly. Even so, if you're reckless with rotors, they can easily cause you to spin out of control.

The solution to this is usually to have an even number of rotors, and spin them in opposite directions. Thus, when some of them apply torque in one direction, others apply an equal amount of torque in the opposite direction. The net effect is zero torque on the rest of your ship.

Inertia

Just mass is resistance to acceleration, so inertia is resistance to rotation. The amount of angular acceleration of an object is the amount of torque divided by the moment of inertia about the axis that the torque is trying to rotate the object. Importantly, the moment of inertia is not a single, fixed constant for a single object, but varies with the axis. The axis of rotation always goes through the center of mass of the object.

Technically, the moment of inertia is the integral over space of the mass density of the object times the square of the distance from the axis of rotation. You can think of it intuitively as the mass of the object times the square of the "average" distance of parts of the object from the axis of rotation. It would be more proper to use the root mean square (which is greater than the average) rather than the average, but using the average is probably more intuitive and usually won't lead you too far astray.

One thing that is important to understand is that an object of fixed shape gets larger in all directions, the moment of inertia grows much faster than the mass. Meanwhile, the aerodynamic forces on it grow proportionally to the cross-sectional surface area, and thus more slowly than the mass. If you increase the size of the rocket in all dimensions by a factor of n, the aerodynamic forces (including torque) increase by a factor of n^2, the mass by a factor of n^3, and the moment of inertia by a factor of n^5. That last one is n^3 for the mass times n^2 because the distance from the axis of rotation increases by a factor of n.

Thus, the angular acceleration due to aerodynamic forces decreases by a factor of n^3. For example, make the rocket twice as big in all dimensions, and the angular acceleration due to aerodynamics will only be 1/8 as big as before. This is why small rockets are prone to flipping, but a similar shape with a much larger rocket allows you to nearly ignore aerodynamics when taking off.

Another consequence of this is that big rockets are much harder to turn than small ones. Small probes that only weigh a few tons can commonly spin very fast from the minor reaction wheels inside of a pod or probe core. Giant stations with a mass of thousands of tons can take minutes to rotate to the direction you wanted, even with a number of dedicated reaction wheels.