10 CLS : CLEAR 20 PRINT : PRINT 30 PRINT " Earth Near-Side Tidal Force Calculator" 40 PRINT " Written by Ethan Skyler 6/12/2009" 50 PRINT 60 DEFDBL A-Z 'Sets all numerical variables to double precision 70 REM Click on QBasic upper left icon. Select Properties. Option. Display Options. Select Window. 80 REM Font select 14. Layout Screen Buffer Size Width 80, Height 40. 90 REM Window Size Width 80, Height 40. 100 REM Earth Diameter = 7927 mi 110 REM Earth Radius = 3963.5 mi x 5280ft/mi er = 20,927,280 ft 120 REM Earth Object (EO1, EO2, EO3) = 40,000,000 lb.m 130 REM Earth Object Moon gravity force (eo2mg) = 135.34 lb.f Average for all Earth's matter. 140 REM Earth/Moon C/M distance = 238,855 mi emd = 1,261,154,400 ft 150 REM Gravitational Constant = 3.321998855540755D-11 lb.f*ft2/lb.m2 160 REM moonmass = 1.61994D+23 200 CONST er = 20927280 210 CONST eo1mass = 40000000 220 CONST eo2mg = 135.34 230 CONST emd = 1261154400 240 CONST gravconst = 3.321998855540755D-11 250 CONST moonmass = 1.61994D+23 300 degrad = ATN(1) * 4 / 180 'conversion between degrees and radians 310 raddeg = 57.29577951# 320 distance$ = "\ \ ############,.## \ \" 330 degree$ = "\ \ ###.#### \ \" 340 force$ = "\ \##########,.###### \ \" 400 PRINT " Enter Tidal Position Angle from Earth/Moon centerline (0.1-89.9 deg)" 410 PRINT " Angle is formed by following Earth/Moon centerline down to Earth's" 420 PRINT " c/m and then proceeding directly up to EO1's surface position on" 430 PRINT " Earth's near side. " 440 PRINT 450 PRINT 460 INPUT " Tidal Position Angle "; tpa 470 IF tpa <= 0 OR tpa >= 90 THEN GOTO 10: ' resets page if angle not above 0 or notless than 90 degrees. 500 REM Calculate triangle T1 to determine the distance EO1 is from Earth's 510 REM center of matter plus EO1's distance from the Earth/Moon centerline. 520 t1sc = er 't1sc is side c, the hypotenuse of triangle T1 and also an Earth redius. 530 t1aa = tpa 't1aa is angle a of triangle T1 and also the Tidal Position Angle 540 t1ab = 90 - t1aa 't1ab is angle b of triangle T1. 550 t1ac = 90 't1ac is angle c of triangle T1. 560 t1sa = SIN(t1aa * degrad) * t1sc 570 t1sb = SIN(t1ab * degrad) * t1sc 600 PRINT 610 PRINT USING degree$; " T1aa = "; t1aa; "degrees (T1, angle A)" 620 PRINT USING degree$; " T1ab = "; t1ab; "degrees (T1, angle B)" 630 PRINT USING degree$; " T1ac = "; t1ac; "degrees (T1, angle C)" 640 PRINT USING distance$; " T1sa = "; t1sa; "ft (T1, side a)" 650 PRINT USING distance$; " T1sb = "; t1sb; "ft (T1, Side b)" 660 PRINT USING distance$; " T1sc = "; t1sc; "ft (T1, Side c)" 700 REM calculate triangle T2 which reaches to the Moon. 710 t2sb = t1sa 720 t2sa = emd - t1sb 730 t2sc = SQR(t2sa ^ 2 + t2sb ^ 2) 740 tant2aa = t2sa / t2sb 750 t2aarad = ATN(tant2aa) 760 t2aa = t2aarad * raddeg 770 t2ab = 90 - t2aa 780 t2ac = 90 800 PRINT USING degree$; " T2aa = "; t2aa; "degrees (T2, angle A)" 810 PRINT USING degree$; " T2ab = "; t2ab; "degrees (T2, angle B)" 820 PRINT USING degree$; " T2ac = "; t2ac; "degrees (T2, angle C)" 830 PRINT USING distance$; " T2sa = "; t2sa; "ft (T2, side a)" 840 PRINT USING distance$; " T2sb = "; t2sb; "ft (T2, side b)" 850 PRINT USING distance$; " T2sc = "; t2sc; "ft (T2, side c)" 900 REM Solve force rectangle. 910 t3ab = 180 - (t1ab + t2aa) 920 t3aa = 90 - t3ab 930 t3ac = 90 940 eo1md = t2sc 950 REM Calculate the moon gravitational force on EO1 embedded at this point. 960 REM This force will determine the length of vector t3sc. Use this length 970 REM to solve the force vector parallelogram yielding the upward-directed 980 REM force (t3sa) which is least effective in causing the tides and the 990 REM horizontal force vector (t3sb) which is the Tidal Force portion of Earth's 1000 REM front-side excess gravitation force that is most effective in causing Earth's 1010 REM front-side ocean tide. We find 44.57 degrees is the zone of the 1020 REM greatest magnitude of the horizontal-directed Tidal Force. 1100 eo1mg = (gravconst * moonmass * eo1mass) / (t2sc ^ 2) 1110 eo1gd = eo1mg - eo2mg 1200 PRINT USING degree$; " T3aa = "; t3aa; "degrees (T3, angle A)" 1210 PRINT USING degree$; " T3ab = "; t3ab; "degrees (T3, angle B)" 1220 PRINT USING degree$; " T3ac = "; t3ac; "degrees (T3, angle C)" 1230 PRINT USING distance$; " EO1md = "; eo1md; " ft (Earth Object 1 Moon distance)" 1240 PRINT USING force$; " EO1mg = "; eo1mg; "lb.f (EO1 Moon gravity force)" 1250 PRINT USING force$; " EO1gd = "; eo1gd; "lb.f (EO1 excess gravitation force)" 1300 t3sc = eo1gd 1310 t3sb = SIN(t3ab * degrad) * t3sc 1320 t3sa = SIN(t3aa * degrad) * t3sc 1400 PRINT USING force$; " T3sa = "; t3sa; "lb.f (vertical force component.)" 1410 PRINT USING force$; " T3sb = "; t3sb; "lb.f (horizontal Tidal Force component.)" 1500 PRINT 1510 INPUT " Calculate another Near Side Tidal Position Angle, Y / N "; in$ 1520 IF in$ = "Y" OR in$ = "y" THEN GOTO 10 1530 CLS 1540 PRINT : PRINT : PRINT : PRINT : PRINT " Press Any Key To End..." 1550 END