Home » Personal collection » Acorn hard disk » misc » dcfprogs » Astronomy

Astronomy

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn hard disk » misc » dcfprogs
Filename: Astronomy
Read OK:
File size: 0445 bytes
Load address: 0000
Exec address: 0000
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10REM Solar System Simulator
   20REM
   30:
   40ON ERROR REPORT:PRINT" @ ";ERL:END
   50MODE 0
   60READ n
   70DIM n$(n),r(n),m(n),d(n),x(n),y(n),yr(n),v(n),dr(n)
   80FOR p=1 TO n
   90READ n$(p),d(p),r(p),m(p),yr(p)
  100x(p)=d(p):y(p)=0:v(p)=(1/180*PI*d(p))/yr(p):dr(p)=90
  110NEXT
  120:
  130REPEAT
  140FOR p=1 TO n
  150xvel=0:yvel=0
  160FOR pp=1 TO n
  170IF pp<>p THEN
  180 tfor=10*m(pp)/(SQR((x(pp)-x(p))^2+(y(pp)-y(p))^2)^2)
  190 tdir=180*ATN((y(pp)-y(p))/(x(pp)-x(p)))/PI
  200 xvel=xvel+tfor*COS(PI*tdir/180)
  210 yvel=yvel+tfor*SIN(PI+tdir/180)
  220ENDIF
  230NEXT
  240dr(p)=dr(p)-90
  250xvn=COS(PI*dr(p)/180)*v(p)+xvel
  260yvn=SIN(PI*dr(p)/180)*v(p)+yvel
  270dr(p)=180*ATN(xvn/yvn)/PI
  280v(p)=SQR(xvn^2+yvn^2)
  290:
  300GCOL 0,0:POINT x(p)/12+500,y(p)/12+500
  310x(p)=x(p)+COS(PI*dr(p)/180)*v(p)
  320y(p)=y(p)+SIN(PI*dr(p)/180)*v(p)
  330GCOL 0,1:POINT x(p)/12+500,y(p)/12+500
  340NEXT
  350UNTIL FALSE
  360:
  370REM Name,Distance,Radius,Mass,Year
  380DATA 10
  390:
  400DATA "Sun",0,103,335,1
  410DATA "Mercury",58,0.4,0.06,0.2
  420DATA "Venus",108,0.95,0.8,0.6
  430DATA "Earth",150,1,1,1
  440DATA "Mars",228,0.5,0.1,1.9
  450DATA "Jupiter",778,11,320,12
  460DATA "Saturn",1427,9,95,30
  470DATA "Uranus",2870,4,15,84
  480DATA "Neptune",4497,4,17,165
  490DATA "Pluto",5900,0.2,0.002,248

