Chapter 2 – Spheres Within Spheres (Star Tracker)

The celestial sphere and coordinate positions
Celestial Sphere (3D images), reconstruct a 3D image via the Spectrum
Celestial Sphere (X-eyed 3D), 3D images via your ZX printer
Star Point, find out where a particular star or planet can be found in the sky
Star Tracker, plots a star or planet on a representation of the sky over a 24-hour period.

Star Tracker

This program expands the previous Star Point program and, using the full Spectrum screen with colour, PLOTs a star or planet on a representation of the sky over a 24-hour period. It includes DATA on twenty selected bright stars fairly evenly distributed over the star sphere. This considerably eases the task of finding such information. (The program does have the option of omitting this DATA, perhaps for inclusion at a later date. This effectively reduces the listing by one third. Do so by omitting Line 125 and all lines from 1000 onwards.)

Figure 2.5
The daily track of the star Vega across the skies of Reykjavik plotted at hourly intervals. The short bar marks the start and finish of the plot at midnight GMT.


Figure 2.6
From Perth (Australia), Vega only appears briefly above the northern horizon.


Figure 2.7
Adjacent to the North Pole, Vega remains at an almost constant altitude above the whole horizon.


Figure 2.8
From Nairobi, Vega cricles the northern horizon in an anticlockwise direction.


Test examples
The sample screen COPYs, Figures 2.5, 2.6, 2.7 and 2.8, show one star (Vega) on one particular day (21 August 1984), as PLOTted over a 24-hour period for various latitudes. These are:

+67.7° N around the latitude of Reykjavik, Iceland
-32.1° S around the latitude of Perth, Australia
+89.0° N around the latitude of adjacent to North Pole
-02.1° S around the latitude of Nairobi, Kenya

INPUTting the information
Any one of the 20 stars listed can be selected by simply entering the star number as shown in Figure 2.9. It is not necessary to know the star’s coordinates (RA and Dec) on the celestial sphere as these are stored in the program as DATA and used automatically. If the star you are interested in is not listed, INPUT 21 and enter the name, RA and Dec when prompted by the program. This data is available from any star atlas. If you wish to enter a planet, again use INPUT of 21 but consult an astronomical almanac or use the Planetary Ephemeris program in Chapter 6 to find its locations for the selected date.

Figure 2.9
Selecting a star by number. Option 21 allows the INPUT of an alternative star or planet.


Any date can be INPUT, but for the stars, which are considered to be fixed to the celestial sphere, you need not worry about the year, as they tend to repeat the same display on the same day each year: and so they repeat themselves for the start and finish of the PLOT routine on the same day each year. This is not the case with the planets, which are the wanderers of the sky.

The screen display
A Mercators projection is used to represent the sky and some distortion is inevitable in converting a spherical surface to the flat TV display. (You may recall how large Greenland and Antartica appeared on school maps using this projection.)

The zenith at +90° (the point immediately above the observer’s head) and the nadir at -90° (the point below his feet) become imaginary lines at the top and bottom of the display. The encircling 360° of the horizon at 0° altitude is marked N, E, S, W and back again to N through the middle of the screen, dividing the sky from the ground below.

The star or planet is PLOTted at hourly intervals using INK 9 (as a contrast to the PAPER colour tone) and so is visible even when below the observer’s horizon. This interval can be amended to any value by changing the STEP (set at 1 — for one hour — in this program) in Line 320.

Distant shores
Unless you have resided in the opposing hemisphere and are familiar with the night sky, the motion of a star as accurately depicted in this program may come as something of a surprise. For example, a star like Vega will move from east to west in a clockwise direction in the northern hemisphere but in an anticlockwise direction in the southern hemisphere. From the equator, stars may rise vertically to the zenith from the eastern horizon and appear to ‘jump’ (it is a line and not a point remember) across the screen and set in the west. At the north pole all stars and planets cruise from left to right parallel to the horizon, never rising or setting. The same applies at the south pole but the motion is in the reverse direction from right to left. Stars that refuse to rise at the north pole are permanently above the horizon at the south pole and vice versa.

All these effects can be demonstrated with this program. A star that never sets at a given latitude is said to be ‘circumpolar’ and of course the Sun (which is the nearest star) is so placed in the ‘land of the midnight sun at certain latitudes (+ or -) during that hemisphere’s summer. Test it!

