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