The Relativistic Rocket

Applet implemented by Paul O'Brian for the Programming Languages class.

This applet lets you plan how long a trip will take on a rocket that travels near the speed of light. You type the distance of the trip (measured in light years) and the acceleration of the rocket (measured as a multiple of Earth's gravity). The rocket will accelerate at that rate for half of the trip, then decelerate at the same rate for the second half of the trip.

The time for the trip is measured in two ways: (1) As seen by a person who stays behind on Earth, and (2) as measured by you on the ship. For your convenience, space-sickness pills are available aft of the observation lounge. The equations for the computations came from the Desy Web Site. Here is what I used:

1. Calculate d as the distance of half the trip in meters. (Note: There are about 9.47e15 meters per light year).
2. Calculate a as the acceleration in meters/sec². (Note: The conversion is 9.81 times the acceleration measured in gravities.)
3. Set c equal to the speed of light in meters/sec (which is 3.00e8).
4. The total time on earth, measured in seconds is:
2 * sqrt( (d*d)/(c*c) + 2*d/a )
5. The total time for the voyager, measured in seconds is:
2 * (c/a) * asinh(a *0.5 * time_earth / c)
(Note: asinh is the inverse hyperbolic sin function, computed in Java with the formula Math.log(x+Math.sqrt(x*x+1)). The Relativistic Rocket Applet / Text by Michael Main, Applet code by Paul O'Brian / obrian at colorado.edu / Revised April 1999