******************************************************************
*
*       TITLE:  DRIVER FOR UNPACKING VOYAGER CR-1 MAG (PLS) EDR
*
*       FILE NAME:  UNPACKCR1.FOR
*     
*       PURPOSE:  TO CALL THE ROUTINES UNPACK THE SUBHEADER (PLS DATA) 
*                  AND UNPACK THE MAG DATA.
*
*       HISTORY:
*
*       AUTHOR               DATE           CHANGE
*       ------               ----           ------
*       S. B. KRAMER       10/03/95         ORIGINAL CODE
*
*       CALLING SEQUENCE:  SUBROUTINE UNPACKCR1 (INBUF)
*
*       MODULES REFERENCED:
*
*          PLSCR1, MAGCR1
*
*       COMMON AREAS:
*
*          SEE UNPACK.INC FOR COMMON AREA DEFINITIONS
*
*       PDL:
*
*          CALL PLSCR1 TO UNPACK THE 360 SUBHEADER PLS DATA WORDS
*          CALL MAGCR1 TO UNPACK THE 2400 MAG DATA WORDS
*          RETURN
*
*******************************************************************
      SUBROUTINE UNPACKCR1(INBUF)
C
      LOGICAL*1 INBUF(11280)
C
      INCLUDE 'UNPACK.INC'
C
C SEPARATE SUB-HEADER (PLASMA) DATA (1440 BYTES)
C
      DO 2 I=241,1680
         J=I-240
         PLS(J) = INBUF(I)
  2   CONTINUE
C
C SEPARATE MAG SCIENCE BLOCK (9600 BYTES)
C
      DO 3 I=1681,11280
         J=I-1680
         MAG(J) = INBUF(I)
  3   CONTINUE
C
      CALL PLSCR1()
      CALL MAGCR1()
C
      RETURN
      END
