FKLPAS COMMENTS
*-- Author : S.Burke / J.V. Morris
      SUBROUTINE FKLPAS(JPL,NDROP,IERR)
**********************************************************************                                        
*                                                                    *                                        
* Point acquisition during smoothing (at plane JPL)                  *                                        
*                                                                    *                                        
* ERROR CONDITIONS;                                                  *                                        
*       IERR =   0  ; normal termination                             *                                        
*   ->  IERR =   1  ; smoothed vector missing                        *                                        
*   ->  IERR =   2  ; LMES(JPL) set on entry, but IRJCT(JPL) > 1     *                                        
*   ->  IERR =   3  ; LMES(JPL) not set by FKLOOK or FKHUNT          *                                        
*   ->  IERR =   4  ; internal error (IFLAG=0 in call to FKLRFL)     *                                        
*       IERR =   7  ; measurement covariance n.p.d. (not added)      *                                        
*       IERR =  11  ; smoothed covariance n.p.d. (not added)         *                                        
*       IERR =  12  ; covariance of smoothed residuals n.p.d.        *                                        
*       IERR =  16  ; theta > pi/2 (reset to pi/4)                   *                                        
*       IERR =  17  ; theta > 1 (warning)                            *                                        
*                                                                    *                                        
*   ->  `Fatal' error                                                *                                        
*                                                                    *                                        
* `Fatal' means that a serious problem occurred, but all errors      *                                        
* are recoverable as no changes are made.                            *                                        
*                                                                    *                                        
* Error codes from FKHUNT are passed back unchanged, but these are   *                                        
* not yet defined.                                                   *                                        
*                                                                    *                                        
**********************************************************************                                        
      LOGICAL FKLOOK,FKHUNT
*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,FKRJCT.                                                                                                 
*KEEP,FKSMTH.                                                                                                 
*KEEP,FKRSID.                                                                                                 
*KEEP,FKTRUE.                                                                                                 
*KEND.                                                                                                        
**********************************************************************                                        
         CALL FKERR(IUTIL,IROUT,IWARN,IINF1,IERR)
*                                                                                                             
* See if there's a new digi - first look for a completely new one ...                                         
* (If there's already a measurement, there may be a problem. FKHUNT                                           
* should check for this, and unhook the existing measurement if                                               
* necessary.)                                                                                                 
*                                                                                                             
      IF (.NOT.FKHUNT(JPL,SSMT(1,JPL),CSMT(1,1,JPL),IFAIL)) THEN
         IF (IFAIL.NE.0) CALL FKERR(IUTIL,IROUT,IWARN,IFAIL,IERR)
*                                                                                                             
* No luck, so if a point was previously rejected here, see if it                                              
* can go back again (but don't try more than once).                                                           
* If NDROP = JPL we just rejected this point, so don't try to                                                 
* put it back!                                                                                                
*                                                                                                             
* LMES(JPL) should not be set if IRJCT(JPL) is positive                                                       
            CALL FKERR(IUTIL,IROUT,IWARN,IINF3,IERR)
         IF (.NOT.FKLOOK(JPL,SSMT(1,JPL),CSMT(1,1,JPL),IFAIL)) RETURN
      IF (IFAIL.NE.0) CALL FKERR(IUTIL,IROUT,IFAIL/100,IFAIL,IERR)
* This shouldn't happen!                                                                                      
*                                                                                                             
* A new point has been found, so put it in                                                                    
*                                                                                                             
      CALL FKLRFL(JPL,2,IFAIL)
      IF (IFAIL.NE.0) CALL FKERR(IUTIL,IROUT,IWARN,IFAIL,IERR)
         CALL FKLRSD(JPL,SSMT(1,JPL),CSMT(1,1,JPL),-3,
         IF (IFAIL.NE.0) CALL FKERR(IUTIL,IROUT,IWARN,IFAIL,IERR)
         CALL FKRST(JPL,IFAIL)
         IF (IFAIL.NE.0) CALL FKERR(IUTIL,IROUT,IWARN,IFAIL,IERR)
* Only count a genuinely new point                                                                            
*