Calculators

Historical Document · 1983

Position Determination with Loran-C Triplets Using the HP-75C, the Sharp PC-1500 (TRS-80 PC-2) or the TRS-80 Model 100

Read the PDF ↗

A Naval Postgraduate School report (NPS55-83-023, September 1983) by Rex H. Shudde with programs for Loran-C navigation fixes on the HP-75C, the Sharp PC-1500 and the TRS-80 Model 100.

Author
Rex H. Shudde
Year
1983
Type
Historical Document
Credit
US Navy (public domain); via Wikimedia Commons.

← Back to the Reference Library

Position Determination with Loran-C Triplets Using the HP-75C, the Sharp PC-1500 (TRS-80 PC-2) or the TRS-80 Model 100

pte fi, 8 DOW'S es : MONTEKE), CALIFORNIA 93940 NPS55-83-023 —S AVAL POSTGRADUATE SCHOOL Monterey, California ~ POSITION DETERMINATION WITH LORAN-C TRIPLETS USING THE HEWLETT-PACKARD HP-75C, THE SHARP PC-1500 (TRS-80 PC-2) OR THE RADIO SHACK TRS-80 MODEL 100 PORTABLE COMPUTERS by Rex H. Shudde September 1983 FEDDOCS Approved for public release; distribution unlimited D 208.14/2:NPS-55-83-023 .-vpared for: Chief of Naval Res -rch Arlington, VA 2221” NAVAL POSTGRADUATE SCHOOL Monterey, California Rear Admiral J. J. Ekelund David A. Schrady Superintendent Provost This work was supported by the Office of Naval Research, Fleet Activity Support Division, Code 238. Reproduction of all or part of this report is authorized. This report was prepared by: UNCLASSIFIED SECURITY CLASSIFICATION OF THIS PAGE (When Data Entered) REPORT DOCUMENTATION PAGE ee BE eae a4 1. REPORT NUMBER 2. GOVT ACCESSION NO. 3. RECIPIENT'S CATALOG NUMBER NPS55-83-023 4. TITLE (end Subtitle) POSTTION DETERMINATION WITH LORAN-C | §. TYPE OF REPORT & PERIOD COVERED TRIPLETS USING THE HEWLETT-PACKARD HP-75C, THE SHARP PC-1500 (TRS-80 PC-2) OR THE RADIO SHACK a ae TRS-80 MODEL 100 PORTABLE COMPUTERS 6. PERFORMING ORG. REPORT NUMBER 7. AU THOR(a) CONTRACT OR GRANT NUMBER(@) Rex H. Shudde 3. PERFORMING ORGANIZATION NAME AND ADDRESS 10. PROGRAM ELEMENT. PROJECT, TASK Naval Postgraduate School BRE AS SORKIUNUT NUMBERS Monterey, CA 93943 65155N: RO131; NR 364-615 N0001483WR30112 11, CONTROLLING OFFICE NAME AND ADDRESS 12. REPORT DATE Chief of Naval Research September 1983 Arlington, VA 22217 13. NUMBER OF PAGES 43 14” MONITORING AGENCY NAME & ADDRESS(If diiferent from Controlling Office) 18. SECURITY CLASS. (of thie report) Unclassified 18a. DECLASSIFICATION/ DOWNGRADING SCHEDULE 16. DISTRIBUTION STATEMENT (of this Report) Approved for public release; distribution unlimited. 17. DISTRIBUTION STATEMENT (of the abstract entered In Block 20, If different from Report) 18. SUPPLEMENTARY NOTES 19. KEY WORDS (Continue on reverse side If necessary and Identify by block number) Loran Hyperbolic Fixing Sharp Loran-C Radio Positioning Hewlett-Packard Navigation HP-75C Radio Shack Position PC-1500 Fixing TRS-80 Model 100 20. ABSTRACT (Continue on reveree elde If neceseary and Identity by block number) This report contains user instructions and program listings for a Loran-C position determination algorithm for use on an Hewlett-Packard HP-75C, a Sharp PC-1500 (Radio Shack TRS-80 PC-2) and a Radio Shack Model 100 portable computers. DD 628, 1473 evition oF 1 Nov 68 Is OBSOLETE S/N 0102- LF- 014-6601 UNCLASSIFIED SECURITY CLASSIFICATION OF THIS PAGE (When Data Entered) POSITION DETERMINATION WITH LORAN-C TRIPLETS USING THE HEWLETT-PACKARD HP-75C, THE SHARP PC-158@ (TRS-88@ PC-2) OR THE RADIO SHACK TRS-88 MODEL 168 PORTABLE COMPUTERS. by Rex H. Shudde Naval Postgraduate School Monterey, California September 1983 The programs in this report are for use within the Navy, and they are presented with- out representation or warranty of any kind. I. II. III. IV. VI. CONTENTS Page IMNCLOGUCEION cesesecscrsvsccceneevesscevresersrscvees 1 The Hewlett-Packard HP-75C ..ccceccercrcccccecccccccs 4 HP-75C User ImStructionS ..ecccsercccccvrccecvrvcecccce 4 HP-75C Sample ProblemS ..ccccccccccrcssvevccvescescece 6 HP-75C Program LiSting ......ccecceccrccrcccecceveveee 1G The Sharp PC-15@@ (Radio Shack TRS-8@ PC-2) ......... 15 PC-1508 User InstructionS ......c.ceceecccceccsccecee 15 PC-1588 Sample ProblemS) .....cceerercccccccccccceecee 17 PC-1560 Program Listing ...cccccecerercccecccececesee 21 The Radio Shack TRS-8@ Model 106 .......eeeveecesesese 29 TRS-86 Model User InstructionS ....ececerevccceveveee 29 TRS-86 Model Sample ProblemS) .......cccccccecccvceeee 31 TRS- 88 Model Program Listing .....ccececcccccscveeees 35 Memory REquireMENtS ...ccecccecccccccrccccccccceceees 40 REFELENCES Lecce ccc cc cccccccccccccrcccccvcceseseccees 41 Appendix: Loran-C Station Data ..ccerceccecccceeceseee 42 ABSTRACT This report contains user instructions and program listings for a Loran-C position determination algorithm for use on an Hewlett-Packard HP-75C, a Sharp PC-159@ (Radio Shack TRS-8@ PC-2) and a Radio Shack Model 198 portable computers. 20 I. INTRODUCTION This report contains a Loran-C position determination program for each of the following portable computers: the Hewlett-Packard HP~75C, the Sharp PC-158@8 (Radio Shack TRS-8@ PC-2) and the Radio Shack) TRS-8@ Model 100. These programs are part of a set that has been developed for a portable computer evaluation. The Loran system is a radio aid to navigation which utilizes the principle of hyperbolic fixing. The locus of points for which the difference in arrival time of synchronized signals from a pair of transmitters is constant determines a hyperbolic line of positions. The intersection of two hyperbolic lines of position from two pairs of stations determines a hyperbolic fix. That two pairs of stations are required for a fix does not necessarily mean that there are four separate stations, for one station of one pair may be colocated with one station of the other pair forming a Loran triplet. Triplets may be joined "end-to-end" by station colocation to form a Loran chain. Loran chains are common on both the East and West coasts of the North American continent. The present day Loran-C operates at 1@8-kHz and is in use in the Atlantic, Pacific and Mediterranean areas. The computational programs described herein can be used for position determination with Loran-C triplets. Further information on the history, development and operation of the Loran systems may be found in References 1 and 2. Details of the fixing algorithm can be found in Reference 3. In the programs presented here, there are ten user options. The computer display abbreviations for the option names and their definitions are listed below. 1. LORAN FIX. This fixing routine is the main program for calculating a LORAN-C fix from indicated time delays (ITDs). ALTERNATE SOLN. The alternate solution routine will allow the second LORAN-C fix solution to be computed. This routine toggles an alternate solution flag so that on subsequent fixes Option 1 will calculate the alternate solution. INPUT DEST LAT/LONG. This option is used to store the latitude and longitude of a destination. HEAD & DIST TO DEST. This option is used to compute the heading and distance from the currect fix to the destination stored by Option 3. PREDICT ITDs. This option may be used to predict the station ITDs that will be received at a given latitude and longitude. TWO POINT HEAD & DIST. This option is similiar to Option 4 except that it may be used to compute the heading and distance from any origin to any destination. CALIBRATE. Given the latitude and longitude of a benchmark position and the indicated time delays from a LORAN-C triplet received at the benchmark position, the stored station data are modified so that the fix routine (or alternate solution routine) will compute the known position from the same time delays. 8. NEW STA, IDs. This option is used to load the two station pairs being received by requesting the group repetition interval (GRI) identifier. 9. ASF Corrections. When a portion of the propagation path lies over land, the additional secondary factor (ASF) should be included in the observed time delay if precision navigation is required. This option allows the user to input the ASF correction [Ref. 4, 5]. A. STOP. This option will exit from the LORAN-C routine. An additional HELP option (H) is available in the Hewlett- Packard HP-75C and Sharp PC-158@ (TRS-8@ PC-2) computers. This option will review the ten options in the display. The Radio Shack TRS- 88 Model 108 does not have this option because all ten options can be displayed simultaneously. II. THE HEWLETT-PACKARD HP-75C. HP-75C USER INSTRUCTIONS. The options are labeled 1 through 9, A or H. The H (Help) option will review options 1 - 9 & A. Option 6 (TWO POINT HEAD & DIST) is a stand-alone option which may be used by itself. For LORAN fixing, Option 8 must be selected first to load the station GRI's. If Option 8 is not used, then any option requiring the GRI's will automatically enter Option 8 first. Option 1 (LORAN FIX) must be selected at least once before Option 2 (ALTERNATE SOLN) can be selected. Once the GRI's are loaded, any of the remaining options may be used at any time. When first run, the ASF Correction Factors are set to zero; if they are subsequently entered as non-zero values they will remain set until either changed manually, by selection of Option 9, or until the program is RUN once more. In all cases, South latitudes and East longitudes must be negative for input and will be labeled by a minus sign '-' on output. For ease of reference the options are listed by number rather than by sequence of selection. INSTRUCTION DISPLAY INPUT Run Program Run "LORAN" NEXT OPTION (Help) ? 1. LORAN FIX 1 ITD for lst GRI ITD FOR gril? lst ITD [RTN] ITD for 2nd GRI ITD FOR gri 2? 2nd ITD [RTN] Lat of fix LAT = dd°mm'ss" [RTN] Long of fix LONG = ddd°mm'ss" [RTN] NEXT OPTION (Help) ? 2. ALTERNATE SOLN 2 Lat of fix LAT = dd°mm'ss" [RTN] Long of fix LONG = ddd°mm'ss" [RTN] NEXT OPTION (Help) ? 3. INPUT DEST LAT/LONG 3 DEST LAT dd.mmss? Lat of dest. [RTN] DEST LONG ddd.mmss? Long of dest. [RTN] NEXT OPTION (Help) ? 4. HEAD & DIST TO DEST 4 Heading to dest. HEADING = dd°mm'ss" [RTN] Dist. to dest. DISTANCE = mmm.ff n.mi. [RTN] NEXT OPTION (Help) ? HP-75C USER INSTRUCTIONS INSTRUCTION DISPLAY PREDICT ITDs LAT dd.mmss? LONG ddd.mmss? lst ITD ITD FOR gri 1 = XXXXX.XX HS 2nd ITD ITD FOR gri 2 = XXXXX.XX US New Lat/Lon or Return to menu NEXT OPTION (Help)? TWO POINT HEAD & DIST Heading to dest. Dist. to dest. CALIBRATE NEW STA. IDs ASF Corrections STOP ORIGIN LAT dd.mmss? ORIGIN LONG ddd.mmss? DEST LAT dd.mmss? DEST LONG ddd.mmss? HEADING = dd°mm'ss"” DISTANCE = mmm.ff n.mi. NEXT OPTION (Help)? LAT dd.mmss? LONG ddd.mmss? ITD FOR gri 1? ITD FOR gri 2? NEXT OPTION (Help) ? lst GRI? 2nd GRI? NEXT OPTION (Help) ? ASF FOR gri 1? ASF FOR gri 2? NEXT OPTION (Help) ? (cont. ) INPUT 5 Lat [RTN] Long [RTN] {RTN] [RTN] N repeats Option 5 R goes to next line 6 Lat of origin [RTN] Long of origin {RTN] Lat of dest. [RTN] Long of dest. [RTN] [RTN] [RTN] 7 Lat of fix [RTN] Long of fix [RTN] ist ITD [RTN] 2nd ITD [REN] 8 Sta. ID [REN] Sta. ID [RTN] 9 lst ASF [RTN] 2nd ASF [RTN] A HP-75C SAMPLE PROBLEM 1 You are sailing off of the coast of California. Your destination is Moss Landing at about 36°48'N and 121°47'W. Your present ITD from station pair GRI 99408W is 16819 and your ITD from station pair GRI 9946Y is 42585. What is your current position and what is the heading and distance from your current position to Moss Landing? We assume that the GRI's 994@W and 994@Y have not yet been loaded. DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help)? 3 Input destination. DEST LAT dd.mmss? 36.48 [RTN] 36°48! DEST LONG ddd.mmss? 121.47 [RTN] 121°47' NEXT OPTION (Help)? 8 Input station ID's, ist GRI? 9940W [RTN] 2nd GRI? 9949Y [RTN] NEXT OPTION (Help)? 1 Compute a fix. ITD FOR 9940W? 16819 ITD FOR 9940Y? 42585 LAT = 39°14'19" [RTN] Latitude of fix. LONG = 115°59'52" [RTN] Longitude of fix. This fix is in Nevada. There are always two solutions to the LORAN equations. The navigator must select the correct one. NEXT OPTION (Help)? 2 Select alternate soln. LAT = 35°@@'@1" [RTN] Latitude of fix. LONG = 125°@0'99" (RTN] Longitude of fix. This fix is in the Pacific. The navigator knows it is the correct fix because of his estimate of where he should be. NEXT OPTION (Help)? 4 Find heading & distance to destination. HEADING = 54°34'1]1" [RIN] Heading to Moss Landing. DISTANCE = 198.38 n.mi. [RTN] Distance to Moss Landing. NEXT OPTION (Help)? Repeat with new option or press A to quit. HP-75C SAMPLE PROBLEM 2 How far, and in what direction, is Corvallis, Oregon (44° 34'N, 123°16'W) from Cupertino, California (37°19'N, 122° @2'W)? DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help)? 6 Two point distance and heading. ORIGIN LAT dd.mmss? 37.19 [RTN] 37°19' ORIGIN LONG ddd.mmss? 122.02 [RTN] 122°62' DEST LAT dd.mmss? 44.34 [RTN] 44°34' DEST LONG ddd.mmss? 123.16 [RTN] 123°16' HEADING = 353 62'59" [RTN] DISTANCE = 438.32 n.mi. [RTN] NEXT OPTION (Help)? Repeat with new option Or press A to quit. HP-75C SAMPLE PROBLEM 3 Suppose that you want to know what ITD's you would expect to receive at 35° North, 125° West and at 36°27' North, 126°54' West from 9946W and 9948Y. To determine these ITD's, proceed as follows (assume that the GRI's have been loaded as in Sample Problem 1): DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help)? 5 Predict ITD's. LAT dd.mmss? 35 [RTN] 35° LONG ddd.mmss? 125 [RTN] 125° ITD FOR 9940W = 16919.35 us [RTN] ITD FOR 9948Y = 42584,71 us [RTN] New Lat/Lon or Return to menu? N LAT dd.mmss? 36.27 [RTN] 36° 27! LONG ddd.mmss? 126.54 [RTN] 126°54' ITD FOR 9948W = 15572.32 ys [RTN] ITD FOR 9940Y = 43006.15 us [RTN] New Lat/Lon or Return to menu? R NEXT OPTION (Help)? Repeat with new option or press A to quit. HP-75C SAMPLE PROBLEM 4 Suppose you are receiving an ITD of 16388 from 9946W and 42800 from 9940Y. These ITD's would tell you that your location is 36°47'55"N and 121°47'11"W. However, you know that your position is benchmarked to be at 36°47'36"N and 121°46'58"W, and you wish to calibrate your HP-75C so that the ITD's of 16388 and 42808 will give you the latter fix instead of the former. Proceed as follows (assume the GRI's have been loaded as in Sample Problem 1): DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help)? 7 Calibrate. LAT dd.mmss? 36.4736 [RTN] 36°47'36" LONG ddd.mmss? 121.4658 [RTN] 121°45'58" ITD FOR 9946W? 16398 [RTN] ITD FOR 9940Y? 42808 ([RTN] The station baselines have now been modified to achieve calibration. Now, reenter 16838 and 42808 into the fixing routine to test the calibration. Calibration does not modify the permanent station data stored in the HP-75C. The calibration remains effective until the GRI's are reloaded by Option 8. NOTE: The affect of calibration on the accuracy of fixes far removed from the benchmark has not been studied. The user should use the calibration option with caution. DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help)? 1 Compute a fix. ITD FOR 9946W? 16308 [RTN] ITD FOR 9940Y? 42880 [RTN] LAT = 36°47'35" {RTN] Lat of fix. LONG = 121° 46'59" (RTN] Long of fix. The small discrepancy between this fix and the benchmark is due to assumptions in the fixing algorithm. If higher precision is required, the ASF Correction factor may be used (see Sample Problem 5). Note that you may need to use the Alternate Solution Option 2 if the fix obtained above is near 38°52'57"N and 116°51'1ll'w. DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help)? Repeat with new option or press A to quit. HP-75C SAMPLE PROBLEM 5 Suppose you are receiving an ITD of 12153.31 microseconds from 9968W and 44451.83 microseconds from 9969Y. These ITD's would tell you that your location is 44°15'@5"N and 67°25'23"W. Entering the ASF Correction Tables [Ref. 5,6] with these readings, the ASF Correction for GRI 9960W at 44°15'N and 67°25'W is 1.5 micro- seconds. Similiarly, the ASF Correction for GRI 9960Y at these coordinates is 2.7 microseconds. Enter these corrections into your HP-75C and recompute your position. (Load the GRI's 9960W and 9968Y using Option 8). DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help)? 9 ASF Correction. ASF FOR 9969W? 1.5 [RTN] ASF FOR 9968Y? 2.7 [RTN] NEXT OPTION (Help)? 1 Compute a fix. ITD FOR 9960W? 12153.31 [RTN] ITD FOR 9948Y? 44451.83 [RTN] LAT = 44°15'26" [RTN] LONG = 67°26'26" [RTN] NEXT OPTION (Help)? Repeat with new option or press A to quit. These ASF Corrections have been entered into the computer. The range of their validity must be checked with the ASF Correction tables and reentered if they change. NOTE: If you are using the ASF Correction Tables and if you wish to calibrate to a benchmark position, you should first enter the ASF Corrections for your benchmark and then use the calibration Option 7 (see Sample Problem 4). HP-75C PROGRAM 18 REY LORAK-2 ROUTINE, rev A?-A8-82, 1336 HOURS 2@ NO=15 @ REM NO=8 OF ¥ ASTER STATIONS 3@ OPTION ANGLE RATT ANS @ OPTION BASE | 48 DEF FNRCX.M) = X45) 74 5@ CH=1/298.26 & Au=-1 Cig="" 64 DEF FNP(T) = 129, 8425 O/T-, 4B758+, BAHD4D 70439" T 70 DEF FNOCT) = O/T- ALL4AZ+ ABBIZF 74624 aT 82 DISP # COTE 128 9 CS=KEYS W OIF C$="° Th ER 96 1A CH=UPROS(CS) & FOF © =1 TG LENCCAS) @ IF C$=0 @S(C.C] THEN DISP & FETL PK 118 NEXT C @ GOTO 98 128 DISP “WEXT OPTION ¢° ACHRE( 284); 'elp)?* & CAF ='123456789AH" &@ GASHIE & & 138 ON C GOSIIR 916,958, 1 G18, 1846, 1096, 996, 1208. | 96,1358.528,148 @ GOTO } 2h 140 TISP ‘1 - LORAN FIX" @ DISP *2 - ALTERNATE $ GLK’ @ DISP ‘3 - INPUT B EST LAT/LONG: 15@ DISP ‘4 - HEAD & DIS T TO BEST’ @ DISP “5 - P REDICT ITDs* 16@ DISP ‘6 - TWO POINT HEAD & DIST’ @ DISP '7 - CALIBRATE: 17@ DISP ‘8 - NEW STA. Ds' @ DISP *9 - ASF Corr ections' @ DISP ‘A - STQ Pp TWT (Me -1@- LISTING 188 RETURK 182 REM O°T 8 185 TF G1$¢3** THEN RETI RH 198 FA=1 @ N=t @ INPUT ° ist GRI? *iT$ 288 GOSUR 384 @ COSIIE 29 8 @ IF FA=2 THEN 198 218 FA=] & W=2 @ INPUT ° 2nd GRI? °; I$ @ GOQSUB 3 £6 228 IF AS=19$ THEN GOSUE 478 ELSE 242 238 TF F@=1 THER 2b 248 GOSUE 394 & IF Fé=2 THEN 218 250 Fi=t @ Fo=1 @ IF GIS =G2$ THEN Ine 260 TF PCL. PVSPC1.2) ANE LOL. f=L01.2) THER 218 278 F2=-1 @ TF PCL} )=PL 2,2) GRE LOL P)=L02.2) TF HEN 218 QRH Fi=-] @ TF (2,1 )=Pi 2.2) AND LOZ, P=aLG2) T HER 214 298 F2=) @ TF PCO, 3=Pct 2) GWE LOZ. Sled. 2) TH EH 318 3@R ISP -E. NO TRIPLET “;G18-" & °:628 @ GASUB 1276 @ GOTO 198 318 FOR T=! TR 2 @ PL=Pé 1-1) @ LEELA. TD) @ P2=PC 2.1) @ L2=L(2,1) 328 DISP @ GOSUB 33 @ K EXT 1 ® GC1)=@ @ C(2)=8 @ RETURN 338 GOSUB 658 @ B(I)=Sh @ 201, P=21 @ 2(2, 1 =22 348 T=21282. 3593450 35@ IF 1>=537 THEN P=FHP (7) 368 IF 1453? THEN P=FNOC Tr) TPA T(T)=T+P &@ RETURN HP-75C PROGRAM LISTING (cont.) 3B@ L=LENC I$) @ AS=IEE1, L-1] @ BS=I$(L.L) @ B=NU WCBS) @ BS=CHRS(B-324(B> SAY) @ RETURN 398 Ne=1 @ RESTORE 488 READ 19$,N@,P4,LA # Wee" 418 FOR I=1 TO N@ @ PEAL WAS, BOCTD PICT) LICL? & WS=HSEKAS A NEXT J 428 JF 19$#A$ THEN 458 43A GOSIIE 474 @ IF Fa=2 THEN 468 44@ RETUPRK 450 WR=H2+] & IF NG’ =NG THEN 464 46@ RISP 1$,° 1S NOT CAT ALOCED* @ Fa=2 @ GOSIIE { 37A B® PRETLIPK 47@ FOP J=1 TO NO @ IF ke $CT,J)=B4 THEN 496 488 HEXT J & FA=2 @ PETII OH 49A JF N=} THER Ci$=1¢ S@A JF H=2 THER G2$=1$ SIR NCM=N9CT) & PLY NY= FMACRADCFHH(PAY)) & LL. WO=RADCFHH(LAY) S2@ PC2,N=FHACRADCFHH IP 1€7)))) @ L¢2.ND=RADCFHH (LACT) @ RETURN 538 DISP @ PUT CHRS$/13) @ END S48 REM DIR SOLN 558 Z28=SIN(71) @ 29=C0S( 21) @ PR=SINCPI) @ P9=CA S(P1) @ H=-28eP9 @ C1=CA Hh @ CO=CAe(1—Meh) 74 568 B=(1-C2)e(1-C2-C lee) @ PoC2eC14lt4n72)/1 @H =P9829 578 SISANGLE(P8,N) @ DA= SB/D @ U=2*(SI-DB) @ W=l ~2ePeCOS(U) @ V=COS(U+DA ) ovis SRR X=C2*C 28ST N(DE) eCOSe Bae (PeleV-1)) @ Y=2eP ale WaSIN(BR) S9A S2=DG+tX-Y @ SB=SINCS 2) @ S9=COS(S2) @ K=SORC Betts (HeSO-PR4S8 42) 6BA P2=ATN( (PRESO+NeS8 34 yy 618 S3=AHGLE(P9"S9-PEeSe #29, -SB#28) 62A H=Cte({-C2)*S2-C tal? ¥SReC0S(S14S1-S2) @ L2=L 1+S3-H 638 Z2=ANGLE!-(HeS9-PReS &).-M) @ PETHRN 640 REM REVERSE SOLH 658 L3=L2-L1 @ P3=(P2-P! 72 @ PA=(PL4P2972 66 PE=SIN(PZ) @ PP=CHSC PZ) @ PR=SIN(Pd) & PO=Ch SCRA 6708 H=P7#P7-PRaePg & L=P5 ePGtHASTN(L2723*2 & faa? #ASIN(SOP(L)) GBA U=2ePRePheP7eP7 7 (1-1 ) @ V=2eP6ePEaP9eP9/| & X=U+¥ @ Y=U-V @ T=Ra/SIK CRA) ® fiadeTeT 690 E=2eCOS(RA) @ A=Nee @ C=7-(A-E)72 @ HI=Ke(A+ Cey) @ B=R+h @ H2=YaCB+E s¥) @ N3=faxey 7A W2=CHsCRe (NI -H2+H297 64 @ Bl=CAe(TexX-y)/4 & S @=(T-D1+B2)*STN(DB) TIB M=Z2eT-(2A8T-A)eK- (8 +4yaY 72R FaY+¥-Ee(4-%) @ G=CA #(T/2+CG4N/64) @ Q=-Fahe TAR(L3) 74 730 L4=(L3+0)72 @ LR=SIN (L4) ® LO=COS(L4) 748 TI=ANGLE(P9*L8, P6#L9 ) @ T2=AHGLE(PS*L 8, -P7eL 9) HP-75C PROGRAM LISTING (cont.) 75@ TS=PI4P] @ Zt=MORCTI 472,79) @ Z2=MOD(TI-T2.T 9) @ RETURN 768 REM FIXING ROUTINE 77@ AI=FI4SIN(ACL)) @ BI =COS(ACL) -COS(BC1)) @ CT f=SIN(BC1)) TBA AZ=F2eSTN(AC2)) @ BZ =COS(A(2)-COS(B(2)) @ C 2=SIN(B(2)) 798 E1=2¢1,1) @ IF Fl=-1 THEN Ei=2(2.1) eae E2=2(1,2) @ IF F2=-1 THEN E2=2(2.2) B18 C=B1eC2eC0S(E2)-B2sC 1eCOSCEL) @ S=BleC2eS TNC £2)-B2eCisSIN(EL) 820 K=B2eA1-R1eA2 @ P=Se R(CeC+SeS) @ G=ANGLECC.S ) 830 Z=G+ABSALNS(K/R) & SS B=PNCLE(C2eC0S(2-E2 +A. B2) 848 IF F2=1 THEN Pi=Pi1. 2) @ LIFL(1.2) 85@ IF F2=-1 THEN Pi=P(? 12) @ LI=L(2.2) B68 21=Z # GOSUE Soh @ F B=P2 & L@=L2 @ P=ATK¢TAK (PA)/(1-€8)) 878 P=BEGCP) @ L=MODCDEG (L8),360) @ IF L518 THE W L=L-368 RBA PS=FANS(P) @ LE=FADS (Ld 898 DISP “LAT = “iP$ @G OSUB 1378 @ DISP “LONG = “iL$ @ GOSUB 1378 @ RET URH 988 REM OPT 1 - COMPUTE FIX 91@ GOSUR 185 @ FOR [=1 TO 2 @ G$=G1$ @ IF [=2 T HEN G$=62$ -]2- 920 DISP “ITD FOR “Gs: @ THPUT -? -; A @ A=A+E¢ T)-BCD-TC1) @ TF ABS(AY <TC1) THEN 944 938 BISP -E. ITD HOT YAL ID FOR ;G$ @ GOTO 928 940 ACTY=A721295. 8796 & WEXT | @ GOSUB 778 @ PET URN 95@ IF A@=1 THEN Aa=-1 & GOTO 965 968 AB=1 965 IF Gi$="* THEN 916 978 GASUE 778 @ RETURN 980 REM AFT 6 998 INPUT “ORIGIN LAT de camss? *; P @ THPUT *ORT GIN LONG ddd.aass? “GL JORG PR=FNACRAN(FNHCP) +) @ LA=RADSFNH(L)) @ GOSH B 1610 @ GQSUR 1644 & PE TURK 1A1@ IMPLI “DEST LAT dd. pass? "i P @ TRPUT “DEST LONG ddd.anss? “GL 1828 PS=FMACRADCFNH(P)) > @ LS=RARCFNH(L)) @ PETU RN 1826 REM MPT 4 1048 P1=P@ @ LI=L@ &@ P2= PS @ L2=L5 @ GQSUB 658 1656 Z2=MODCDEG(21), 368) @ 2$=FNDS(Z) 1868 BISP “HEARING = -:2 $ @ GOSUB 1378 @ DISP “fh ISTARCE = *;FWR(3443.917 #S0,188)i" nmi.” 1678 COSUB 1378 @ RETURN 1686 REM OPT 5 1698 COSUB 185 @ GOSUR 1 174 @ FOR K=1 10 2 @ I9= TURD ADK) 1108 P2=P(2,K) @ L2=L(2. kK) @ GOSUB 658 @ I=3 @ & OSUB 340 @ 19=194+T(3) HP-75C PROGRAM LISTING 111 P2=PCL,K) @ L2=L(t, K) @ GOSUR 658 @ I-2 6G OSUB 346 @ 19=19-T(3) 1128 [$=G1$ @ IF K=2 THE W 1$=G2$ 113 DISP “ITD FOR -s If: = =°FFARCT9, 108) CHRS(12 divs” @ GOQSUB 1376 @ NEY TK 1148 DISP CHP$(286): "eu Lat/Lon or *:CHRE(Z1A):° eturn to menu?” @ CAf="K Pe @ GOSUE 98 1156 IF C=1 THEN 1a9H 1168 RETURN 1176 INPUT “LAT dd.anse? °; PL @ INPHT LONG dda eAAss? ML 118B PL=FNACRANCFRHSP SY) > @ LISRADCFHH(L1)) @ PE TUPH $19@ PEM GPT 7 1288 GOSUB 125 @ GASHE t 178 @ FOR K=! 10 2 @ [$= G1 @ TF K=2 THEN [$=G2$ 1216 DISP “ITD FOR -s I$. @ INPUT °2 °. 19 @ [9=] O- ACK 1228 P2=P(2,K) @ L2=L(z, ¥) @ COSUB 658 @ [=2 #6 OSUB 348 @ 19=19-T(3) 1236 P2=PC1,%) @ L2=LC1. K) @ GOSUB 658 @ 1-3 46 OSB 348 @ T(KI=194T(3)+ GK) 1248 HEXT K @ RETURN 1258 BEF FHH(X) 1268 S=SGH(X) ® X=ABS(X) @ H=INT(X) @ V=FP(X) #10 @ @ FWH=S#( (16A8FP(V)/68 + INT CY) 468+) 1278 EWR BEF 1288 DEF FRACX) = ATNOCL -CA)*TANCX)) 129 DEF FHDS(X) -13- (cont.) 1380 $=" - @ IF XC@ THE H C$="-" 1318 X=ABS(K)41/7208 & ¥ @=INT(X) @ CS=CHRSTRSCHA DECHRS(1) 1328 X=609(X-¥8) @ XASIN TCX) @ XS=STREC1OG+KR) & CS=CSEXST2, Z]E °° 1338 X=6ee(X-KAY @ KA=TH TCX) B XS=STRS(1OG+KB) FHDS=C$RX$(2. TIRCHPS (34 :) 1348 END DEF 1354 GOSHE 185 @ DISP *G SF FOR ":C1$: @ INPUT °° SLY 1366 DISP “ASF FOR ee , RINPUT 25 GCE 8 ETURK 1370 C$=KEYE @ IF Cs=° THEN 1374 1386 DISP @ PETURN 5088 BATA 4990,2, 16, 4442 95,169. 38412, -¥", 11886. 2 @.144916,155. 53897 5A18 DATA “Y", 29808. 28.2 3417? 178,17302 5828 DATA 5938,2,46, 4827 199,67. 5537712.7¥", 11066 ,41.151193, 69, 583989 5830 BATA “Y",25080.46.4 63218,53. 182816 5048 PATA 5978,3,36.1105 797,-129. 2827279, "Wr 118 8,42. 4437184. -143. 43852 45 5658 DATA “¥-, 31600, 35.4 223871 .-126.3226741,°2°, 42890, 26. 3624975, -128.88 56445 5666 DATA 5998,3,51.575 78, 122. 228224, 7%" 11808, 55. 2628851, 131. 1519648 5876 BATA -Y-,27808,47.8 34799. 119.443953,°2°, 416 8,58. 3629731, 127.212904 3 HP-75C PROGRAM LISTING 5988 DATA 7928,3,59.5917 27:45, 182747. °W" 11088.6 4.542658, 23. 592179 5898 DATA °X",21088,62.! 75964, 7.0426538,°2° 4388 8.46. 46321893. 182816 5160 BATA 7#7928°,3,24.1 7B7888 - 153. 5893252. °X"- 11008,42,4437184,-142.42 a9245 5118 DATA “Y~, 38808. 26.3 624975, -128. @896445,°2°- 49008, 9. 3245789,-138.495 497 5128 BATA 7968.2.63, 1942 814,142. 48319. °X"- 11884. 57, 262821, 1592. 2211225 5138 DATA -¥*,26806,55.2 62RB51, 131. 1519648 5148 BATA 7978,4,62.1759 64.7.0426538, “WH”, 26884, 5 44829872 .-8. 1736312 S158 BATA “X~.11688,68.3 BBE1S,- 14.2747. °7° 46888 764.542658,23. 552175 5168 DATA -2- 68088. 76.5 49261,8. 435869 5178 BATA 7988.4, 38.5935 74,85, 1@@9385 .°W", 11888. 38. 4333818, 98. 49436 5186 BATA °X°,23888,26.3 155886 ,97. SBBAR93, “Y", 42 088, 27..8158393,88. 865342 9 5198 BATA °Z°, 59888, 34.4 346081577. 5446654 5288 PATA 7998,3, 38.5228 587,-16. 4306199, “K", 1168 8,35. 3128787,-12. 3138245 5218 BATA -Y",29880,48.5 82895 ,,-27.528152,°Z" 478 08, 42.8336515,-3. 1215512 =a (cont. ) 5228 BATA #978. 3,39.5187 54,87. 291214, -W", 11088, 2 8.593874, 85. 1889385 5238 BATA ~X- 26800: 42.4 250683, 76. 4953862, “9°, 44 OBB, 48. 364984494. 331846 9 5248 BATA 9948.3, 39, 7306 621,118. 495637 5258 BATA “W".11080.47.6 34799, 119. 443955, °X" 276 8B, 38. 465699, 122. 2944529 5268 DATA -Y° 48086, 35.1 91818, 114. 4817435 5278 DATA 9968.4,42.4258 683, 76.4933862."W", 11008 146.4827199,67, 5957713 S288 BATA *X-,25006, 41.1 51193, 69. 5839R9, “Y> . 2988 8,24, 0346081. 77. 5446604 5298 BATA °2°,54088, 39.5 18754.87.291214 53@@ BATA 9970,4,24, 4803 597-141. 1930383, "WH". 116 88,24. 1787888, -153. 58532 22 S318 BATA °X", 30800.42.4 437104. -143, 4309245. °¥"; S9C8» 26. 3624975,-128,.88 56445 5328 BATA °2°. 75888,9,32 45789.-138. 895497 5338 BATA 9998,3,57.8912 265,178. 1506789, “X" 1168 8,52. 494404 ,-173. 1648974 5348 BATA “Y°,29886,65.1 448386, 166.931295,°2°,43 008,57. 262821, 152.221122 B) III. THE SHARP PC-158% (RADIO SHACK TRS-8@ PC-2). PC-15998 (TRS-8% PC-2) USER INSTRUCTIONS. The options are labeled 1 through 9, A or H. The H (Help) option will review options 1 - 9 & A. To step through the HELP menu, use the ENTER key. Option 6 (TWO POINT HEAD & DIST) is a stand-alone option which may be used by itself. For Option 8 must be selected first to load the station GRI's. LORAN fixing, If Option 8 is not used, then any option requiring the GRI's will automatically enter Option 8 first. selected at least once before Option 2 Option 1 (LORAN (ALTERNATE SOLN) can be FIX) must be selected. Once the GRI's are loaded, any of the remaining options may be used at any time. When first run, Factors are set to zero; the ASF Correction if they are subsequently entered as non-zero values they will remain set until either changed manually, by selection of Option 9, or until the program is RUN once more, be negative for input and will be labeled by a minus sign In all cases, South latitudes and East longitudes must poy on output. For ease of reference the options are listed by number rather than by sequence of selection. INSTRUCTION Run Program 1. LORAN FIX ITD for lst GRI ITD for 2nd GRI Lat of fix Long of fix ALTERNATE SOLN Lat of fix Long of fix 3. INPUT DEST LAT/LONG HEAD & DIST TO DEST Heading to dest. Dist. to dest. DISPLAY NEXT OPTION (Help)? ITD FOR gri 1? ITD FOR gri 2? LAT = ddemm'ss" LONG = dddemm'ss" NEXT OPTION (Help)? LAT = dd°mm'ss" LONG = dddemm'ss" NEXT OPTION (Help)? DEST LAT dd.mmss? DEST LONG ddd.mmss? NEXT OPTION (Help) ? HEADING = ddemm'ss" DISTANCE = NEXT OPTION (Help) ? -15- mmm.ff n. mi. INPUT RUN.198 i lst ITD [ENTER] 2nd ITD [ENTER] [ENTER] [ENTER] 2 [ENTER] [ENTER] 3 Lat of dest. [ENTER] Long of dest. [ENTER] 4 [ENTER] [ENTER] PC-1598 (TRS-8@8 PC-2) USER INSTRUCTIONS (cont.) INSTRUCTION PREDICT ITDs lst ITD 2nd ITD DISPLAY LAT dd.mmss? LONG ddd.mmss? ITD FOR gril = XXXXX-XxX US ITD FOR gri 2 = XXXXX.XX US New Lat/Lon or Return to menu NEXT OPTION (Help) ? TWO POINT HEAD & DIST Heading to dest. Dist. to dest. CALIBRATE NEW STA. IDs ASF Corrections STOP ORIGIN LAT dd.mmss? ORIGIN LONG ddd.mmss? DEST LAT dd.mmss? DEST LONG ddd.mmss? HEADING = dd°mm'ss" DISTANCE = mmm.ff n.mi. NEXT OPTION (Help) ? LAT dd.mmss? LONG ddd.mmss? ITD FOR gri 1? ITD FOR gri 2? NEXT OPTION (Help) ? lst GRI? 2nd GRI? NEXT OPTION (Help) ? ASF FOR gri 1? ASF FOR gri 2? NEXT OPTION (Help) ? -1lfK— INPUT 5 Lat [ENTER] Long [ENTER] [ENTER] [ENTER] N repeats Option 5 R goes to next line 6 Lat of origin [ENTER] Long of origin [ENTER] Lat of dest. [ENTER] Long of dest. [ENTER] [ENTER] [ENTER] 7 Lat of fix [ENTER] Long of fix [ENTER] lst ITD [ENTER] 2nd ITD [ENTER] 8 ID [ENTER] ID [ENTER] Sta. Sta. 9 lst ASF [ENTER] 2nd ASF [ENTER] PC-1588 (TRS-8@ PC-2) SAMPLE PROBLEM 1 You are sailing off of the coast of California. Your destination is Moss Landing at about 36°48'N and 121°47'W. Your present ITD from station pair GRI 9940W is 16919 and your ITD from station pair GRI 9946Y is 42585. What is your current position and what is the heading and distance from your current position to Moss Landing? We assume that the GRI's 9940W and 9948Y have not yet been loaded. DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help) ? 3 Input destination. DEST LAT dd.mmss? 36.48 [ENTER] 36°48! DEST LONG ddd.mmss? 121.47 [ENTER] 121°47' NEXT OPTION (Help)? 8 Input station ID's. lst GRI? 9940W [ENTER] 2nd GRI? 994GY [ENTER] NEXT OPTION (Help)? 1 Compute a fix. ITD FOR 9946W? 16819 ITD FOR 9946Y? 42585 LAT = 39 14 19 [ENTER] Latitude of fix. LONG = 115 58 52 [ENTER ] Longitude of fix. This fix is in Nevada. There are always two solutions to the LORAN equations. The navigator must select the correct one. NEXT OPTION (Help)? 2 Select alternate soln. LAT = 35 @@ @1 [ENTER] Latitude of fix. LONG = 125 @8@ @9 [ENTER] Longitude of fix. This fix is in the Pacific. The navigator knows it is the correct fix because of his estimate of where he should be. NEXT OPTION (Help)? 4 Find heading & distance to destination. HEADING = 54 34 ll {ENTER] Heading to Moss Landing. DISTANCE = 198.38 n.mi. [ENTER] Distance to Moss Landing. NEXT OPTION (Help) ? Repeat with new option or press A to quit. -l17- PC-1598 (TRS-88 PC-~2) SAMPLE PROBLEM 2 How far, and in what direction, is Corvallis, Oregon (44°34'N, 123°16'W) from Cupertino, California (37°19'N, 122°62'W)? DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help)? 6 Two point distance and heading. ORIGIN LAT dd.mmss? 37.19 [ENTER] 37°19' ORIGIN LONG ddd.mmss? 122.82 [ENTER] 122°62' DEST LAT dd.mmss? 44.34 [ENTER] 44°34" DEST LONG ddd.mmss? 123.16 [ENTER] 123°16' HEADING = 353 82 59 [ENTER] DISTANCE = 438.32 n.mi. [ENTER] NEXT OPTION (Help)? Repeat with new option or press A to quit. PC-1588 (TRS-88 PC-2) SAMPLE PROBLEM 3 Suppose that you want to know what ITD's you would expect to receive at 35° North, 125° West and at 36°27' North, 126°54' West from 9940W and 9940Y. To determine these ITD's, proceed as follows (assume that the GRI's have been loaded as in Sample Problem 1): DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help)? 5 Predict ITD's. LAT dd.mmss? 35 [ENTER] ay? LONG ddd.mmss? 125 [ENTER] 125° ITD FOR 9949W = 16019.35 [ENTER] ITD FOR 9948Y = 42584.71 [ENTER] New Lat/Lon or Return to menu? N LAT dd.mmss? 36.27 [ENTER] 36° 27' LONG ddd.mmss? 126.54 [ENTER] 126°54' ITD FOR 9946W = 15572.32 [ENTER] ITD FOR 9946Y = 43006.15 [ENTER] New Lat/Lon or Return to menu? R NEXT OPTION (Help)? Repeat with new option or press A to quit. -18- PC-1588 (TRS~8@ PC-2) SAMPLE PROBLEM 4 Suppose you are receiving an ITD of 16398 from 9948W and 42800 from 9948Y. These ITD's would tell you that your location is 36°47'55"N and 121°47'1l1"W. However, you know that your position is benchmarked to be at 36°47'36"N and 121°46'58"W, and you wish to calibrate your PC-1598 so that the ITD's of 16398 and 428008 will give you the latter fix instead of the former. Proceed as follows (assume the GRI's have been loaded as in Sample Problem abs DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help) ? 7 Calibrate. LAT dd.mmss? 36.4736 [ENTER] 36°47'36" LONG ddd.mmss? 121.4658 [ENTER] 121°45'58" ITD FOR 9948W? 16388 [ENTER] ITD FOR 9948Y? 42 8808 [ENTER] The station baselines have now been modified to achieve calibration. Now, reenter 16838 and 42808 into the fixing routine to test the calibration. Calibration does not modify the permanent station data stored in the PC-1508. The calibration remains effective until the GRI's are reloaded by Option 8. NOTE: The affect of calibration on the accuracy of fixes far removed from the benchmark has not been studied. The user should use the calibration option with caution. DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help)? 1 Compute a fix. ITD FOR 9940W? 16388 [ENTER] ITD FOR 99480Y? 42899 [ENTER] LAT = 36 47 35 [ENTER] Lat of fix. LONG = 121 46 59 [ENTER] Long of fix. The small discrepancy between this fix and the benchmark is due to assumptions in the fixing algorithm. If higher precision is required, the ASF Correction factor may be used (see Sample Problem 5). Note that you may need to use the Alternate Solution Option 2 if the fix obtained above is near 38°52'57"N and 116°5i'l1l'W. DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help) ? Repeat with new option or press A to quit. -19- PC-1568 (TRS-88 PC-2) SAMPLE PROBLEM 5 Suppose you are receiving an ITD of 12153.31 microseconds from 9960W and 44451.83 microseconds from 996@Y. These ITD's would tell you that your location is 44°15'@5"N and 67°25'23"W. Entering the ASF Correction Tables [Ref. 5,6] with these readings, the ASF Correction for GRI 9960W at 44°15'N and 67°25'W is 1.5 micro- seconds. Similiarly, the ASF Correction for GRI 996@Y at these coordinates is 2.7 microseconds. Enter these corrections into your PC-1508 and recompute your position. (Load the GRI's 9960W and 9968Y using Option 8). DISPLAY CONTENTS USER RESPONSE COMMENTS NEXT OPTION (Help) ? 9 ASF Correction. ASF FOR 9960W? 1.5 [ENTER] ASF FOR 996@Y? 2.7 [ENTER] NEXT OPTION (Help)? 1 Compute a fix. ITD FOR 9960W? 12153.31 [ENTER] ITD FOR 9940Y? 44451.83 [ENTER] LAT = 44 15 26 [ENTER] LONG = 67 26 26 [ENTER] NEXT OPTION (Help)? Repeat with new option or press A to quit. These ASF Corrections have been entered into the computer. The range of their validity must be checked with the ASF Correction tables and reentered if they change. NOTE: If you are using the ASF Correction Tables and if you wish to calibrate to a benchmark position, you should first enter the ASF Corrections for your benchmark and then use the calibration Option 7 (see Sample Problem 4). -26- 1A: 20: 28: 26: >RADIAN 48: 56: 68: 7B: 8a. 38: 188: 128: 138: PC-1566 (TRS-88 PC-2) PROGRAM LISTING REM LORAN-C R OUTINE. rev 86 -23-83. 1730 H SOURS. NS=15:REM N9= # OF MASTER ST ATIONS DIM W$¢4)*1,D9 €4)9, P1604), L164 >, G$C2)*6, DC2) 9PC2,2),L¢62, 2) »BC2), 763), 262 32),AC2) DIM G¢2)d :C@=172 98.26: 98=-1:RD =P] 718@0:C1$=' “:GOTO 128 K=INT (MkX+. 7112 RETURN P=129.04398/7T- - 40758+.645764 38E-3kT: RETURN P=2.7412979/7T- -A11482+.32774 624E-3%kT C$=INKEYS 3 IF C$=""THEN 72 C=ASC (C$): CH= CHR$ (C-324¢(C> 38)> FOR C=1TO LEN (COS): 1F CH= MIDS ¢(C@$,C; 1) THEN RETURN NEXT C: GOTO 78 PAUSE "NEXT OP TION CHeip>?" CO$="123456789 AH": GOSUB 72: PAUSE " " ON CGOSUB 318 958, 1818, 1848 1898, 398, 1288, 198, 1328, 538, ! 4@: GOTO 128 3) 148: 158: 168: “28a 186: eS: 198: 200: 218: 228: 248: 258: 268: 270: -2)- PRINT '1i - LOR AN FIX': RINT "2 - ALTERNATE SOLN':PRINT * 3 -INPUT DEST LAT/LONG" PRINT "4 — HEA D & DIST TO FI X' PRINT §5 - PREDICT ITDs" PRINT '6 - TWO POINT DIST & HEAD': PRINT "2? CAL IBRATE' *PRINT (SG NEW STA. IDs'.- PRINT '9 - ASF Corrections". PRINT '"Q - S7Q pt RETURN IF G1$<>'' THEN RETURN FQ@=1:N=1.1NPUT ‘Ist GRI? ‘31% >PAUSE ' COSUB 386. COSUB 396.1F © B=2THEN 192 F@=1]:N=2: INPUT "2nd GRI? '3;1$ >PAUSE COSUB 386 IF A$=]9$THEN GOSUB 478: IF F Q=1THEN 258 GOSUB 390: IF F B=2THEN 218 Fil=1:F2=):1F G 1$=G2$THEN 308 IF PC1, 1)=PC1, 2. AND LO], 1)=L €1, 2.THEN 318 F2=-1:1F Pdi, 1] »=P C2, 20AND L¢ 1, 1)=L¢2, 2) THEN 310 PC-1508 (TRS-8@ PC-2) 286: 298: 388: 318: 398: 406: 410: 420: 430: 5 *L=LeN Fys-}:]F PC2,} »=P¢2, 29AND LO 2, 1d=L 62, 2) THEN 318 F2=1:1F PC2, 1) =P(1, 2)AND L¢2 » 1)=L C1, 22 THEN 318 PRINT "ERROR: NO TRIPLET. coTo 138 TOR 1=17TO 2:P: =PC1,J):L1 L2RL C2. a) >PAUSE ‘Work ina “:GOSUP 332: NEXT ]:GC1)=8: G62)=@: RETURN :COSUB 65@:BC]) =$8:2¢1, 1»=2!. 262) 1)=22 45~=21282, 2359345 3) 2Tf 7525327 7THEN COSUR 58 TKS37THEN COSUF 6a 2.7 Cj) HTH: RETURN C) Es. ag= LEFT¢ ¢]$,L-1) >BS=RIGHTS (I$ + 1):B=ASC (BS) >BS=CHR$ (B-32 *(B>98)): RETURN N8=1: RESTORE READ 19$, N@, PB ,»L2@ FOR J=1TO N@: READ W¢(]), DIC 1),P1¢c]>,L1¢1> SNEXT J JF J9$< >ASTHEN 458 GOSUB 47@0:1F © @=2THEN 4628 440: 458: 460: 470: 928: eran =NEXT 1 TE on PROGRAM LISTING (cont.) RETURN N8=NQ8+1:1— N8< =NSTHEN 488 PQUSE I#; 1S NOT CATALOGED" »F@=2: RETURN FOR J=1TO N@: TE W$C])>=BS$ THEN 498 gS 26 RETURN N=17HEN LET Cis=]¢:G$¢])-1 ¢ PTE NS DTHEN Le” C2$=1$:G8<%2)=1 $ DOONI=EDGS 1D: KER OXDEG CPA): COSUB i278:°.1 sNDEXILOI.NDER DADEG (L@) K=RDEDEG (PIC) 3): G0SUB 1273: OC2,N=KiLO2.N D=RDXDEG (L191 3:85 TURN SPAUSr srNG 568: =e SIN (P13: P9= COS (P1>:4=-78 *P9:C1=COKM: C2 =COkC1-M*KM)D 74 D=€1-C2)*¢1-C2 —C1¥MD2P=C2KC] +C1*MN72)/7D:N=P 9*29 : YY=NiXX=PB: COSUB 1260:51= AN: DB=S8/D: U=2 *CS1-DB):W=1-2 *PKCOS (U):V= COS <U+D@) PC-1568 (TRS-8@ PC-2) PROGRAM LISTING (cont.) 586: 530: 680: 61@: €2€: 678: 68: 698: AS REM PL 3=L2-L1:93=¢P >Pb=S K=C2KC2KSIN (CD @)*COS (DBKC2% UKU-] 2 Y=2¥PA UkKWKSIN (DB) $2=D8+X-Y:S8= SIN (S2):S9= COS (S2):k=SQR CMxM+ CNKSG-PBX S842) P2=ATN CCPBXSI +NkS8) 7K) VY=-S8k28: XX=P SxS9-PBKSBALI: COSJB 1266:53- aN H=C1*kC1-C2)4¥S2 -CYVKO? KSB*COS €$1+S1-S2).LD= L1+S3-H aVYYS—Ma XX=- ONKS 9-P84S8): COSUR 1268: 22=AN: Ri TURN REU SOLN 2P-Py)/72: Paz (P! +P2) 72 =CO*L SIN (P4):F9= cos ¢P4) H=PIPKPD-PBAP A: L=PO6£P6+HXSIN (L372)42:D8=2k ASN ¢SQR ¢(L)) U=2¥*PBXPBXP2*P P7C1-L 2 U=2*P6 *PB*PS*PS/L: X= U+U: Y=U-U: T-D@ 7SIN (€08):0=4*% TAT E=2kCOS (D@):9 =DXKE:C=T-(A-E) Z2INIEXKCATCKX >: B=D+D:N2=Y*¢ BrE XY): N3=DEX*K Y -23- 706: 73Q: “aes Use 738: 800: 818: +1 Q2=F2KSIN D2=COkKCO*KENI-N 2+N35764:01=C@ ACT KX-YD 74: 50= ©T-D1+D20xSIN (DB) >M=32kT-(20KT-A I*X-CB+4 KY 2FPHVsV-EXC4- XK): G=COk¢T72+CO#N 764): Q=-FAGK TAN ©L3)74 L4=(L4+Q)72. =SIN (L4):.9= cos (La OAL GSM K=ES COSUP I25¢ ONE Ye-P 2K =PARR. 1266. CosJuB AN M=Pl +P} +72: COSUB :2}=X.%=T1-72 COSJB 1258: °2= 2¥a7¢ Pinel Ss) ~>. x: RETURN PREM FIMING RO UT INE SiaFTASIN “AY 2: B2=COS d)-COS ¢BY2)): C2=SIN (BC2)) E1=201, 19:1F 1=-1 THEN LET 1=2(2,; 1) E2=201,2):1)F F 2=-1THEN LET E 2=2(2, 2) C=B1*C2*COS Ce 2)-B2*C1x*COS ¢ E1):S=B1xC2* SIN (E2)-B2*C1 XSIN CEL) m7 PC-1588 (TRS-88 PC-2) PROGRAM LISTING (cont.) 838: 968: 918: 926: 936: +k=B2*kA1-BIxA?. R=SQR CC*C+S4S yi V¥¥Y=S: XK=C: COSUB 125@:G=A N 2=6+9BXKACS CK R):YY=B2:XX=C2 *COS €2-E2)+A2 :GCSUB 126@:S2 =AN i TF © 2=) THEN LET Pp=PC3 =9QTN CTAN (PRD 7€1-CO8)) 43 P=P/RD: X=LE/RC :%=360: COSUS P5G:L=xKiTF v S@THEN Le REM OPT i GOSUB 185:FOR 1=iTO 2 PAUSE ‘ITD FOR '3G$¢1)3: INPUT "? "34: PAUSE :PAUSE " “;A=At+GC1)-D¢ T)-TC]): 1F ABS CADCTCIDTHEN 9 40 PRINT "ITD NOT VALID FOR "3G $C1):GOTO 928 S4@:4¢] =A721295.¢ P36:NEXT 2 COSUB 772@: RETURN 956: 1F A@=1THEN LET A@=-1:G5TO 972 9628: 40=1 976: COSUB 778: RETURN 980:REM Of7 6 398: INPUT "ORIGIN 1830: 1848:P)=°6:L1=_@: P2=PS:L2=L95: GOSUB 658 18050: %=368:X=21/7R D:GOSUB 1258 >GOSUB 1288 1@6@:PRINT "HEAD! NG = "3 C0$:M= 168: X=3443.9 17*S@: GOSUB 4@8:PRINT "DI STANCE = "5% 5 Mami! 1878: RETURN -24- PC~1588 (TRS-88 PC-2) PROGRAM LISTING (cont.) 1e8e: lege. 1]6e: 1220: 118@: 1198: 1208: 2s PAUS REM ORT 5 GOSUB 185: COSUB 1378: FOR K=1TO 2: