******************************************************************
*
*       TITLE:  DRIVER FOR UNPACKING VOYAGER VIM-5 MAG (PLS) EDR
*
*       FILE NAME:  UNPACKVIM5.FOR
*     
*       PURPOSE:  TO CALL THE ROUTINES UNPACK THE SUBHEADER (PLS DATA) 
*                  AND UNPACK THE MAG DATA.
*
*       HISTORY:
*
*       AUTHOR               DATE           CHANGE
*       ------               ----           ------
*       S. J. KEMPLER       8/12/85         ORIGINAL CODE
*       S. B. KRAMER       10/09/92         MODIFIED FOR VIM-5 MODE
*
*       CALLING SEQUENCE:  SUBROUTINE UNPACKVIM5 (INBUF)
*
*       MODULES REFERENCED:
*
*          PLSVIM5, MAGVIM5
*
*       COMMON AREAS:
*
*          SEE UNPACK.INC FOR COMMON AREA DEFINITIONS
*
*       PDL:
*
*          CALL PLSVIM5 TO UNPACK THE 108 SUBHEADER PLS DATA WORDS
*          CALL MAGVIM5 TO UNPACK THE 260 MAG DATA WORDS
*          RETURN
*
*******************************************************************
      SUBROUTINE UNPACKVIM5(INBUF)
C
      LOGICAL*1 INBUF(11280)
C
      INCLUDE 'UNPACK.INC'
C
C SEPARATE SUB-HEADER (PLASMA) DATA (432 BYTES)
C
      DO 2 I=241,672
         J=I-240
         PLS(J) = INBUF(I)
  2   CONTINUE
C
C SEPARATE MAG SCIENCE BLOCK (1040 BYTES)
C
      DO 3 I=673,1712
         J=I-672
         MAG(J) = INBUF(I)
  3   CONTINUE
C
      CALL PLSVIM5()
      CALL MAGVIM5()
C
      RETURN
      END
