THREE MODEL ROCKET PROGRAMS: ALTITUDE, STABILITY, TRACKING By Burton L. Craddock The three programs for aiding model rocketry on this disk are Rocket-Altitude, Stability, and Tracking. All three programs are compiled BASIC 64 programs. The programs load, save, and run like BASIC programs on either a 64 or a Commodore 128 in 64 mode. The sequential file THRUST.DAT is the rocket motor's data file for Rocket- Altitude. Motor-Data is a BASIC program for creating a copy of the data file THRUST.DAT on a disk in device number 8. I used the MetaBASIC Plus READ command to display THRUST.DAT contents on the computer screen and to manually convert that display into data statements for Motor-Data by inserting a line number and the keyword "data" at the beginning of each line. ROCKET-ALTITUDE Rocket-Altitude is a flight simulation program of a model rocket with aerodynamic drag in perfectly vertical flight. Rocket-Altitude can simulate the flight of model rockets with one to three stages. Before the ignition of a rocket stage, a menu of options is displayed onscreen. The f1 key selects metric units or English units. The metric system is the default unit of the first stage. The f3 key selects a Summary report or Detail and Summary report. The Summary report is the default of the first stage. We'll go into detail about these reports later. The f5 key selects current stage as the Last Stage or Not Last Stage. The default for all stages is Last Stage. If current stage is the third stage, the final stage-selection option will not be displayed, and the current stage is the last stage. Press f7 to start the simulation for the current stage. At this point, you are asked to enter the rocket gross weight, the rocket body maximum diameter, and the drag coefficient. The input weight and diameter for the metric system is weight in grams and diameter in millimeters. The input weight and diameter for the English system is weight in ounces and diameter in inches. The drag coefficient for a typical model rocket with a vertical takeoff is approximately 0.75. Some low-drag, high-performance model rockets have a drag coefficient as low as 0.25. If the rocket weight is more than 453.59 grams (16 ozs.), you will be prompted to enter the weight again. You are then asked to select the model rocket motor type from a menu. The data for the different rocket motors is contained in sequential file THRUST.DAT. Make sure that the disk with this file is in drive 8. Device 8 must contain this file for the first motor selection. DETAIL OUTPUT The Detail output lists in 0.1-second intervals the time, altitude, velocity, acceleration, and weight of the rocket. If the simulation unit is metric, the altitude is in meters, the velocity is in meters per second, the acceleration is in meters per second squared, and the weight is in grams. If the simulation unit is English, the altitude is in feet, the velocity is in feet per second, the acceleration is in feet per second squared, and the weight is in ounces. In this mode the scrolling output can be stopped by pressing the S key. A stopped detail output can be restarted by pressing the C key. SUMMARY OUTPUT The Summary output for the final stage of the rocket is the maximum altitude in meters and feet, the total time to peak altitude in seconds, the burnout altitude in meters and feet, and the maximum velocity in meters per seconds and in feet per seconds, and time of final stage burnout. The Summary output for the other stages of the rocket is the burnout altitude in meters and feet, the maximum velocity in meters per second and in feet per second, and time of the stage burnout. If this is not the rocket's last stage, the simulation will repeat the above process for the next stage. If this was the rocket's final stage, the simulation will display the message OTHER RUN (Y/N)?. Typing Y will run the program again for a new simulation. Type N to end the program. ENTERING DATA When entering numerical data, the only valid characters are those for legal floating point numbers and the Del key for deleting the last character. Numerical input must have at least one digit; otherwise, the Return key character will be ignored. THRUST INFORMATION The sequential file THRUST.DAT contains the data for different rocket motors. If you read this file with a sequential file reader, you'll see that each line contains information about one type of motor, with data items separated by commas. The first item listed is the motor type, followed by a string in quotes that contains the thrust duration, the motor propellant mass in kilograms, and the motor thrust in Newtons in 0.1-second intervals starting at 0.1 seconds. For example, an A8 rocket motor would be listed as follows. A8,"0.24, 0.00312, 12, 4" The last line of data in THRUST.DAT is the word "end." Rocket-Altitude will read up to 19 rocket motor data from the file THRUST.DAT. The character limit for each line is a maximum of 80 characters. THRUST.DAT contains data on eight rocket motors: 1/2A6, A8, B4, B6, B14, C6, C5- 3S, and D12. You can create your own version of THRUST.DAT and add data for additional motor types that you may use. A program editor or a word processor with a Commodore ASCII sequential file format can be used to create a new version of THRUST.DAT. As a convenience, I've included a short program called Motor-Data that can create and/or modify the THRUST.DAT file. Load this program and then list the DATA statements starting with line 2000. These statements contain the motor specifications for the eight motors listed above. You can add to this list or modify the ones included by adding to or changing the existing DATA statements. You can usually find the required motor specifications in manufacturers' catalogs and motor information sheets. When you run Motor-Data, it either creates or replaces the THRUST.DAT file on your work disk. PROGRAM USES If a model rocket's drag coefficient is unknown during a test flight but you can determine the rocket's peak altitude, you can determine an approximate value of the rocket's drag coefficient by using Rocket-Altitude. Run the program several times, experimenting with different values of the drag coefficient until the program's simulated maximum altitude equals the actual maximum altitude of the test flight. After a rocket burns out, the final-stage motor usually releases a recovery device such as a parachute or streamer. Rocket-Altitude can help select the ideal ejection delay time for the rocket to release its recovery device. The last stage motor has a delay from the time that the motor's thrust ends to the time that the ejection charge ignites to release the recovery device. This usually occurs at or near maximum altitude. The difference between the peak altitude time and the last stage burnout time is the proper time delay. If you enter 0 for the drag coefficient input, Rocket-Altitude will simulate the flight of a model rocket without the effect of aerodynamic drag. Gazette, June 1994