******************************************************************
*
*       TITLE:  DRIVER FOR UNPACKING VOYAGER CR-3 MAG (PLS) EDR
*
*       FILE NAME:  UNPACKCR3.FOR
*     
*       PURPOSE:  TO CALL THE ROUTINES UNPACK THE SUBHEADER (PLS DATA) 
*                  AND UNPACK THE MAG DATA.
*
*       HISTORY:
*
*       AUTHOR               DATE           CHANGE
*       ------               ----           ------
*       S. B. KRAMER       02/05/96         ORIGINAL CODE
*
*       CALLING SEQUENCE:  SUBROUTINE UNPACKCR3 (INBUF)
*
*       MODULES REFERENCED:
*
*          PLSCR3, MAGCR3
*
*       COMMON AREAS:
*
*          SEE UNPACK.INC FOR COMMON AREA DEFINITIONS
*
*       PDL:
*
*          CALL PLSCR3 TO UNPACK THE 116 SUBHEADER PLS DATA WORDS
*          CALL MAGCR3 TO UNPACK THE 750 MAG DATA WORDS
*          RETURN
*
*******************************************************************
      SUBROUTINE UNPACKCR3(INBUF)
C
      LOGICAL*1 INBUF(11280)
C
      INCLUDE 'UNPACK.INC'
C
C SEPARATE SUB-HEADER (PLASMA) DATA (464 BYTES)
C
      DO 2 I=241,704
         J=I-240
         PLS(J) = INBUF(I)
  2   CONTINUE
C
C SEPARATE MAG SCIENCE BLOCK (3000 BYTES)
C
      DO 3 I=705,3704
         J=I-704
         MAG(J) = INBUF(I)
  3   CONTINUE
C
      CALL PLSCR3()
      CALL MAGCR3()
C
      RETURN
      END
