C PROGRAM PIOPLATR: reads Pioneer 10/11 spacecraft trajectory dataset in C VAX BINARY format and writes some parameters within C desired time interval in ASCII format. C C Version: 6/29/95, J. F. Cooper / Hughes STX Corp. C C INPUT FILE NAME: TEMPTR.DAT (COPIED FROM PxxTRA.EXT) - VAX BINARY FORMAT C C DEFINE VARIABLE TYPES, DIMENSIONS, COMMON BLOCK, AND EQUIVALENCE C IMPLICIT REAL*4 (A-H,O-W) REAL*4 JYDD,NBREC,NSWREC,NHR,MSEC DIMENSION REC1(17),X(14),ANGL(2),CSTATE(6),EANGL(2) ! Trajectory data C DIMENSION REC1(6) ! Attitude data C DIMENSION REC1(27) ! Summary data C DIMENSION REC1(30) ! Hourly data CHARACTER*4 ISCID CHARACTER*50 OUTFIL COMMON /CREC1/ ISCID,JYDD,MSEC,RSC,ANGL,CSTATE, ! Trajectory data * VSC,RE,EANGL,RESC C C RECORD_LENGTH: 70 Bytes (two bytes are a DEC-style record length C identifier, the remaining 68 bytes are 17 4-byte real C words of data). C RECORD_FIELD_MNEMONICS: SCID, YRDAY, MSEC, RSC, ANGL( 2), CSTATE( 6), C VSC, RE, EANGL( 2), RESC C FORMAT(1X,A4,1X,F7.1,1X,F10.1,1X,E10.4,1X,2(F7.2,1X),6(E10.4,1X), C E10.4,1X,E11.5,1X,2(F7.2,1X),E11.5) C COMMON /CREC1/ ISCID, JYDD, NSEC, X1,X2,X3 ! Attitude data C C COMMON /CREC1/ ! Hourly average common block C * ISCID, JYDD, NSEC, RAD, HLONG, HLAT, NBREC, NSWREC, C * BNON1, BMAG, BAZM, BPOL, BNON2, RBMAG, RBAZM, RBPOL, C * TEM, DEN, VEL, AZM, POL, RTEM, RDEN, RVEL, C * RAZM, RPOL, FLUX, PRES, PCONV, ERG c COMMON /CREC1/ ! Summary data common block c * ISCID, JYDD, NSEC, RAD, HLONG, HLAT, CHISQ, BADREC, c * BNON1, BMAG, BAZM, BPOL, BNON2, DBMAG, DBAZM, DBPOL, c * TEM, DEN, VEL, AZM, POL, DTEM, DDEN, DVEL, DAZM,X1,X2 ! X1, X2 ?? EQUIVALENCE (REC1(1),ISCID) ! DATA IU/6/,AU/1.497E8/ C C OPEN THE INPUT FILE C OPEN(UNIT=10,FILE='TEMPTR.DAT', * STATUS='OLD',READONLY,FORM='UNFORMATTED') C C OPEN THE OUTPUT FILE WRITE(6,*) ' Enter OUTPUT FILENAME (P10PLATR_YYYY.ASC)' READ(5,10) OUTFIL 10 FORMAT(A50) OPEN(UNIT=20,FILE=OUTFIL,RECL=300,STATUS='NEW') C WRITE OUTPUT HEADER RECORD WRITE(20,15) 15 FORMAT(' SCID YYDDD NSEC RSC ANGL1 ', * 'ANGL2 XSC YSC ZSC VXSC ', * 'VYSC VZSC VSC RE EANGL1 ', * 'EANGL2 RESC') C.. READ IN DESIRED START, STOP DATES AS YYDDD. C WRITE(6,*) ' Enter start & stop dates (yyddd): ' READ(5,*) ISTART,ISTOP C WRITE(IU,1003) C C READ DATA RECORDS FROM FT10F001. TEST FOR DESIRED INTERVAL. C 20 READ(10,END=100) REC1 C WRITE(6,*) ISCID,JYDD,NSEC IF(JYDD.LT.ISTART) GOTO 20 IF(JYDD.GT.ISTOP) GOTO 100 C C.....RECORD IS IN DESIRED INTERVAL. WRITE OUTPUT AND INPUT NEXT RECORD. C C R=RAD/AU ! Hourly and summary data C NHR= NSEC/3600.0 ! Summary data C C WRITE(IU,1004) ISCID,JYDD,NHR,NSEC ! Attitude & traj. data c WRITE(IU,1004) ISCID,JYDD,NHR,VEL,DEN,TEM,AZM,POL WRITE(20,1005) ISCID,JYDD,MSEC,RSC,ANGL,CSTATE,VSC,RE,EANGL,RESC 1005 FORMAT(1X,A4,1X,F7.1,1X,F10.1,1X,E10.4,1X,2(F7.2,1X), * 6(E10.4,1X),E10.4,1X,E11.5,1X,2(F7.2,1X),E11.5) GOTO 20 C C.....END OF LISTING C 100 WRITE(6,*) ' END OF INPUT FILE' 300 STOP C C OUTPUT FORMAT STATEMENTS C 1003 FORMAT(' ISCID YYDDD HOUR NSEC '//) ! Attitude & trajectory data 1004 FORMAT(2X,A4,1X,F6.0,1X,F3.0,1X,F9.0) ! Attitutde & trajectory data c1003 FORMAT(' ISCID YYDDD HR VEL DEN TEMP AZM POL'//) c1004 FORMAT(2X,A4,1X,F6.0,1X,F3.0,1X,F8.1,1X,F8.3,1X,F9.0,1X,2F7.2) END