A Guide to The Rocket Simulator
![]()
The Rocket Simulator is a Java program, capable of running on any system with a Java interpreter from a SGI workstation, to a Mac Performa, to a 386 PC. It's a two-dimensional simulation of a basic single-staged rocket, using standard engines from "A" to "D." The applet version of The Rocket Simulator is here. If you want the application version it's here!
Background  The Rocket Simulator uses Newton's laws of motion to simulate a model rocket. The altitude, trajectory, and delay time can all be calculated with basic information about a rocket's size, shape, weight distribution, its engine's thrust, and the duration of the thrust, as well as some basic environmental information such as wind, temperature, and elevation. The Rocket Simulator is a two-dimensional simulation, so it can't take side winds into account, but normally a rocket is launched with the wind, so side winds are not very important. The Rocket Simulator provides the coast time, which is the optimum delay time, as well as the maximum altitude, and maximum speed.
The Algorithm  The algorithm used in The Rocket
Simulator is based on Newton's laws. The three main forces: Thrust, Gravity, and Drag, are resolved into X, and Y
components, which are then added together, resulting
in the net force in the horizontal, and vertical directions. Newton's second law,
F = ma, or a = F/m, is used
to calculate the acceleration in both directions. At each time instance (every .002 seconds in The Rocket Simulator) the
new velocity is calculated from the acceleration. The new position is then calculated as an X, and Y coordinate based
on the velocity in each direction. The algorithm used is called
the Euler algorithm, and is a simple, brute-force algorithm with less than 0.5% error, when used with 0.002 second
time-slices. The rotation of the rocket is also taken into account. The rocket rotates about it's center of gravity.
The algorithm for determine the rotation is very similar to the one for determining the
movement of the rocket, based on finding the angular acceleration (due to torque, provided by the drag) of the rocket
at each time slice. The orientation is displayed every several meters, allowing the observance of the
stability of the rocket.
Using The Rocket Simulator  The Rocket Simulator requires input on both the design of the rocket, and on the environment. When the Simulator is opened a welcome dialog box appears, and gives you the options of inputting the rocket specifications, getting information about The Rocket Simulator, or to quit. Pressing the input data button will replace the dialog with one containing several input boxes, with unit selectors below. You may either accept the defaults, or input the specifications for your rocket. You then press the Go Calculate button, and the dialog box will be replace with one containing information about the flight, as well as a graph displaying the trajectory of your rocket. The little arrows along the trajectory are the orientation of the rocket at that spot during the flight. On the way up, a stable rocket will be primarily pointed towards the direction it's moving, with little, or no wiggling. If the rocket rotates side to side a lot, or completely flips over, it may not be safe to fly in that configuration. You may then either choose to quit, by pressing the Quit button, or you may continue, and change your specifications by pressing the Input Rocket Data button. The applet version is here. If you want the application version it's here!
How To Use The Application   To use the application, you must have a Java interpreter, such as Sun's JDK(Java Developers Kit), or the JRE(Java Runtime Environment), or another interpreter, such as the one included with Microsoft Internet Explorer (java.exe found in the windows directory). You must first download the class files, and unzip them. Then use the java interpreter, and run rocket_sim.class. If you are using Sun's JDK under Windows type "c:\jdk1.0.0\bin\java rocket_sim" replacing c:\jdk1.0.0 with the directory in which the JDK is installed. Under Unix, the jdk has probably been put in the path by the administrator, and you just have to type "java rocket_sim". If you are using Microsoft Internet Explorer, just type "jview rocket_sim.class" from the command line. If you are interested in the source, it is available in zip format. It was created using Microsoft Visual J++ 1.1, and if you want the project files also, they are here.