FKLWM COMMENTS
*-- Author : S.Burke / J.V. Morris
      SUBROUTINE FKLWM(IFL,S1,C1,S2,C2,S3,C3,IERR)
**********************************************************************                                        
*                                                                    *                                        
* Take the weighted mean of two state vectors                        *                                        
*                                                                    *                                        
* ERROR CONDITIONS;                                                  *                                        
*       IERR =   0  ; normal termination                             *                                        
*   ->  IERR = 111  ; failure to invert output covariance            *                                        
*       IERR =  16  ; output theta > pi/2 (reset to pi/4)            *                                        
*       IERR =  17  ; output theta > 1 (warning)                     *                                        
*                                                                    *                                        
*   ->  Fatal error                                                  *                                        
*                                                                    *                                        
**********************************************************************                                        
*KEEP,FKECODE.                                                                                                
*KEND.                                                                                                        
**********************************************************************                                        
*                                                                                                             
* compute the inverse of the weighted average covariance ...                                                  
*                                                                                                             
         CALL FKADD(C1,C2,C3)
         CALL FKDIFF(S2,S1,S4)
         CALL FKSUB(C2,C1,C3)
         CALL FKDIFF(S1,S2,S4)
      CALL DSINV(5,C3,5,IFAIL)                                                                         
         CALL FKERR(IUTIL,IROUT,IFATAL,IOCV,IERR)
      CALL FKMLT(C1,C3,W)
      CALL FKMLT2(W,C2,C3)
*                                                                                                             
* compute the weighted average state vector ...                                                               
*                                                                                                             
      CALL FKNORM(S3,IFAIL)
      IF (IFAIL.NE.0) CALL FKERR(IUTIL,IROUT,IWARN,IFAIL,IERR)
*