ULYSSES In Space

 

Sun Banner
ULYSSES

Ulysses HISCALE Data Analysis Handbook

 

Appendix 9  Geometric Factor Study for the Deflected and Unscattered Electrons of HISCALE (Buckley MS Thesis)

 

A9.13  Appendix: Computer Programs

 

 
*			  PROGRAM I.7			    *
*******************************************************************************
*                                 TRAJRT2BDET                                 *
* THIS IS A FILE OF ROUTINES THAT HAVE BEEN DECLARED EXTERNAL IN THE          *
* MAIN PROGRAM & WHICH ARE PASSED INTO THE ROUTINE DHPCG THAT SOLVES THE      *
* SYSTEM OF DIFFERENTIAL EQUATIONS.                                           *
*******************************************************************************
      SUBROUTINE FCT(X,Y,DERY)
 
      IMPLICIT NONE
      INTEGER NDIM
      PARAMETER (NDIM=6)
      REAL*8 BX,BY,BZ,DERY(NDIM),FAC,QMC,X,X00,Y(NDIM),Y00,Z00
      COMMON /QMC/QMC
C     COMMON /BX/BX,BY,BZ,/X00/X00,Y00,Z00
      PARAMETER (FAC=0.02540005D0)
C SUBROUTINE TO COMPUTE THE RIGHT HAND SIDE DERY OF THE SYSTEM AT THE 
C GIVEN VALUES OF X & Y.
 
      X00 = Y(1)/FAC
      Y00 = Y(2)/FAC
      Z00 = Y(3)/FAC
      CALL FDMOD(X00,Y00,Z00,BX,BY,BZ)
      DERY(1) = Y(4)
      DERY(2) = Y(5)
      DERY(3) = Y(6)
      DERY(4) = QMC * (Y(5)*BZ - Y(6)*BY)
      DERY(5) = QMC * (Y(6)*BX - Y(4)*BZ)
      DERY(6) = QMC * (Y(4)*BY - Y(5)*BX)
      
      RETURN
      END
C--------------------------------------------------------------------
C---------------------------------------------------------------------
      SUBROUTINE OUTP(X,Y,DERY,IHLF,NDIM,PRMT,HIT)
C PURPOSE : THIS IS A ROUTINE THAT IS DECLARED EXTERNAL IN THE MAIN
C ROUTINE. IT PRINTS THE OUTPUT VALUES OBTAINED FROM THE ROUTINE
C DHPCG - WHICH SOLVES THE SYSTEM OF DIFF. EQUATIONS.
      IMPLICIT NONE
      CHARACTER*72 FNAME
      INTEGER HIT,I,IHLF,MULC,MULC1,NCOUNT,NDIM,NSURF,NU
      REAL*8 DERY(NDIM),PRMT(5),X,Y(NDIM),TLN(2,3),TOTV,BX,BY,BZ,B,
     &   X00,Y00,Z00,FAC,PASVEL(10000,2)
      REAL*8 FPHI,DIST,X1,Y1,Z1
      PARAMETER (FAC=0.02540005D0)
      COMMON /NCOUNT/NCOUNT
      COMMON /TLN/TLN,/NU/NU
C      COMMON /PASVEL/PASVEL
      INCLUDE 'PASS5.CMN'
      DATA MULC/40/,MULC1/10/
      TOTV=DSQRT(Y(4)*Y(4) + Y(5)*Y(5) + Y(6)*Y(6))
      NCOUNT = NCOUNT + 1
D     B = DSQRT(BX*BX + BY*BY + BZ*BZ)
      IF (NU .EQ. 1) THEN
       DO I=1,3
        TLN(2,I)=Y(I)/FAC
       END DO
      ELSE
       DO I=1,3
        TLN(1,I)=TLN(2,I)
        TLN(2,I)=Y(I)/FAC
       END DO
       CALL CHECKHIT(HIT,NSURF)
                        !HIT=0 :CONTINUE WITH TRAJECTORY CALCULATION
                        !   =1 :HIT THE NSURF(NTH SURFACE), LOST
                        !   =2 :SUCCESSFULLY ESCAPED FROM THE SENSOR 
       IF (HIT .EQ. 2) THEN
	NPAS = NPAS + 1
	X1=TLN(2,1)-TLN(1,1)
  	Y1=TLN(2,2)-TLN(1,2)
	Z1=TLN(2,3)-TLN(1,3)
	DIST=DSQRT(X1*X1 + Y1*Y1 + Z1*Z1)
	PAS(NPAS,3)=DACOS(Z1/DIST)
	PAS(NPAS,4)=FPHI(X1,Y1)
C	PASVEL(NPAS,1)=DACOS(Y(6)/TOTV)
C	PASVEL(NPAS,2)=FPHI(Y(4),Y(5))
	DO I=1,6
	  PAS(NPAS,I+4)=Y(I)
	END DO
       END IF
      END IF 
      NU=NU+1         
D     WRITE(3,15) X,(Y(I),I=1,NDIM),TOTV
C15   FORMAT (1X,D14.7,6(1X,D14.7),1X,D14.7,1X,F10.3)
 15   FORMAT (1X,D14.7,6(1X,D15.8),1X,D21.14)
 20   FORMAT(3(X,F13.6))
      RETURN
      END

 

 

Return to the Table of Contents for Buckley's Thesis

Return to HISCALE List of Appendices

Return to Ulysses HISCALE Data Analysis Handbook Table of Contents


Updated 8/8/19, Cameron Crane

QUICK FACTS

Manufacturer: ESA provided the Ulysses spacecraft, NASA provided the power supply, and various others provided its instruments.

Mission End Date: June 30, 2009

Destination: The inner heliosphere of the sun away from the ecliptic plane

Orbit:  Elliptical orbit transversing the polar regions of the sun outside of the ecliptic plane