******************************************************************
*
*       TITLE:  DRIVER FOR UNPACKING VOYAGER CR-6 MAG (PLS) EDR
*
*       FILE NAME:  UNPACKCR6.FOR
*     
*       PURPOSE:  TO CALL THE ROUTINES UNPACK THE SUBHEADER (PLS DATA) 
*                  AND UNPACK THE MAG DATA.
*
*       HISTORY:
*
*       AUTHOR               DATE           CHANGE
*       ------               ----           ------
*       S. B. KRAMER       03/19/96         ORIGINAL CODE
*
*       CALLING SEQUENCE:  SUBROUTINE UNPACKCR6 (INBUF)
*
*       MODULES REFERENCED:
*
*          UNPLS, UNMAG
*
*       COMMON AREAS:
*
*          SEE UNPACK.INC FOR COMMON AREA DEFINITIONS
*
*       PDL:
*
*          CALL UNPLS TO UNPACK THE 754 SUBHEADER PLS DATA WORDS
*          CALL UNMAG TO UNPACK THE 814 MAG DATA WORDS
*          RETURN
*
*******************************************************************
      SUBROUTINE UNPACKCR6(INBUF)
C
      LOGICAL*1 INBUF(11280)
C
      INCLUDE 'UNPACK.INC'
C
C SEPARATE SUB-HEADER (PLASMA) DATA (3016 BYTES)
C
      DO 2 I=241,3256
         J=I-240
         PLS(J) = INBUF(I)
  2   CONTINUE
C
C SEPARATE MAG SCIENCE BLOCK (3256 BYTES)
C
      DO 3 I=3257,6512
         J=I-3256
         MAG(J) = INBUF(I)
  3   CONTINUE
C
      CALL PLSCR6()
      CALL MAGCR6()
C
      RETURN
      END
