FKLOOK COMMENTS
*-- Author : S.Burke / J.V. Morris
      LOGICAL FUNCTION FKLOOK(JPL,S,C,IERR)
*-----------------------------------------Updates 07/02/92-------                                             
**: FKLOOK 30205.SB. Initialise IFAIL1 to please UNDEF.                                                       
*-----------------------------------------Updates----------------                                             
**********************************************************************                                        
*                                                                    *                                        
* Look at a point we've already rejected, to see whether it now fits *                                        
*                                                                    *                                        
* ERROR CONDITIONS;                                                  *                                        
*       IERR =   0  ; normal termination                             *                                        
*   ->  IERR = 103  ; LMES(JPL) already set                          *                                        
*       IERR =  12  ; covariance of residuals n.p.d.                 *                                        
*                                                                    *                                        
*   ->  Fatal error                                                  *                                        
*                                                                    *                                        
* Note that both errors cause .FALSE. to be returned as the          *                                        
* function value, and no changes to be made to the measurement       *                                        
* arrays.                                                            *                                        
*                                                                    *                                        
**********************************************************************                                        
*KEEP,FKECODE.                                                                                                
*KEND.                                                                                                        
*KEEP,FKNPL.                                                                                                  
*                                                                                                             
* Per-track values can go in H1WORK; note that LTRUE and LFIRST must                                          
* be set at least per event.                                                                                  
*                                                                                                             
* This is about 36k words long; the remaining common blocks are                                               
* about 3.6k in total. Some of this could be in /H1WORK/, but the                                             
* blocks would have to be reorganised.                                                                        
*                                                                                                             
* /FKPROJ/                                                                                                    
* /FKFILT/                                                                                                    
* /FKSMTH/                                                                                                    
* /FKINT/                                                                                                     
* /FKRSID/                                                                                                    
* /FKTRUE/                                                                                                    
* /FKDBG/                                                                                                     
*KEEP,FKFLAG.                                                                                                 
*KEEP,FKMEAS.                                                                                                 
*KEEP,FKRJCT.                                                                                                 
*KEND.                                                                                                        
**********************************************************************                                        
* If LMES is still set we don't want to add it again                                                          
         CALL FKERR(IUTIL,IROUT,IFATAL,IINF3,IERR)
* This point was previously rejected; see if we want to put it back                                           
      CALL FKLRSD(JPL,S,C,3,RES,CRES,CHISQ,IFAIL)
* NB IFAIL1 not currently checked                                                                             
      IF (IFAIL.NE.0 .OR. CHISQ.GE.FKCHPR(3,MES(JPL),IFAIL1)) THEN
         IF (IFAIL.NE.0) CALL FKERR(IUTIL,IROUT,IWARN,IFAIL,IERR)
* Record the statistics                                                                                       
* Flag point so that it won't be tried again                                                                  
*