|Rimmer from Red Dwarf. He went mad in his|
astronavigation exam and wrote "I am a fish"
four hundred times. It's not actually that hard.
To the stars and beyond*!
*Not actually very far beyond.
The first, conceptually basic method is by looking at the positions of the stars. This is a bit different to sailors navigating by the stars.
The Earth rotates about its axis once ever 24 hours. That means over the course of a night, stars appear to move across the sky; the stars aren't actually moving, it's the planet. But if you know the time and where the stars should be at that time, you can use that information to navigate fairly accurately. Even if you don't have precise instruments, the Southern Cross or the North Star can point you in the general direction of south and north. (These two point to or are located close to the southern and northern celestial poles, respectively. The celestial poles are located along the line where the Earth's rotational axis extends into space. As stars move across the sky at night, they will appear to circle one of these points. Unless you're at the equator, in which case they will move straight from east to west.)
If you're in interstellar space, the rotation of the Earth is supremely irrelevant. However, if you know the exact locations (in the galaxy) of at least three stars and can measure their directions relative to you with precision, then you can use that information to triangulate your position.
The tri in "triangulate" gives you the hint that you only need three stars to be able to pinpoint your position but, because there's only so much accuracy with which directions can be measured, the more stars you use, the more accurately you can determine your location. Another good reason to have more than three reference stars is so that you (or, y'know, the computer) can still navigate when you're on the other side of the galaxy and can't see them any more.
As far as re-identifying stars goes, the spectra of normal regular stars are a bit unique. That is, the temperature of the star combined with the exact concentrations of various elements that make up the outer layers of a star are like a fingerprint and (usually) don't change very rapidly. So if you find yourself coming out of a mysterious wormhole, and you have a spectrograph on board, you could take some spectra, find enough reference stars and get the computer to work out your location for you. Yay.
(One final note: you would want a computer to take all the spectra and do the comparisons. Really, you would. I mean, the calculations of stellar positions are at least possible by hand but if you don't already know what stars you're looking at, there is no way you want to be comparing those squiggly lines by hand. Trust me on this.)
Astronavigation 101, unit 1: pass.
OK, so what if you know more or less where you are, but you're not sure how fast you're going? First, I need to point out that speed is entirely relative. It is impossible to determine an absolute speed for anything. On Earth, we tend to measure speed relative to the ground or, sometimes, relative to the wind. However, the Earth is spinning and hurtling around the sun at about 30 km/s. The sun is, in turn, careening around the centre of the galaxy at about 220 km/s. The galaxy is streaking through space at about 550 km/s relative to the CMB (cosmic microwave background radiation).
And yet, here we sit in front of our computers/smartphones/iPads and (with the possible exception of those of you reading this on your phone on public transport) it feels like we're sitting still.
The moral of the story is that we can't feel speed. What we can feel when we're on a moving train, or taking off in an aeroplane, or in a car going around a corner is actually acceleration. And it's not just us, Einstein's equivalence principle tells us that (assuming there isn't some window for us to look out of) there is no possible way to tell the difference between sitting still and hurtling through space at eight hundred kilometres per second. We can make devices that detect acceleration (those of you who have ever had a smartphone or a camera change the LCD image when you turned it sideways have experienced this). What we can't do is build a device to determine absolute speed. Because speed is relative.
The good news is, there are lots of ways to determine speed if we can see where we're going. On a train, for example, you might look out the window and get an idea. In space, at reasonably non-relativistic speeds, the stars don't stream past you like they do in that old Windows screen-saver. The distances between them are so vast that they would not appear to be moving at all.
This is where your trusty spectrograph comes in handy again. All stars have some recognisable elements in them. Notably hydrogen, helium, maybe oxygen and carbon but depending on the star, these may not be present in sufficient quantities for our purposes. Every element has a unique set of emission/absorption lines. The wavelengths at which these lines are found are based on quantum mechanics and immutable. However, when you're moving towards or away from the source of the lines (ie, a star), the Doppler effect will come into play. The Doppler effect makes the wavelength of light that you (or your spectrograph) see appear to be slightly longer or slightly shorter, depending on whether you're moving away from or towards the source. So you can take a spectrum, compare the wavelength of the hydrogen (for example) lines with what they should be, then you can work out how fast you're moving relative to that star.
Incidentally, this wouldn't be a particularly tedious calculation to do by hand, assuming you had reference tables at hand and maybe some sort of (basic scientific) calculator. Also, if you remembered the equation.
So there you have it. Your characters can now work out where they are, and how fast they're going. Don't worry, though; they won't violate Heisenberg's uncertainty principle. They're not quantum particles. (And the uncertainty on the position will be too big.)
Astronavigation 101, unit 2: pass.