******************************************************************
*
*       TITLE:  DRIVER FOR UNPACKING VOYAGER CR-4 MAG (PLS) EDR
*
*       FILE NAME:  UNPACKCR4.FOR
*     
*       PURPOSE:  TO CALL THE ROUTINES UNPACK THE SUBHEADER (PLS DATA) 
*                  AND UNPACK THE MAG DATA.
*
*       HISTORY:
*
*       AUTHOR               DATE           CHANGE
*       ------               ----           ------
*       S. B. KRAMER       01/30/96         ORIGINAL CODE
*
*       CALLING SEQUENCE:  SUBROUTINE UNPACKCR4 (INBUF)
*
*       MODULES REFERENCED:
*
*          PLSCR4, MAGCR4
*
*       COMMON AREAS:
*
*          SEE UNPACK.INC FOR COMMON AREA DEFINITIONS
*
*       PDL:
*
*          CALL PLSCR4 TO UNPACK THE 218 SUBHEADER PLS DATA WORDS
*          CALL MAGCR4 TO UNPACK THE 720 MAG DATA WORDS
*          RETURN
*
*******************************************************************
      SUBROUTINE UNPACKCR4(INBUF)
C
      LOGICAL*1 INBUF(11280)
C
      INCLUDE 'UNPACK.INC'
C
C SEPARATE SUB-HEADER (PLASMA) DATA (872 BYTES)
C
      DO 2 I=241,1112
         J=I-240
         PLS(J) = INBUF(I)
  2   CONTINUE
C
C SEPARATE MAG SCIENCE BLOCK (2880 BYTES)
C
      DO 3 I=1113,3992
         J=I-1112
         MAG(J) = INBUF(I)
  3   CONTINUE
C
      CALL PLSCR4()
      CALL MAGCR4()
C
      RETURN
      END
