Determining the Altitude of a Model Rocket

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:

diagram1

 

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.

screenshot_alt1

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.

screenshot_alt2

Warming Up for the Retrochallenge

telescope_41073Simulating a spacecraft — or more accurately simulating spaceflight — will involve any number of astronomical calculations.  At the minimum, for a simple simulation of a ballistic or orbital spaceflight, one must solve the “two body problem” when finding the spacecraft’s trajectory.  Long before Galileo, Newton, Copernicus, or Kepler dared to challenge conventional wisdom or the church itself, the clergy found themselves with a similar problem:  What is the date of Easter?

Easter is normally defined as the first sunday after the fourteenth day after the first new moon following the Vernal Equinox… Since the date of Easter is determined by the date of Passover and we’re mixing both a solar and lunar calendar (courtesy of the ancient Hebrews) with the modifications to the solar calendar courtesy of both Julius Caesar and Pope Gregory, the problem becomes one not only of Sun, Moon, and Earth but one of Political whim and Ecclesiastical dogma… Are we sure they didn’t have computers back in the middle ages?  Oh, yes!  They were called “Monks!”

Anyway, the best definition for Easter (and the means by which one can calculate the date) can be found in ‘The Explanatory Supplement to the Astronomical Ephemeris and American Ephemeris and Nautical Almanac.”  Otherwise, there are some nice tables in the ‘Book of Common Prayer (1662)’, and an algorithm found in ‘Butcher’s Ecclesiastical Calendar’ published in 1876.  A variant of this algorithm, prepared for use with a handheld calculator, was printed in ‘Practical Astronomy with Your Calculator’ by Peter Duffett-Smith in 1979.

Applesoft Source Code Follows:

]LIST

 1000 REM FIND THE DATE OF EASTER
 1010 REM WORDS FOR ANY YEAR IN THE GREGORIAN CALENDAR FROM
 1020 REM 1583 ONWARDS
 1030 REM 
 1040 REM ALGORITHM IS TAKEN FROM THE BOOK 'PRACTICAL ASTRONOMY
 1050 REM WITH YOUR CALCULATOR' BY PETER DUFFETT-SMITH, COPYRIGHT
 1060 REM 1979 BY CAMBRIDGE UNIVERSITY PRESS.
 1070 REM 
 1080 TEXT : HOME : SPEED= 255
 1090 PRINT "CALCULATE THE DATE OF EASTER:"
 1100 PRINT 
 1110 INPUT "PLEASE ENTER THE YEAR (POST 1583 AD): ";Y
 1120 PRINT 
 1130 IF Y > = 1583 THEN 1170
 1140 PRINT "SORRY, YEAR MUST BE GREATER THAN 1583."
 1150 PRINT 
 1160 GOTO 1110
 1170 LET A = Y - ( INT (Y / 19) * 19)
 1180 LET B = INT (Y / 100)
 1190 LET C = Y - (B * 100)
 1200 LET D = INT (B / 4)
 1210 LET E = B - (D * 4)
 1220 LET F = INT ((B + 8) / 25)
 1230 LET G = INT ((B - F + 1) / 3)
 1240 LET H1 = 19 * A + B - D - G + 15
 1250 LET H = H1 - ( INT (H1 / 30) * 30)
 1260 LET I = INT (C / 4)
 1270 LET K = C - (I * 4)
 1280 LET L1 = 32 + 2 * E + 2 * I - H - K
 1290 LET L2 = INT (L1 / 7)
 1300 LET L = L1 - (L2 * 7)
 1310 LET M = INT ((A + 11 * H + 22 * L) / 451)
 1320 LET N1 = (H + L - 7 * M + 114)
 1330 LET N = INT (N1 / 31)
 1430 LET P = N1 - (N * 31) + 1
 1440 PRINT "MONTH: ";N
 1450 PRINT "DAY: ";P
 1460 PRINT 
 1470 PRINT "END PROGRAM."
 1480 END

]

easter_2017