|
f1 on 02/28/11 - 11:31:04
windows.bas
see mind from No HTML allowed. You may use BB-code in your posting. we say only and no dfü or other acess which gas and no programmbased aplications like html.bas to receive information and not a list of answers see about birds.bas which excel and no html becouse this there animals the did no like billing from receyceld arms which build by google dos german countrys
edit on 05/07/12 - 13:31:57
100 DIM loc$(10), lat(10), lon(10) 'MARS CLOCK [MARSCLOK.BAS]
110 DEFDBL A-Z: pi = 3.141592653#: dr = pi / 180: i = 0 '120 OPEN "marsclok.dat" FOR INPUT AS #1: INPUT #1, tz$, tz '130 DO WHILE NOT EOF(1): INPUT #1, loc$(i), lat(i), lon(i) '140 i = i + 1: LOOP: CLOSE #1: MD = 24.65979: il = 0 150 CLS : COLOR 14, 0: PRINT " MARS CLOCK": esc$ = CHR$(27) 160 COLOR 10, 0: LOCATE 3, 9: PRINT "EARTH TIME" 170 dt$ = DATE$: tM$ = TIME$: ut = TIMER / 86400 - tz / 24 180 PRINT : PRINT , dt$, tM$; " "; tz$; " = UT + "; tz 200 yr = VAL(RIGHT$(dt$, 4)): mn = VAL(LEFT$(dt$, 2)) 210 dy = VAL(MID$(dt$, 4, 2)): dyt = dy + ut: srs = 90.25 * dr 220 PRINT : COLOR 12, 0: PRINT " MARS PARAMETERS" 230 mlat = lat(il): mlon = lon(il): mloc$ = loc$(il) 240 COLOR 13, 0: PRINT : PRINT , "LOCATION - "; mloc$; " "; 250 PRINT USING "Lat ###.# Lon ####.#"; mlat; mlon: PRINT 300 N = INT(yr + FIX((mn - 9) / 7)) 310 N = -INT(3 * (INT(N / 100) + 1) / 4) 320 N = N - INT(7 * (INT((mn + 9) / 12) + yr) / 4) 330 N = N - 730516.5 + dyt + 367 * yr + INT(275 * mn / 9) '400 tM = N - 4.5: MSD = 44795.99976# + tM * 24 / MD + mlon / 360! 420 MSH = (MSD - INT(MSD)) * 24 430 MSM = (MSH - INT(MSH)) * 60: MSHh = INT(MSH) 440 Myr = INT(MSD / 668.5921) 450 Mday = INT(MSD - INT(Myr * 668.5921)) 500 M = (19.41 + .5240212# * N) * dr: sM = SIN(M): cM = COS(M) 510 Afms = Afms - INT(Afms / 360) * 360: s2M = SIN(2 * M) 520 Afms = 270.39 + .5240384# * N: s3M = SIN(3 * M): s4M = SIN(4 * M) 540 Ls = Afms + (10.691 + 3.7E-07 * N) * sM + .623 * s2M 550 Ls = Ls + .05 * s3M + .005 * s4M: Lr = Ls * dr 560 RA = Ls - 2.86 * SIN(2 * Lr) + .071 * SIN(4 * Lr) - .002 * SIN(6 * Lr) 570 EoT = (Afms - RA) / 15: MTST = MSH + EoT: Ls = Ls - INT(Ls / 360) * 360 580 MTSTh = INT(MTST): MTSTm = (MTST - MTSTh) * 60 590 MTSTh = MTSTh - INT(MTSTh / 24) * 24 600 sDec = .4256 * SIN(Lr): c2M = COS(2 * M) 610 Dec = ATN(sDec / SQR(1 - sDec * sDec)) / dr + .25 * SIN(Lr) 620 rM = 1.00436 - .09309 * cM - .00436 * c2M 630 rM = rM - .00031 * COS(3 * M): rM = 1.5236 * rM 640 LM = Ls + 85.06 + .000029 * N: LM = LM - INT(LM / 360) * 360 650 Le = 100.472 + .9856474 * N: Le = Le - INT(Le / 360) * 360 660 G = (357.528 + .9856003 * N) * dr 670 LA = Le + 1.915 * SIN(G) + .02 * SIN(2 * G) 680 rE = 1.00014 - .01671 * COS(G) - .00014 * COS(2 * G) 690 rME = SQR(rE * rE + rM * rM - 2 * rE * rM * COS((LM - LA) * dr)) 700 ha = 15 * (MSH - 12 + EoT) 710 ha = ha - INT(ha / 360) * 360: IF ha > 180 THEN ha = ha - 360 715 sl = SIN(mlat * dr): cl = COS(mlat * dr): sD = SIN(Dec * dr) 720 SE = sl * sD: cD = COS(Dec * dr) 730 SE = SE + cl * cD * COS(ha * dr): hah = ha / 15 740 IF SE = 1 THEN el = 90: az = 0: GOTO 800 750 el = ATN(SE / SQR(1 - SE * SE)) / dr: az = 90 760 cA = (sD - sl * SE) / cl / SQR(1 - SE * SE): IF cA = 0 THEN 790 770 az = ATN(SQR(ABS(1 - cA * cA)) / cA) / dr 780 IF az < 0 THEN az = 180 + az 790 IF ha > 0 THEN az = 360 - az 800 CMP = 12 - EoT: sha = (COS(srs) - sl * sD) / cl / cD 810 IF ABS(sha) > 1 THEN sr = 0: ss = 0: GOTO 850 820 sha = ATN(SQR(1 - sha * sha) / sha) / dr / 15 830 IF sha < 0 THEN sha = sha + 12 840 sr = CMP - sha: ss = CMP + sha 850 srh = INT(sr): srm = (sr - srh) * 60: srh = (srh + 24) MOD 24 860 ssh = INT(ss): ssm = (ss - ssh) * 60: srh = (srh + 24) MOD 24 870 dl = ss - sr: IF dl < 0 THEN dl = dl + 24 880 IF dl = 0 AND el > 0 THEN dl = 24 890 tME = rME * 499 / 60: rMm = rM * 150: rMEm = rME * 150 900 COLOR 14, 0: PRINT , "Mars Mean Local Time "; 905 PRINT USING "##:##"; MSHh; MSM: PRINT , "Mars Date Year "; 910 PRINT USING "### ME Day ### [MSD=######.###]"; Myr; Mday; MSD 915 PRINT : COLOR 12, 0: PRINT , "Mars True Solar Time "; 920 PRINT USING "##:## [EoT = ###.# minutes]"; MTSTh; MTSTm; EoT * 60 925 PRINT , ; : PRINT USING "Solar Longitude Ls = ###.## deg"; Ls 930 PRINT , ; : PRINT USING "Solar Dec = ###.# deg "; Dec; 935 PRINT USING "HA = ###.# hours"; hah: PRINT , ; 940 PRINT USING "Solar Elevation = ### deg Azimuth = ### deg"; el; az 945 COLOR 9, 0: PRINT : PRINT , ; 950 PRINT USING "Distance to Sun = #.## AU ###.# million km"; rM; rMm 955 PRINT , ; : PRINT USING "Distance to Earth = #.## AU "; rME; 960 PRINT USING "###.# million km"; rMEm: COLOR 7, 0: PRINT : PRINT , ; 965 PRINT USING "Communications Delay ##.# minutes (E-M)"; tME 970 PRINT : COLOR 14, 0: PRINT , ; : PRINT "Sunrise "; 975 PRINT USING "##:## Sunset ##:##"; srh; srm; ssh; ssm; 980 PRINT USING " Hours of Daylight ##.#"; dl; 990 a$ = INKEY$: IF a$ <> "" THEN il = VAL(a$) 999 IF a$ <> esc$ THEN 160
sheejan adhikari on 05/09/12 - 03:13:02
Reply to this message
what is the purpose if this code
|
|