Calculating speed and distance in outer space