      SUBROUTINE FORMCT (I,R1,WEI1,VEL1,R2,WEI2,VEL2,C,VEL)

*** COMPUTE OBS. EQ. COEFFICIENTS FOR D(dX,dY,dZ)/DT                
***    WHERE dX = X2 - X1, ET CETERA

      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      IMPLICIT INTEGER (I-N)
      COMMON /CONST/ PI,PI2,RAD,RADSEC,TWOPI
      DIMENSION C(31)
      DIMENSION WEI1(2,2),WEI2(2,2)
      DIMENSION R1(3,3), R2(3,3)
      DIMENSION VEL1(2,2,3), VEL2(2,2,3)
      DIMENSION UNIT(3)

      UNIT(1) = RADSEC
      UNIT(2) = RADSEC
      UNIT(3) = 1.D0

      VEL = 0.0D0
      INDEX = 0

      DO 30 IGRD = 1,2
        DO 20 JGRD = 1,2
          DO 10 IVEC = 1,3
             INDEX = INDEX + 1
             C(INDEX) = -R1(IVEC,I)*WEI1(IGRD,JGRD)
             VEL = VEL + C(INDEX)*VEL1(IGRD,JGRD,IVEC)*UNIT(IVEC)
   10     CONTINUE
   20   CONTINUE
   30 CONTINUE

      DO 60 IGRD = 1,2
        DO 50 JGRD = 1,2
          DO 40 IVEC = 1,3
             INDEX = INDEX + 1
             C(INDEX) = R2(IVEC,I)*WEI2(IGRD,JGRD)
             VEL = VEL + C(INDEX)*VEL2(IGRD,JGRD,IVEC)*UNIT(IVEC)
   40     CONTINUE
   50   CONTINUE
   60 CONTINUE

      RETURN
      END
