C CONVFRT TO MACHINE AXES C RTHETA = X3 Y4 = Y3*CA X4 = v4 * TA * POSIT X5 = P2 * SIN(X3/R2) 75 = R2 * COS(X2/R2) - CZ A4 = ATAN2(X5,Z5)*180.0 / 3.1415926 R = SORT (X5*X5+Z5*Z5) IF(K2 .GT.20) GO TO 3 WRITF(6,908)X2,Y2,X3,Y3,R,X5,Z5,X4,Y4,A4,POSIT,SAW 908 FORMAT (12F10.5) K2 = K2 + 1 3 CONTINLIF X2 = X4 Y? = Y4 GO TO 30 C 1999 CONTINUF C A MORF COMPLICATFC CONVERSION FOR C PIECE ROTATION IS nNF IN WHICH C A = 17,35 DEGREES = HALF THE CHECKE@IAG ANGLE C MACH. Y = MEASURED X *COS(#) C MACH.X = MEASUREC Y *SIN(#) * NACH Y*TAN(A) C PIFCF ROTATION = F(@ADII OF WOOD) C AND C RADTI WOOD = F(MEASURFO X ANC Y) C C THIS L4TTEP CONV IS C ACTIVATED Ry SETTING C F6 = 2,0 LIE .GY. 0.5) C GIVEN Y, SFARCH TABLE AND INTERPOLATE WORKING VALUES C TARLF INDICES ARE SECTION, ARC, AND ARGUMEAT C SFCTION = WHICH DISTANCF ALDNG AXIS OF BOTATION C ARC = WHICH ARC C ARGUMENT 1 = DISTANCE ALONG AXIS OF ROTATION C 2 = RADIUS C 3 = X THIS CENTER-X CENTER CF @CIATION C 4 = Z THIS CENTER-Z CENTER OF ROTATION C 5 = MINIMUM PATTERN X.WHICH LIES C ON THIS ARC.-USUALLY C CORRESPONDS WITH A PCINT OF C TANGENCY WITH ANOTHER ARC C 6 = MIN PROJECTED X CORRESPONDING TO X I-N 5 C 7 = Z CORRESPONDING TO X IN 5 AND 6 C SEE ALSO DESCRIPTION IN MAIN PRCGRAM X = Y = Y3 DO LO I = I.NSECT IF (Y .LT. TABLI.L.L)) GO TO 12 10 CONTINUF KERR = GO TO 899 12 J = I - 1 XMNDLn = DY1 = Y-TAB(J.L.I) DY2 = TAB(I.I.I.)-Y DY3 = TAB(I.I.I.)- TAB (J,I,I) DO 20 K = I,NARC XMIND = (TABLI,K,5) *DYI+TAB(J,K,5)*DY2)/DY3 IF(X .LT. XMIND) GO TO 22 XMNDLD = XMIND 20 CONTINUE KFRR = 2 GO TO 899 22 K = K-1 IF IK LT. 1) KFRR = 3 IF (K .LT.I) GO TO 899 R = (TAB(J,K,2)*DY2+TAB(I,K,2)*CY1)/DY3 XC = (TAB(J,K,3)*DY2+TAB(I,K,3)*DY1)/DY3 ZC = (TAB(J,K,4)*DY2+TAB(T,K,4)*DY1)/DY3 XMIN = (TAB(I,K,6)*DY1+TAB(J,K,6)*DY2)/DY3 ZMIN = (TAB(I,K,7)*DY1+TAB(J,K,7)*DY2)/DY3 GAM2 = (X - XMNDLCI/R IF (GAM2 .LT. 0.0) KFRR = 4 IF (GAM2 .LT. -.01) GO TO 899 IF (GAM2 .LT. -.001) WRITE(6,906) 906 FORMAT t I t * * * SLIGHT MISS OF TANGENT POINT 2 ) GAM3 = ATAN2 (ZMIN-2C.XMIN-XCL GAM1 = GAM3 - GAM2 XCY = R*COS(GAM1)+XC ZCY = R*SIN(GAM1)+ZC GAM = AYAN2(XCY.ZCY) YCY = Y*CA Y2 = YCY X2 = YCY*TA*AIND @4 = GAM*180./3.1415926 IF (K2 .GT.20 I GC TO 30 K2 = K2 + 1 899 CONTINDE WRITE(6,900) I,J,K,KFRR WRITE(6,901) Y,X,YCY, XMNPLD WRITE (6,902) DYI,DY2,DY2,XMIN WRITE (6,903) R,XC,ZC,ZMIM WRITE (6,804) GAM2,GAM3,GAMI WRITE (6,905) XCY,ZCY,GAM,YCY,A4 900 FORMAT (6H I=,I5,5H I=.I5,5H K=,15,6H KERR=,15) 901 FORMAT (5H Y=,F10.5.5H X=,F10,5,5H YCY=,F10,5,7H X IMNDLD,F10.5) 902 FORMAT (5H DY1=,F10.5,5H DY2=,F10,5,5H DY3=F10.5,7H X IMIN= .F10.5) 903 FORMAT (5H R=,F10.5,5H XC=,F10,5,5H ZC=, F10,5,6H Z IMIN= .F10.5) 904 FORMAT (6H GAM2=,F10.5,6H GAM3=,F10.5,6H GAM1=,F10.5I 905 FORMAT (5H XCY=,F10.5,5H ZCY=,F10.5,5H GAM=,F10.5,5H Y ICY=,F10.5.5H A4=,F10.5) IF(KERR .GT. 0 ) STOP 30 CONTINUE C SCALF VARIABLES C NOTE POSSIBLE SCALES ARE 1. ANO -1. ONLY X2 = X2 J RWYSCL = = Y2 / RWXSCL A4 = A4 / QWYSCL RETUPN ENO C SUBROUTINE COONS(IO) COMMnN/SUM/SUMLGT COMMON/PATSP/F6 COMMON/ADJSTR/RWXMIC.RWYMIO.RWXSCL.RWYSCL.R2 COMMON/COMSCL/SAVSCL COMMON /END/ENDPT(5),XZERO(5) COMMON/DPN/SLOPE(2,5).FVAL(5),HVAL(5),SLP(5),SL COMMON/FACTRS/SCALE(6) C NDIC = 1 FOR SIMPLE (LINFA@) BLCCK C NDIC = 2 FOR FULL CUBIC BLOCK COMMON/CTM/SAVE(5),B(5),C(5),D(5),STC DIMFNSION F(3) CATA (F(1).I=1.3)/65536.,4096..256./ DIMFNSION BZ(5) COMMON/CHFCK/ INO, POSIT, KTOOL COMMON/CUTSP/NCUT,STRLGT COMMON/PL/C1(5),C215), C3(5),C4(5) COMMON/MAIN/X(1000).Y(1000), STRGL (1000), ICRT, NOP, 1 DIH(1000), TLT(1000), A(1000) COMMON/CUTN/ICUT,NU,NDIC,VEND(5) COMMON /FND2/lFNC KSW = 1 KEY4 = 2 NU = 100 IF(IQ.MF.OIGO TO 105 C PICK UP TOCT @ MOVE TO NEW LOCATION KUPON = O IF (KTOOL .FO. 1) KUPON = 1 IF (ABS(SAVF(1)-CL(1)).GT. 0.0005 .OR.