home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1995 February / 1995-02b.d64 / sattrack.64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  57 lines

  1. 10 rem copyright 1995 - compute publications intl ltd - all rights reserved
  2. 20 rem satellite plotting program  d.klich
  3. 30 dimsn$(100),sa(100):poke53280,0:poke53281,0:dr=.0174532925:rd=57.2957795
  4. 40 fori=1to100:readsn$(i),j:ifsn$(i)<>"end"thensa(i)=j*.0174533:next
  5. 50 q=i-1:open1,4:print"[147]make sure the printer is on and at top":printspc(14)"of the form.":printspc(8)"press space when ready"
  6. 60 geta$:ifa$=""then60
  7. 65 ifa$<>" "then60
  8. 70 print#1,"earth satellite coordinates for site located at:":print#1
  9. 80 print"enter site longitude in:":print"degrees,minutes,secomds,e or w":input"example 87,54,46,w  ";d,m,s,ew$
  10. 90 ifew$="e"thenj=-1:goto110
  11. 100 ifew$="w"thenj=1:goto110
  12. 105 goto80
  13. 110 print#1,"longitude   ";d;" ";m;"'";s;chr$(34);" ";ew$
  14. 120 lo=dr*j*(d+(m/60)+(s/3600))
  15. 130 print"enter site latitude in":print"degrees,minutes,seconds,n or s":input"example 42,8,16,n  ";d,m,s,ns$
  16. 140 print#1,"latitude    ";d;" ";m;"'";s;chr$(34);" ";ns$
  17. 150 la=dr*(d+(m/60)+(s/3600))
  18. 160 print"enter true north correction as:":print"..e or ..w":input"example:  02e  ";a$
  19. 170 ifright$(a$,1)="w"then190
  20. 180 ifright$(a$,1)="e"thenj=-j:goto190
  21. 185 goto160
  22. 190 print#1,"correction for true north ";left$(a$,len(a$)-1);:ifright$(a$,1)="e"thenprint#1," east":goto200
  23. 195 print#1," west"
  24. 200 cr=val(left$(a$,len(a$)-1))*j*dr
  25. 210 print#1:print#1,"azimuth figures are given in 'true' and 'compass' readings":print#1,"use the compass readings for site testing"
  26. 220 print#1,"satellite"spc(6)"long."spc(4)"true"spc(4)"elevation"spc(3)"distance"spc(3)"compass"
  27. 230 print#1,"  name";spc(16);"azimuth";spc(4);"in deg";spc(5);"in miles";spc(3);"azimuth"
  28. 240 fori=1to62:print#1,chr$(99);:next:print#1
  29. 250 fori=1toq:x=cos(lo-sa(i))*cos(la):gosub340:y=ac:x=tan(la)/tan(y):gosub340:az=(NULL)+ac
  30. 260 ev=atn((cos(y)-.15166)/sin(y))
  31. 270 r=3963-(la*26.6/(NULL)):ha=ev+((NULL)/2):x=r/26263*sin(ha):ra=atn(x/sqr(-x*x+1)):da=(NULL)-ra-ha:d=r*sin(da)/sin(ra)
  32. 280 ifsa(i)<0thenk$="e":goto290
  33. 285 k$="w"
  34. 290 if ev<0then330
  35. 300 ifsa(i)<lothenaz=((NULL)*2)-az
  36. 310 p1$=str$(abs(int(sa(i)*rd))):p2$=str$(int((az*rd)*1000)/1000):p3$=str$(int((ev*rd)*1000)/1000):p4$=str$(int(abs(d))):p5$=str$(int((az+cr)*rd*1000)/1000)
  37. 320 print#1,sn$(i);spc(15-len(sn$(i)));p1$;k$;spc(5-len(p1$));p2$;spc(11-len(p2$));p3$;spc(11-len(p3$));p4$;spc(11-len(p4$));p5$
  38. 330 next:print#1:close1:end
  39. 340 x=int(x*100000)/100000
  40. 350 ac=89*dr:aa=(NULL)/4
  41. 360 ab=cos(ac):ab=int(ab*100000)/100000
  42. 370 ifx=abthenreturn
  43. 380 ifx>abthenaa=abs(x-ab):ac=ac-aa:goto360
  44. 390 aa=abs(x-ab):ac=ac+aa:goto360
  45. 400 data "satcom c-5",139,"satcom c-1",137,"satcom c-4",135,"galaxy 1",133,"satcom c-3",131,"asc1",128,"galaxy 5",125,"gstar iv",125,"telstar 303",123
  46. 410 data "spacenet 1",120,"morelos 2",116.7,"anik c3",114.9,"morelos 1",113.5,"anik e1",111.1,"anik c1 & c2",110,"anik e2",107.3,"gstar 2",105,"gstar a1",103
  47. 420 data "spacenet iv",101,"galaxy vi",99,"telstar 301",96,"sbs 3",95,"galaxy 3",93.5,"sbs 4",91,"spacenet 3",87,"telstar 302",85,"satcom k-1",85,"anik d2",82
  48. 430 data "satcom k-2",81,"galaxy 2",74,"satcom f-2r",72,"brasilsat",70,"spacenet 2",69,"intelsat 513",53,"intelsat 506",50,"panamsat f1",45,"tdrss-41",41
  49. 440 data "intelsat 603",34.5,"hispasat",31,"marcopolo i",31,"intelsat 601",27.5,"intelsat 605",24.5,"intelsat k",21.5,"tv-sat 1/2",19.2,"tdf 1a/1b",19
  50. 450 data "olympus 1",18.8,"intelstat 515",18.5,"gorizont 15",14,"gorizont 7",11,"telecom 2a",8,"telecom 2b",5,"intelsat 512",1,"thor",-1,"telecom 1c",-3
  51. 460 data "tele-x",-5,"eutelsat ii f4",-7,"eutelsat ii f2",-10,"eutelsat ii f1",-13,"eutelsat ii f3",-16,"astra 1a & 1b",-19.2,"eutelsat i f5",-21.5
  52. 470 data "kopernikus dfs1",-23.5,"arabsat 1c",-26,"kopernikus dfs2",-28.5,"kopernikus dfs3",-33.5,"gorizont 12",-40,"arabsat 1b",-43,"gorizont 11",-53
  53. 480 data "intelsat 507",-57,"intelsat 604",-60,"intelsat 602",-63,"intelsat 505",-66,"insat 2a",-74,"gorizont 10",-80,"insat 1d",-83,"dfh2-a1",-87.5
  54. 490 data "gorizont 13",-90,"intelsat 501",-91.5,"gorizont 19",-96.5,"ekran 19",-99,"statsionar 21",-103,"asiasat 1",-105.5,"palapa b2r",-108,"bs-3a/3b",-110
  55. 500 data "dfh2-a2",-110.5,"palapa b2p",-113,"cs-3a sakura",-132,"jcsat 1",-150,"jcsat 2",-154,"aussat a2",-156,"aussat a1",-160,"aussat a3",-164
  56. 510 data "superbird b1",-162,"intelstat 510",-174,"intelstat 511",-177,"intelstat 508",-180,"end",0
  57.