      SUBROUTINE SEDRPROC(NVBLK,MPE,RH,VH,THETA,BETA,MTB,MHG,MTB5)
C
C COMPUTE THE TRANFORMATION FROM THE EARTH MEAN ECLIPTIC AND EQUINOX
C OF 1950.0 (EME'50) COORDINATES TO HELIOGRAPHIC COORDINATES.
C
C INPUT NAVIGATION RECORD DATA (NVBLK) AND POINTING VECTOR DATA (MPE)
C
C MATRICES ARE REPRESENTED IN ROW MAJOR ORDER, IE;
C    11 12 13
C    21 22 23
C    31 32 33
C
      REAL*4 NVBLK(6),RE(3),RH(3),VE(3),VH(3)
      REAL*4 MHG(3,3),MTB(3,3),MSUN(3,3),M5(3,3),MPE(3,3),MTB5(3,3)
C
C M5 IS A PSEUDO-CONSTANT ORTHOGONAL MATRIX THAT MAPS VECTORS FROM THE EARTH-
C MEAN-ECLIPTIC, EQUINOX OF 1950 (EME'50) INERTIAL SYSTEM TO AN INERTIAL 
C HELIOGRAPHIC SYSTEM (IHG).
C
      DATA M5 / 0.2576, -0.9585,  0.1219,
     &          0.9662,  0.2555, -0.0325,
     &          0.0   ,  0.1262,  0.9920 /
C 
C LOAD S/C POSITION VECTOR INTO ARRAY RE.
C
      RE(1) = NVBLK(1)
      RE(2) = NVBLK(2)
      RE(3) = NVBLK(3)
C
C LOAD S/C VELOCITY VECTOR INTO ARRAY VE.
C
      VE(1) = NVBLK(4)
      VE(2) = NVBLK(5)
      VE(3) = NVBLK(6)
C
C GET IHG SPACECRAFT LATITUDE (THETA) AND LONGITUDE (BETA), AND 
C IHG TO HG TRANSFORMATION MATRIX (MTB).
C 
      CALL POS(RE,VE,M5,RH,VH,THETA,BETA,MTB)
C
C GET PAYLOAD TO IHG TRANSFORMATION MATRIX (MSUN)
C
      CALL IHG(MSUN,M5,MPE)
C
C GET PAYLOAD TO HG TRANSFORMATION MATRIX (MHG)
C
      CALL HG(MHG,MTB,MSUN)
C
C GET EME'50 TO HG TRANSFORMATION MATRIX (MTB5)
C
      CALL MPRD33(MTB5,MTB,M5)
C
      RETURN
      END
