# If a spaceship shoots its guns

*Dear Urban Astronomer*

*I am busy designing a science fiction computer game and am trying to figure out the physics of combat. If a spaceship is flying through space and shoots backwards, what exactly does the bullet do?*

*Regards*

*KJM*

Unlike all the other questions I answer in this section, this was not posed directly to me in an email. Instead, I happened to catch a friend from Twitter posing the question to the Internet in general, on behalf of a computer programmer that he knows. What follows is a compilation of the various emails I sent him to try and explain this branch of physics that was giving him trouble. With that said:

Velocity DOES care about direction, so while you might describe your speed as 100 km/h, your velocity would be 100km/h heading west.

Now imagine you’re on an athletics track: The gun goes off, you run 100 meters to the end. Then, you turn around and run back to the start. If we pretend that you never have to speed up and slow down, and we pretend that you’re a certain olympic athlete from Jamaica, then you travel at a speed of 10 meters per second. Your velocity is also 10 meters per second. When you make your return trip, your speed is still 10m/s, but now your velocity is -10m/s.

Now to space. Your spaceship is sitting stationary in space, and your gunner shoots two bullets: one forward from the nose of the ship, and one backwards. This particular gun fires a big slug of depleted uranium at a speed of 2000m/s which will seriously ruin the day of whatever it impacts. The forward bullet moves at a speed of 2000m/s and a velocity of 2000m/s. The back bullet moves at a speed of 2000m/s and a velocity of -2000m/s.

Now we start the spaceship moving at a slow crawl: It’s doing 1000m/s (3600km/h) forward. It’s velocity and its speed are both 1000m/s. The forward bullet has a velocity of 3000m/s, and the rear bullet has a velocity of -1000m/s. Why?

Because the bullet is launched from the spaceship: The mechanism in the gun (Exploding gunpowder, powerful electromagnetic fields, quantonium ejection matrix, whatever sci-fi thing you wanna make up) pushes the bullet away from the ship, so the bullet will always have a speed of 2000m/s relative to the ship. To find the velocity relative to surrounding space – a passing planet, say – you add the ships velocity to the bullet’s velocity. So for the forward bullet, adding the ships velocity to the bullets velocity gives us 1000m/s + 2000m/s = 3000m/s. For the backwards bullet, adding the two velocity’s gives us 1000m/s + (-2000m/s) which gives us -1000m/s. Now you can use these same maths to work out what happens for any speed.

Spaceship moving at 2000m/s? Forward bullet’s Velocity = 2000m/s + 2000m/s = 4000m/s. Back bullet’s velocity = 2000m/s + (-2000m/s) = 0m/s. The bullet gets left behind totally stationary (although the distance between it and the ship still increases at 2000m/s because that is its speed relative to the ship).

Spaceship moving at 2,000,000m/s? The maths tells us that the forward bullet is now moving at 2,002,000m/s and the backwards bullet has a velocity of 1,998,000m/s in the same direction as the ship – relative to the passing planet, it’s actually whizzing by backwards WAY faster than the gun can actually shoot!

So we take each and every measurement, each speed or position, and split it into X and Y components. We then do our adding and subtracting to work out what the speeds are in each of those two directions, and then we combine them all up again to get the final values. You use a lot of the Pythagoras theorem, and a bit of trigonometry, but it’s something any matric student who’s not failing maths could handle.

If you want to do it in three dimensions… well the exact same principle applies: Break it down into X, Y and Z components. You even carry on using the exact same formulae. You have to do more individual sums, but they’re all the same basic ones.

So knowing this, what actually happens to our bullets coming from our spaceship?

Well. Same ship, but now we’re shooting from a turret on the top of the ship. The ship is stationary and fires one bullet forwards, one at a 45 degree angle to the front/left, one to the left, one to the right, and one backwards. The forward bullet is moving at 2000m/s in the X axis, and 0m/s in the Y axis. The angled bullet is moving at 1414m/s in X axis and 1414m/s in Y axis (You can work this out with Pythagoras… Do the sums and you find the SPEED still works out to 2000m/s). The left bullet moves at 0m/s in X axis and 2000m/s in Y axis. The right bullet moves at 0m/s in X axis and -2000m/s in Y axis. The back bullet moves at -2000m/s in X axis and 0m/s in Y axis.

And if we start the ship moving, we work out what happens in exactly the same way as before. All that’s different is that we add up two sets of numbers (or three if we’re using 3 dimensions. But sci-fi never remembers the 3rd dimension…). So ship moving forwards at 1000m/s, that forward bullet now does 3000m/s in X and 0m/s in Y. Angled bullet does 2141m/s in X and 1414m/s in Y. left bullet does 1000m/s in X and 2000m/s in Y. And so on.

Now for a big picture: The way all this looks all depends on your point of view – what physicists call your Frame of Reference. Since Galileo’s time, we’ve known that there is no such thing as a spot that you can identify as the centre of it all. You just choose one arbitrarily and do all your measurements from there. We choose the ground beneath our feet, usually, and our speed is given relative to that, but somebody standing on the Sun would measure our speeds on Earth as being very much higher because what he would see would include the Earth’s enormous speed through space.

So if we choose our frame of reference as the Spaceship, then all bullets move at 2000m/s away from the ship. But if you’re on some other point, you would measure the bullet at travelling at 2000m/s PLUS whatever speed the ship is moving relative to you. And some other reference point would give some other numbers.

This is actually all pretty intuitive stuff – your brain is really good at this sort of maths. Think about a cricketer throwing the ball at the stumps while running: His brain knows how fast the ball will be going, as well as how fast he’s moving, and computes a trajectory taking those corrected figures into account. And then also does calculus to deal with the fact that gravity makes the ball move in a curve. It’s easy if you’re actually doing it. It’s only reducing it to maths and putting it on paper, so that the results are guaranteed correct, that is hard.

## Comments

If a spaceship shoots its guns— No Comments