� Solar System Simulator
�
:
(� � �:�" @ ";�:�
2� 0
<� n
F5� n$(n),r(n),m(n),d(n),x(n),y(n),yr(n),v(n),dr(n)
P
� p=1 � n
Z � n$(p),d(p),r(p),m(p),yr(p)
d7x(p)=d(p):y(p)=0:v(p)=(1/180*�*d(p))/yr(p):dr(p)=90
n�
x:
��
�
� p=1 � n
�xvel=0:yvel=0
�� pp=1 � n
�
� pp<>p �
�7 tfor=10*m(pp)/(�((x(pp)-x(p))^2+(y(pp)-y(p))^2)^2)
�, tdir=180*�((y(pp)-y(p))/(x(pp)-x(p)))/�
�! xvel=xvel+tfor*�(�*tdir/180)
�! yvel=yvel+tfor*�(�+tdir/180)
��
��
�dr(p)=dr(p)-90
� xvn=�(�*dr(p)/180)*v(p)+xvel
 yvn=�(�*dr(p)/180)*v(p)+yvel
dr(p)=180*�(xvn/yvn)/�
v(p)=�(xvn^2+yvn^2)
":
,$� 0,0:Ȓ x(p)/12+500,y(p)/12+500
6!x(p)=x(p)+�(�*dr(p)/180)*v(p)
@!y(p)=y(p)+�(�*dr(p)/180)*v(p)
J$� 0,1:Ȓ x(p)/12+500,y(p)/12+500
T�
^� �
h:
r$� Name,Distance,Radius,Mass,Year
|� 10
�:
�� "Sun",0,103,335,1
�� "Mercury",58,0.4,0.06,0.2
�� "Venus",108,0.95,0.8,0.6
�� "Earth",150,1,1,1
�� "Mars",228,0.5,0.1,1.9
�� "Jupiter",778,11,320,12
�� "Saturn",1427,9,95,30
�� "Uranus",2870,4,15,84
�� "Neptune",4497,4,17,165
� � "Pluto",5900,0.2,0.002,248
�
00000000  0d 00 0a 1c f4 20 53 6f  6c 61 72 20 53 79 73 74  |..... Solar Syst|
00000010  65 6d 20 53 69 6d 75 6c  61 74 6f 72 0d 00 14 05  |em Simulator....|
00000020  f4 0d 00 1e 05 3a 0d 00  28 14 ee 20 85 20 f6 3a  |.....:..(.. . .:|
00000030  f1 22 20 40 20 22 3b 9e  3a e0 0d 00 32 07 eb 20  |." @ ";.:...2.. |
00000040  30 0d 00 3c 07 f3 20 6e  0d 00 46 35 de 20 6e 24  |0..<.. n..F5. n$|
00000050  28 6e 29 2c 72 28 6e 29  2c 6d 28 6e 29 2c 64 28  |(n),r(n),m(n),d(|
00000060  6e 29 2c 78 28 6e 29 2c  79 28 6e 29 2c 79 72 28  |n),x(n),y(n),yr(|
00000070  6e 29 2c 76 28 6e 29 2c  64 72 28 6e 29 0d 00 50  |n),v(n),dr(n)..P|
00000080  0d e3 20 70 3d 31 20 b8  20 6e 0d 00 5a 20 f3 20  |.. p=1 . n..Z . |
00000090  6e 24 28 70 29 2c 64 28  70 29 2c 72 28 70 29 2c  |n$(p),d(p),r(p),|
000000a0  6d 28 70 29 2c 79 72 28  70 29 0d 00 64 37 78 28  |m(p),yr(p)..d7x(|
000000b0  70 29 3d 64 28 70 29 3a  79 28 70 29 3d 30 3a 76  |p)=d(p):y(p)=0:v|
000000c0  28 70 29 3d 28 31 2f 31  38 30 2a af 2a 64 28 70  |(p)=(1/180*.*d(p|
000000d0  29 29 2f 79 72 28 70 29  3a 64 72 28 70 29 3d 39  |))/yr(p):dr(p)=9|
000000e0  30 0d 00 6e 05 ed 0d 00  78 05 3a 0d 00 82 05 f5  |0..n....x.:.....|
000000f0  0d 00 8c 0d e3 20 70 3d  31 20 b8 20 6e 0d 00 96  |..... p=1 . n...|
00000100  11 78 76 65 6c 3d 30 3a  79 76 65 6c 3d 30 0d 00  |.xvel=0:yvel=0..|
00000110  a0 0e e3 20 70 70 3d 31  20 b8 20 6e 0d 00 aa 0d  |... pp=1 . n....|
00000120  e7 20 70 70 3c 3e 70 20  8c 0d 00 b4 37 20 74 66  |. pp<>p ....7 tf|
00000130  6f 72 3d 31 30 2a 6d 28  70 70 29 2f 28 b6 28 28  |or=10*m(pp)/(.((|
00000140  78 28 70 70 29 2d 78 28  70 29 29 5e 32 2b 28 79  |x(pp)-x(p))^2+(y|
00000150  28 70 70 29 2d 79 28 70  29 29 5e 32 29 5e 32 29  |(pp)-y(p))^2)^2)|
00000160  0d 00 be 2c 20 74 64 69  72 3d 31 38 30 2a 99 28  |..., tdir=180*.(|
00000170  28 79 28 70 70 29 2d 79  28 70 29 29 2f 28 78 28  |(y(pp)-y(p))/(x(|
00000180  70 70 29 2d 78 28 70 29  29 29 2f af 0d 00 c8 21  |pp)-x(p)))/....!|
00000190  20 78 76 65 6c 3d 78 76  65 6c 2b 74 66 6f 72 2a  | xvel=xvel+tfor*|
000001a0  9b 28 af 2a 74 64 69 72  2f 31 38 30 29 0d 00 d2  |.(.*tdir/180)...|
000001b0  21 20 79 76 65 6c 3d 79  76 65 6c 2b 74 66 6f 72  |! yvel=yvel+tfor|
000001c0  2a b5 28 af 2b 74 64 69  72 2f 31 38 30 29 0d 00  |*.(.+tdir/180)..|
000001d0  dc 05 cd 0d 00 e6 05 ed  0d 00 f0 12 64 72 28 70  |............dr(p|
000001e0  29 3d 64 72 28 70 29 2d  39 30 0d 00 fa 20 78 76  |)=dr(p)-90... xv|
000001f0  6e 3d 9b 28 af 2a 64 72  28 70 29 2f 31 38 30 29  |n=.(.*dr(p)/180)|
00000200  2a 76 28 70 29 2b 78 76  65 6c 0d 01 04 20 79 76  |*v(p)+xvel... yv|
00000210  6e 3d b5 28 af 2a 64 72  28 70 29 2f 31 38 30 29  |n=.(.*dr(p)/180)|
00000220  2a 76 28 70 29 2b 79 76  65 6c 0d 01 0e 1a 64 72  |*v(p)+yvel....dr|
00000230  28 70 29 3d 31 38 30 2a  99 28 78 76 6e 2f 79 76  |(p)=180*.(xvn/yv|
00000240  6e 29 2f af 0d 01 18 17  76 28 70 29 3d b6 28 78  |n)/.....v(p)=.(x|
00000250  76 6e 5e 32 2b 79 76 6e  5e 32 29 0d 01 22 05 3a  |vn^2+yvn^2)..".:|
00000260  0d 01 2c 24 e6 20 30 2c  30 3a c8 92 20 78 28 70  |..,$. 0,0:.. x(p|
00000270  29 2f 31 32 2b 35 30 30  2c 79 28 70 29 2f 31 32  |)/12+500,y(p)/12|
00000280  2b 35 30 30 0d 01 36 21  78 28 70 29 3d 78 28 70  |+500..6!x(p)=x(p|
00000290  29 2b 9b 28 af 2a 64 72  28 70 29 2f 31 38 30 29  |)+.(.*dr(p)/180)|
000002a0  2a 76 28 70 29 0d 01 40  21 79 28 70 29 3d 79 28  |*v(p)..@!y(p)=y(|
000002b0  70 29 2b b5 28 af 2a 64  72 28 70 29 2f 31 38 30  |p)+.(.*dr(p)/180|
000002c0  29 2a 76 28 70 29 0d 01  4a 24 e6 20 30 2c 31 3a  |)*v(p)..J$. 0,1:|
000002d0  c8 92 20 78 28 70 29 2f  31 32 2b 35 30 30 2c 79  |.. x(p)/12+500,y|
000002e0  28 70 29 2f 31 32 2b 35  30 30 0d 01 54 05 ed 0d  |(p)/12+500..T...|
000002f0  01 5e 07 fd 20 a3 0d 01  68 05 3a 0d 01 72 24 f4  |.^.. ...h.:..r$.|
00000300  20 4e 61 6d 65 2c 44 69  73 74 61 6e 63 65 2c 52  | Name,Distance,R|
00000310  61 64 69 75 73 2c 4d 61  73 73 2c 59 65 61 72 0d  |adius,Mass,Year.|
00000320  01 7c 08 dc 20 31 30 0d  01 86 05 3a 0d 01 90 17  |.|.. 10....:....|
00000330  dc 20 22 53 75 6e 22 2c  30 2c 31 30 33 2c 33 33  |. "Sun",0,103,33|
00000340  35 2c 31 0d 01 9a 1f dc  20 22 4d 65 72 63 75 72  |5,1..... "Mercur|
00000350  79 22 2c 35 38 2c 30 2e  34 2c 30 2e 30 36 2c 30  |y",58,0.4,0.06,0|
00000360  2e 32 0d 01 a4 1e dc 20  22 56 65 6e 75 73 22 2c  |.2..... "Venus",|
00000370  31 30 38 2c 30 2e 39 35  2c 30 2e 38 2c 30 2e 36  |108,0.95,0.8,0.6|
00000380  0d 01 ae 17 dc 20 22 45  61 72 74 68 22 2c 31 35  |..... "Earth",15|
00000390  30 2c 31 2c 31 2c 31 0d  01 b8 1c dc 20 22 4d 61  |0,1,1,1..... "Ma|
000003a0  72 73 22 2c 32 32 38 2c  30 2e 35 2c 30 2e 31 2c  |rs",228,0.5,0.1,|
000003b0  31 2e 39 0d 01 c2 1d dc  20 22 4a 75 70 69 74 65  |1.9..... "Jupite|
000003c0  72 22 2c 37 37 38 2c 31  31 2c 33 32 30 2c 31 32  |r",778,11,320,12|
000003d0  0d 01 cc 1b dc 20 22 53  61 74 75 72 6e 22 2c 31  |..... "Saturn",1|
000003e0  34 32 37 2c 39 2c 39 35  2c 33 30 0d 01 d6 1b dc  |427,9,95,30.....|
000003f0  20 22 55 72 61 6e 75 73  22 2c 32 38 37 30 2c 34  | "Uranus",2870,4|
00000400  2c 31 35 2c 38 34 0d 01  e0 1d dc 20 22 4e 65 70  |,15,84..... "Nep|
00000410  74 75 6e 65 22 2c 34 34  39 37 2c 34 2c 31 37 2c  |tune",4497,4,17,|
00000420  31 36 35 0d 01 ea 20 dc  20 22 50 6c 75 74 6f 22  |165... . "Pluto"|
00000430  2c 35 39 30 30 2c 30 2e  32 2c 30 2e 30 30 32 2c  |,5900,0.2,0.002,|
00000440  32 34 38 0d ff                                    |248..|
00000445