Chapter 1 – Time (Reaction Timer)

Measuring time, different calendars
Spectrum Calendar, prints a calendar for any year after 1582
Julian Date, works out the Julian Day number for any date
Julian Calendar, prints a complete Julian Day calendar for any month of any year
Day of the Week, identifies the day of the week for any date
Interval Days, the interval between any two dates from a few minutes to centuries apart
Local Sidereal Time, calculates ‘star time’ for any date and hour
Reaction Timer, find out your reaction time to get accurate readings.

Reaction Timer

It is appropriate to include this program under the section dealing with time although it very much relates to the rather imprecise impression our brain has of short intervals of time. Because the human eye is readily available as a superbly sensitive detector at the telescope (and photo-detectors are expensive, complex and generally unavailable) the human eye continues to hold sway.

Occultations – timing the disappearance or reappearance of a star trom behind the Moon or an asteroid – can yield accurate results of scientific value about the motion or diameter of that body. This work is almost exclusively done by amateur astronomers using small telescopes. It is, however, important to know what is called the ‘personal equation’ of each observer (the observer’s accuracy) to adjust his results – hopefully to 0.1 second accuracy.

The program
This program uses the Spectrum’s 50 Hertz ‘clock’ – started with POKE 23672,0 in Line 45 — to test your reaction times to a series of mock occultations of both disappearances and reappearances. Each result is revealed audibly, numerically and visually (via a coloured bar-graph). Each event is started with a random PAUSE in Line 30 to avoid complete anticipation. If you cheat – by pressing key ‘p’ prematurely – or are so slow as to take longer than 0.44 seconds, you get a warning, and the result is disregarded. The Spectrum ROM will also try to cheat by skipping lines if the PAUSE 1 in Line 21 is omitted, but this is not added to your result.

The essential part of the program is in Lines 45 and 100 — which, respectively POKE the timer to start and PEEK the answer. By limiting the instructions between these two to an INKEY$ loop, <0.02 seconds (to process the data) is added to your reaction time. Your results may be 10 to 20 times slower than this delay. Figure 1.4 shows a typical result.

Figure 1.4
Typical results for one individual’s reaction times. The brain invariably proves more sluggish on reappearances (0.316 seconds on average) in comparison with disappearances (0.336 seconds average), as this sample demonstrates.


2 REM ***********************
3 PRINT “Reaction Timer”
4 PRINT ‘”Personal Equation :10 simulatedoccultations.”
5 FOR i=1 TO 7: PAUSE 20: PRINT AT 9,0; INK i;” 5 reappearances”;AT 11,0; INK 8-i;”then 5 disappearances”: NEXT i: PAUSE 200
6 PRINT ””If your time >.44sec or =0sec the result is discounted.”
7 PRINT #0; FLASH 1;” Press any key to start…”: PAUSE 0
8 BORDER 0: PAPER 0: INK 7: CLS : LET tt=0
10 PRINT “Press ‘p’ as soon as the ‘star’ appears/disappears”
12 PAUSE 200: PRINT AT 9,0; FLASH 1;”seconds”
15 LET d=0: LET x=0: FOR z=0 TO 1: LET tt=0: FOR f=1 TO 5
20 PRINT AT 7,14;”_ _”
21 PAUSE 1
25 IF x=0 THEN GO TO 30
26 PLOT 127,112
30 PAUSE 200+RND*300
40 PLOT OVER d;127,112
45 POKE 23672,0
50 IF INKEY$=”p” THEN GO TO 100
60 GO TO 50
100 LET t=(PEEK 23672)/50
110 PRINT AT 10+x+f,0;f;” “;
120 IF t=0 OR t>.44 THEN PRINT “Too fast/slow”: LET q=3+t*20: GO SUB 260: PRINT AT 10+f+x,0;”Ready “: GO TO 20
130 PRINT t
140 FOR n=9 TO t*50+9
150 PRINT AT f+x+10,n; INK t*20-3;CHR$ 140: NEXT n: LET q=20*t: GO SUB 260
160 INPUT FLASH 1;”Press ENTER”, LINE z$
170 LET tt=tt+t: NEXT f
180 PRINT “Your PE =”; FLASH 1;tt/5; FLASH 0;(“(re” AND x=0)+(“(dis” AND x0)+”appearance)”
190 IF x=0 THEN LET q=3: GO SUB 260: INPUT FLASH 1;”Now disappearances-press ENTER”; LINE z$
200 LET d=1: LET x=6: NEXT z
210 PRINT “Z for printout : R to RUN again”
220 LET q=1: GO SUB 260
230 IF INKEY$=”” THEN GO TO 230
250 RUN
260 FOR v=-30 TO 40 STEP q: BEEP .01*q,v: NEXT v: RETURN
9900 REM ***********************
9990 SAVE “speed”

A video of this program running can be seen here:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s