Before we try and simulate a “real” spacecraft in flight, it might help to consider the problem of tracking a model rocket, or similar “simplified” ballistic problem. Using a single tracking station, with a known distance from the launch point, we can estimate the altitude using a single measured angle and some simple trigonometry:

When we code this particular exercise in Applesoft BASIC, we need to remember to convert our angles (typically measured using degrees) to radians by multiplying by PI/180.

1000 REM SINGLE STATION TRACKING OF A MODEL ROCKET 1010 REM DETERMINES ALTITUDE BY MEASURING ANGLE AT 1020 REM APOGEE GIVEN A KNOWN BASELINE. 1030 TEXT : HOME : SPEED= 255 1040 PRINT "MODEL ROCKET - SINGLE STATION TRACKING" 1050 PRINT 1060 PRINT "DETERMINES ALTITUDE AT APOGEE GIVEN A KNOWN BASELINE AND SIGHT" 1070 PRINT "ANGLE AT APOGEE." 1080 PRINT 1090 INPUT "ENTER BASELINE (DISTANCE FROM LAUNCH PAD TO TRACKING STATION: ";B 1100 PRINT 1110 INPUT "ENTER SIGHT ANGLE (REF GROUND) AT APOGEE: ";A 1120 PRINT 1130 PRINT "THANK YOU." 1140 PRINT 1150 REM CONVERT DEGREES TO RADIANS 1160 LET PI = 22 / 7 1170 LET A = A * (PI / 180) 1180 REM NOW CALCULATE THE HEIGHT 1190 LET H = B * TAN (A) 1200 PRINT "THE ESTIMATED HEIGHT AT APOGEE WAS ";H 1210 PRINT 1220 PRINT "END PROGRAM." 1230 END

The program works pretty much as expected – given a known baseline and several “convenient” angles, we get results that are both intuitive and mathematically correct. As long as the rocket’s flight path is perfectly vertical, we obtain a good approximation of the altitude at apogee.

Since it’s unlikely that an Apple II computer will be portable enough to drag along on a rocketry field exercise, a better approach to this particular problem might be to create a table of baselines and sight angles that can be printed and carried afield when launching rockets.

1000 TEXT : HOME : SPEED= 255 1010 PRINT "TABLE OF ALTITUDES FOR MODEL ROCKETRY:" 1020 PRINT 1025 PRINT TAB( 17);"BASELINE" 1030 PRINT "DEG","100","200","300","400" 1040 FOR I = 0 TO 79: PRINT "=";: NEXT I 1050 FOR A = 5 TO 85 STEP 5 1055 PRINT A, 1060 FOR B = 100 TO 400 STEP 100 1070 LET A1 = A * ((22 / 7) / 180) 1080 LET H = B * TAN (A1) 1090 REM TRUNCATE THE ANSWER 1100 LET H = INT (H) 1110 PRINT H, 1120 NEXT B 1130 NEXT A 1140 END

A screenshot of the table-formatted output is shown below. This can be easily printed on a half-sheet of paper and carried into the field.