VOYAGER
Voyager LECP Data Analysis Handbook
Instrument Modeling Reports
by Sheela Shodhan
E.10 POLY1
**************************************************************************** * PROGRAM POLYIN * * PURPOSE : THIS PROGRAM READS THE COORDINATES OF THE PLANES THAT ARE TO BE* * TESTED FROM A FILE AND COMPUTES THE COEFFICIENTS A,B,C,D OF THE * * CORRESPONDING PLANE BY CALLING THE ROUTINE 'PLANECOEFF'. THESE * * PLANES FORM THE GEOMETRY OF THE SENSOR SUBSYSTEM. * * VARIABLES : * * INPUT : * * *.DAT : THE NAME OF THE FILE OF COORDINATES OF THE VERTICES OF THE POLYGO* * -NS OF THE MODELLED SENSOR SUBSYSTEM. FOR GAMMA DETECTOR,*=COORGAM1* * AND FOR BETA DETECTOR, *=COORBET1. * * OUTPUT : * * COEFF.DAT : FILE OF THE COEFFICIENTS A,B,C, AND D OF THE PLANES OF THE * * POLYGONS OF THE MODELLED SENSOR SUBSYSTEM. * * OTHERS : * * A, B, C, D : COEFFICIENTS OF THE EQUATION Ax + By + Cz + D = 0 OF THE * * PLANE OF THE POLYGON OF THE MODELLED SENSOR SUBSYSTEM. * * CHAN : 2-D ARRAY WHOSE * * EACH ROW CORRESPONDS TO A PARTICULAR PLANE SURFACE; * * COL. 1:NO. OF VERTICES OF THAT PLANE POLYGON AND * * COL. 2>>>COL. NVERT*3+1 :ALL THE COORDINATES OF THE VERTICES OF * * THAT POLYGON. * * COEFF : 2-D ARRAY WHOSE * * EACH ROW CORRESPONDS TO A PARTICULAR PLANE SURFACE; * * COL. 1>>>COL. 4 :A,B,C,D COEFFICIENTS OF THE EQUATION OF THE PLANE* * FORMED BY THAT POLYGON. * * NVERT : NUMBER OF VERTICES OF A POLYGON OF THE MODELLED SENSOR SUBSYSTEM.* * VERT : 2-D ARRAY WHOSE * * EACH ROW CORRESPONDS TO A PARTICULAR VERTEX OF A POLYGON; * * COL. 1>>>COL.3 : COORDINATES (X,Y,Z) OF A VERTEX OF A POLYGON. * ****************************************************************************
PROGRAM POLYIN IMPLICIT NONE CHARACTER*72 FNAME INTEGER I,I1,I2,J,K,MAXCOO,MAXSURF,NCOL,NERR,NVERT,NTY PARAMETER (MAXCOO=95,MAXSURF=50) REAL*8 A,B,C,CHAN(MAXSURF,MAXCOO),COEFF(MAXSURF,4),D,VERT(35,3) INTEGER NV(MAXSURF)
OPEN (UNIT=2,STATUS='NEW',FILE='COEFF.DAT') WRITE(6,*) 'ENTER THE NAME OF THE FILE OF COORDINATES' READ(5,10) FNAME OPEN (UNIT=1,STATUS='OLD',FILE=FNAME) READ (1,*) 2 READ(1,*,END=70) NTY READ(1,*) NVERT CHAN(NTY,1) = DFLOAT(NVERT) I1=2 3 READ(1,20,ERR=2) (CHAN(NTY,K),K=I1,I1+2) I1=K GO TO 3 70 CLOSE(1)
C TO INITIALISE THE ARRAY WITH THE COORDINATES TO FIND THE COEFFICIENTS
DO I=1,NTY I1 = 2 NVERT = IDINT(CHAN(I,1)) NCOL = NVERT*3 + 1 J = 1 DO I2=1,NVERT DO WHILE ((J .LE. 3) .AND. (I1 .LE. NCOL)) VERT(I2,J) = CHAN(I,I1) J = J+1 I1 = I1+1 END DO J = 1 END DO
CALL PLANECOEFF(VERT,NVERT,A,B,C,D,NERR) C TO INITIALISE THE ARRAY COEFF WITH THE COEFFICIENTS OF THE PLANE COEFF(I,1) = A COEFF(I,2) = B COEFF(I,3) = C COEFF(I,4) = D
WRITE(2,30) I,NVERT,(COEFF(I,J),J=1,4) DO J=1,3 VERT(I,J) = 0.0D0 END DO END DO
10 FORMAT(A72) 20 FORMAT(3(X,F9.6)) 30 FORMAT(1X,I3,1X,I3,4(1X,D13.6)) STOP END
C--------------------------------------------------------------------------- C---------------------------------------------------------------------------
SUBROUTINE PLANECOEFF(VE,NVERT,A,B,C,D,NERR)
* PURPOSE : THIS ROUTINE DETERMINES THE COEFFICIENTS A, B, C, AND D OF THE * * EQUATION Ax + By + Cz + D = 0 OF THE PLANE OF THE POLYGON OF THE* * MODELLED SENSOR SUBSYSTEM. IT SOLVES THE COFACTORS OF A DETERMIN* * -ANT FORMED BY THE FIRST THREE VERTICES OF THE POLYGON TO FIND A,* * B, C AND D. THEN, IT CHECKS WHETHER THE REST OF THE VERTICES OF * * THE POLYGON SATISFIES THIS EQUATION OF THE PLANE WITHIN A CERTAI* * -N TOLERANCE OR NOT. * * VARIABLES : * * INPUT : * * NVERT : NUMBER OF VERTICES OF THE POLYGON. * * VE : 2-D ARRAY WHOSE * * EACH ROW CORRESPONDS TO A PARTICULAR VERTEX OF A POLYGON; * * COL. 1>>>COL.3 : COORDINATES (X,Y,Z) OF A VERTEX OF A POLYGON. * * OUTPUT : * * A, B, C, D : COEFFICIENTS OF THE EQUATION Ax + By + Cz + D = 0 OF THE * * PLANE OF THE POLYGON. * * OTHERS : * * NERR : ERROR INDICATOR * * =1 INDICATES THAT ONE OF THE VERTICES OF THE POLYGON DOES NOT SATIS* * -FY THE EQUATION OF THE PLANE WITHIN THE SPECIFIED TOLERANCE. * * =0 NO ERROR. * * TOL : TOLERANCE TO WITHIN WHICH ALL THE OTHER VERTICES SATISFY THE EQUATI* * -ON OF THE PLANE. * ****************************************************************************
IMPLICIT NONE INTEGER I,I2,J,NERR,NVERT REAL*8 A,B,C,D,DIF,TOL,VE(35,3) DATA TOL/1.0D-05/
A=0.D0 B=0.D0 C=0.D0 D=0.D0
C SOLVE THE COFACTORS OF A DETERMINANT TO GET A,B,C,D
DO I=1,3 IF (I.NE.3) THEN J=I+1 ELSE J=1 END IF A=A+(VE(I,2)*VE(J,3)-VE(I,3)*VE(J,2)) B=B+(VE(I,3)*VE(J,1)-VE(I,1)*VE(J,3)) C=C+(VE(I,1)*VE(J,2)-VE(I,2)*VE(J,1)) END DO
D=VE(1,1)*(VE(2,3)*VE(3,2)-VE(3,3)*VE(2,2)) D=D+VE(1,2)*(VE(2,1)*VE(3,3)-VE(3,1)*VE(2,3)) D=D+VE(1,3)*(VE(2,2)*VE(3,1)-VE(2,1)*VE(3,2))
C TEST IF THE REST OF THE VERTICES LIE IN THE PLANE C I=4 DO WHILE (I.LE.NVERT.AND.DIF.LE.TOL) DIF=DABS(A*VE(I,1)+B*VE(I,2)+C*VE(I,3)+D) D WRITE(6,*) ' I: ',I,' DIF: ',DIF I=I+1 END DO
IF (DIF.LE.TOL) THEN NERR=0 ELSE NERR=1 PRINT *,'ERROR IN THE COEFFICIENTS OF PLANE:',I END IF
RETURN END C--------------------------------------------------------------------------- C---------------------------------------------------------------------------
Return to thesis table of contents.
Return to Voyager
LECP Data Analysis Handbook Table of Contents.
Return to Fundamental
Technologies Home Page.
Updated 8/9/19, Cameron Crane
VOYAGER 1 ELAPSED TIME
--:--:--:--
Days: Hours:
Minutes: Seconds
*Since official launch
September 5, 1977, 12:56:00:00 UTC
*Since official launch
September 5, 1977, 12:56:00:00 UTC
VOYAGER 2 ELAPSED TIME
--:--:--:--
Days: Hours:
Minutes: Seconds
*Since official launch
August 20, 1977, 14:29:00:00 UTC
*Since official launch
August 20, 1977, 14:29:00:00 UTC
QUICK FACTS
Manufacturer:
Voyagers 1 and 2 were built in the Jet Propulsion
Laboratory in Southern California.
Mission Duration: 40+ years have elapsed for both Voyager 1 and Voyager 2 (both are ongoing).
Destination: Their original destinations were Saturn and Jupiter. Their current destination is interstellar space.
Mission Duration: 40+ years have elapsed for both Voyager 1 and Voyager 2 (both are ongoing).
Destination: Their original destinations were Saturn and Jupiter. Their current destination is interstellar space.