9 REM ***********************
10 REM Star Tracker
11 REM ***********************
30 RESTORE : DATA 0,16,16,124,16,16,0,124: FOR f=0 TO 7: READ d: POKE USR “a”+f,d: NEXT f
40 DIM z$(320)
50 PRINT “Enter the following”
60 INPUT “Date yyyy,mm,dd”;TAB 5;y;TAB 10;mm;TAB 13;d: IF mm>12 OR d31 THEN GO TO 60
69 REM ***********************
70 REM JulianDy/Sidereal Time
71 REM ***********************
80 CLS : LET yy=y: LET m=mm
90 IF m>2 THEN LET m=m+1: GO TO 110
100 LET y=y-1: LET m=m+13
110 LET j=INT (365.25*y)+INT (30.6001*m)+d+1720982
120 LET g=6.63627+6.570982e-2*(j-2443144): LET ts=g-INT (g/24)*24
125 GO TO 1000: REM star list
130 INPUT “Star/planet name”, LINE a$: IF LEN a$>10 THEN PRINT #0; FLASH 1;”Too big!”: PAUSE 100: GO TO 130
140 INPUT “Right Asn (”;TAB 11;ra
150 INPUT “Declination (\add.d)”;TAB 13; LINE d$
155 IF d$(1)”+” AND d$(1)”-” THEN GO TO 150
160 LET dc=VAL d$
170 IF ABS dc>89.9 THEN GO TO 150
180 INPUT “Your latitude (\all.l)”;TAB 15; LINE l$
185 IF l$(1)”+” AND l$(1)”-” THEN GO TO 180
190 LET l=VAL l$
200 IF ABS l>89.9 THEN GO TO 180
209 REM ***********************
210 REM print sky projection
211 REM ***********************
230 PRINT AT 1,0;”zenith loctime GST az alt”
240 PRINT PAPER 4;AT 11,0;z$: FOR n=1 TO 20 STEP 2: PAPER 4 AND n>10
250 PRINT AT n+1,0;100-n*10
260 NEXT n
270 PRINT AT 11,0;”n–ne–+e–se–+s–sw–+w–nw–n-10 horizon”
280 PRINT PAPER 5;AT 19,3;a$;” RA=”;ra;” Dec=”;d$
290 PRINT “-90 nadir “;d;”/”;mm;”/”;yy;” lat=”;l$: PAPER 1
300 LET c=360: LET r=180/PI: LET lr=l/r: LET f=100/60: LET dr=dc/r: LET rh=INT ra+(ra-INT ra)/f
309 REM ***********************
310 REM main’timer’loop T=hrs
311 REM ***********************
320 FOR t=0 TO 24: BEEP .01,40
330 LET s=t+ts+t/1436*4
340 IF s>24 THEN LET s=s-24
350 IF s<0 THEN LET s=s+24
360 LET st=INT (s*100)/100
369 REM ***********************
370 REM calc azimuth,altitude
371 REM ***********************
380 LET hr=((s-rh)*15)/r
390 LET al=r*ASN (SIN dr*SIN lr+COS dr*COS lr*COS hr)
400 LET ar=al/r: LET v=SIN hr
410 LET az=r*ACS ((SIN dr-SIN lr*SIN ar)/(COS lr*COS ar))
420 REM decimal hrs=he mn
429 REM ***********************
430 REM plot startrack on sky
431 REM ***********************
440 PRINT AT 0,7;: LET h=t: GO SUB 530: PRINT AT 0,15;: LET h=st: GO SUB 530
445 PRINT AT 0,22;INT az;”\’ “;TAB 27;INT al;”\’ ”
450 LET z=az/5.7*4: LET a=al/5*4: PLOT z,a+84: NEXT t
460 DRAW FLASH 1;1,0
469 REM ***********************
470 REM beep & select option
471 REM ***********************
480 PRINT #1;”Key C=copy D=new date S=new star L=new latitude”
490 FOR n=.1 TO 5 STEP .1: BEEP n/100,n*10: NEXT n: PAUSE 0
500 POKE 23693,56: GO TO (INKEY$=”l”)*180+(INKEY$=”c”)*510+(INKEY$=”s”)*1000+(INKEY$=”d”)*60
510 COPY : GO TO 490
519 REM ***********************
520 REM decimal hrs=he mn
521 REM ***********************
530 PRINT INT h;”h”;INT ((h-INT h)*60+.5);”m”: RETURN
999 REM ***********************
1000 REM starlist
1001 REM ***********************
1010 CLS : RESTORE 2000: GO TO 2100
1014 REM ***********************
1015 REM *input star no
1016 REM ***********************
1020 INPUT “Select star by number “;t: IF t21 THEN GO TO 1020
1030 IF t=21 THEN GO TO 1030
1040 LET a$=k$(t): LET ra=VAL r$(t): LET d$=t$(t): LET dc=VAL d$(2 TO ): IF d$(1)=”-” THEN LET dc=-dc
1050 GO TO 180
1999 REM ***********************
2000 DATA “Rigel”,”Regulus”,”Spica”,”Aldebaran”,”Betelgeuse”,
2020 DATA “Pleiades”,”Cor Caroli”,”Altair”,”Vega”,”Deneb”,
2024 REM ***********************
2025 REM Constellations
2026 REM ***********************
2030 DATA “Ori”,”Leo”,”Vir”,”Tau”,”Ori”,”UMj”,”UMi”,”Gem”,
2040 DATA “Tau”,”CVn”,”Aql”,”Lyr”,”Cyg”,”CMi”,”CMj”,”Aur”,
2044 REM ***********************
2045 REM RA & Dec of stars
2046 REM ***********************
2050 DATA “05.13”,”-08″,”10.07″,”+12″,”13.24″,”-11″,”04.34″,
2060 DATA “02.07”,”+89″,”07.44″,”+28″,”07.33″,”+32″,”03.46″,
2070 DATA “18.36”,”+39″,”20.41″,”+45″,”07.38″,”+05″,”06.44″,
2089 REM ***********************
2090 REM List Stars
2091 REM ***********************
2100 DIM k$(20,11): DIM e$(20,4): DIM r$(20,6): DIM t$(20,3)
2105 PRINT PAPER 5;”No Name Con R.A. Dec”
2110 FOR f=1 TO 20: READ k$(f): PRINT (” ” AND f<10);f;” “;k$(f): NEXT f
2120 FOR f=1 TO 20: READ e$(f): PRINT AT f,16;e$(f): NEXT f
2130 FOR f=1 TO 20: READ r$(f),t$(f): PRINT AT f,22;r$(f);t$(f): NEXT f
2140 PRINT PAPER 6;”21 ???? (your star) ??.?? ??? ”
2150 GO TO 1020
9900 REM ***********************
9990 SAVE “Startrack” LINE 1

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