******************************************************************
*
*       TITLE:  DRIVER FOR UNPACKING VOYAGER GS & OC MAG (PLS) EDR
*
*       FILE NAME:  UNPACKGS3.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/26/93         MODIFIED FOR VOYAGER PRODUCTION
*
*       CALLING SEQUENCE:  SUBROUTINE UNPACKGS3 (INBUF)
*
*       MODULES REFERENCED:
*
*          PLSGS3, MAGGS3
*
*       COMMON AREAS:
*
*          SEE UNPACK.INC FOR COMMON AREA DEFINITIONS
*
*       PDL:
*
*          CALL UNPLS TO UNPACK THE 68 SUBHEADER PLS DATA WORDS
*          CALL UNMAG TO UNPACK THE 1500 MAG DATA WORDS
*          RETURN
*
*******************************************************************
      SUBROUTINE UNPACKGS3(INBUF)
C
      LOGICAL*1 INBUF(11280)
C
      INCLUDE 'UNPACK.INC'
C
C SEPARATE SUB-HEADER (PLASMA) DATA (272 BYTES)
C
      DO 2 I=241,512
         J=I-240
         PLS(J) = INBUF(I)
  2   CONTINUE
C
C SEPARATE MAG SCIENCE BLOCK (6000 BYTES)
C
      DO 3 I=513,6512
         J=I-512
         MAG(J) = INBUF(I)
  3   CONTINUE
C
      CALL PLSGS3()
      CALL MAGGS3()
C
      RETURN
      END
