mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 13:30:52 -05:00 
			
		
		
		
	Fix the issue noted by N9JIM by allowing decodes near frequencies already searched, but not displaying dupes.
This commit is contained in:
		
							parent
							
								
									994e00c5d2
								
							
						
					
					
						commit
						7e078c805f
					
				@ -62,6 +62,7 @@ contains
 | 
				
			|||||||
    character(len=12) :: mycall, hiscall  !Used for AP decoding
 | 
					    character(len=12) :: mycall, hiscall  !Used for AP decoding
 | 
				
			||||||
    character(len=6) :: hisgrid
 | 
					    character(len=6) :: hisgrid
 | 
				
			||||||
    character*37 decoded                  !Decoded message
 | 
					    character*37 decoded                  !Decoded message
 | 
				
			||||||
 | 
					    character*37 decodes(100)
 | 
				
			||||||
    character*77 c77
 | 
					    character*77 c77
 | 
				
			||||||
    character*78 c78
 | 
					    character*78 c78
 | 
				
			||||||
    character*6 cutc
 | 
					    character*6 cutc
 | 
				
			||||||
@ -82,6 +83,8 @@ contains
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
! Start by setting some parameters and allocating storage for large arrays
 | 
					! Start by setting some parameters and allocating storage for large arrays
 | 
				
			||||||
    call sec0(0,tdecode)
 | 
					    call sec0(0,tdecode)
 | 
				
			||||||
 | 
					    ndecodes=0
 | 
				
			||||||
 | 
					    decodes=' '
 | 
				
			||||||
    nfa=nfa0
 | 
					    nfa=nfa0
 | 
				
			||||||
    nfb=nfb0
 | 
					    nfb=nfb0
 | 
				
			||||||
    nqd=nqd0
 | 
					    nqd=nqd0
 | 
				
			||||||
@ -161,8 +164,8 @@ contains
 | 
				
			|||||||
    call q65_dec0(iavg,nutc,iwave,ntrperiod,nfqso,ntol,ndepth,lclearave,  &
 | 
					    call q65_dec0(iavg,nutc,iwave,ntrperiod,nfqso,ntol,ndepth,lclearave,  &
 | 
				
			||||||
         emedelay,xdt,f0,snr1,width,dat4,snr2,idec,stageno)
 | 
					         emedelay,xdt,f0,snr1,width,dat4,snr2,idec,stageno)
 | 
				
			||||||
    call timer('q65_dec0',1)
 | 
					    call timer('q65_dec0',1)
 | 
				
			||||||
!    write(*,3001) '=a',sum(abs(float(iwave))),nfqso,ntol,ndepth,xdt,f0,idec
 | 
					!    write(*,3001) '=a',nfqso,ntol,ndepth,xdt,f0,idec
 | 
				
			||||||
!3001 format(a2,f15.0,3i5,f7.2,f7.1,i5)
 | 
					!3001 format(a2,3i5,f7.2,f7.1,i5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(idec.ge.0) then
 | 
					    if(idec.ge.0) then
 | 
				
			||||||
       dtdec=xdt                    !We have a q3 or q0 decode at nfqso
 | 
					       dtdec=xdt                    !We have a q3 or q0 decode at nfqso
 | 
				
			||||||
@ -201,6 +204,7 @@ contains
 | 
				
			|||||||
       call q65_loops(c00,npts/2,nsps/2,nsubmode,ndepth,jpk0,   &
 | 
					       call q65_loops(c00,npts/2,nsps/2,nsubmode,ndepth,jpk0,   &
 | 
				
			||||||
            xdt,f0,iaptype,xdt1,f1,snr2,dat4,idec)
 | 
					            xdt,f0,iaptype,xdt1,f1,snr2,dat4,idec)
 | 
				
			||||||
       call timer('q65loops',1)
 | 
					       call timer('q65loops',1)
 | 
				
			||||||
 | 
					!       write(*,3001) '=b',nfqso,ntol,ndepth,xdt,f0,idec
 | 
				
			||||||
       if(idec.ge.0) then
 | 
					       if(idec.ge.0) then
 | 
				
			||||||
          dtdec=xdt1
 | 
					          dtdec=xdt1
 | 
				
			||||||
          f0dec=f1
 | 
					          f0dec=f1
 | 
				
			||||||
@ -268,7 +272,14 @@ contains
 | 
				
			|||||||
! Unpack decoded message for display to user
 | 
					! Unpack decoded message for display to user
 | 
				
			||||||
       write(c77,1000) dat4(1:12),dat4(13)/2
 | 
					       write(c77,1000) dat4(1:12),dat4(13)/2
 | 
				
			||||||
1000   format(12b6.6,b5.5)
 | 
					1000   format(12b6.6,b5.5)
 | 
				
			||||||
       call unpack77(c77,1,decoded,unpk77_success) !Unpack to get msgsent
 | 
					       call unpack77(c77,1,decoded,unpk77_success) !Unpack to get decoded
 | 
				
			||||||
 | 
					       idupe=0
 | 
				
			||||||
 | 
					       do i=1,ndecodes
 | 
				
			||||||
 | 
					          if(decodes(i).eq.decoded) idupe=1
 | 
				
			||||||
 | 
					       enddo
 | 
				
			||||||
 | 
					       if(idupe.eq.0) then
 | 
				
			||||||
 | 
					          ndecodes=min(ndecodes+1,100)
 | 
				
			||||||
 | 
					          decodes(ndecodes)=decoded
 | 
				
			||||||
          call q65_snr(dat4,dtdec,f0dec,mode_q65,nused,snr2)
 | 
					          call q65_snr(dat4,dtdec,f0dec,mode_q65,nused,snr2)
 | 
				
			||||||
          nsnr=nint(snr2)
 | 
					          nsnr=nint(snr2)
 | 
				
			||||||
          call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded,    &
 | 
					          call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded,    &
 | 
				
			||||||
@ -287,16 +298,17 @@ contains
 | 
				
			|||||||
             if(c6.eq.'      ') c6='<b>   '
 | 
					             if(c6.eq.'      ') c6='<b>   '
 | 
				
			||||||
             c4=hisgrid(1:4)
 | 
					             c4=hisgrid(1:4)
 | 
				
			||||||
             if(c4.eq.'    ') c4='<b> '
 | 
					             if(c4.eq.'    ') c4='<b> '
 | 
				
			||||||
          fmt='(i6.4,1x,a4,4i2,6i3,i4,f6.2,f7.1,f6.1,f7.1,f6.2,'//   &
 | 
					             fmt='(i6.4,1x,a4,i5,4i2,6i3,i4,f6.2,f7.1,f6.1,f7.1,f6.2,'//   &
 | 
				
			||||||
                  '1x,a6,1x,a6,1x,a4,1x,a)'
 | 
					                  '1x,a6,1x,a6,1x,a4,1x,a)'
 | 
				
			||||||
             if(ntrperiod.le.30) fmt(5:5)='6'
 | 
					             if(ntrperiod.le.30) fmt(5:5)='6'
 | 
				
			||||||
             if(idec.eq.3) nrc=0
 | 
					             if(idec.eq.3) nrc=0
 | 
				
			||||||
          write(22,fmt) nutc,cmode,nQSOprogress,idec,idfbest,idtbest,ibw,    &
 | 
					             write(22,fmt) nutc,cmode,nfqso,nQSOprogress,idec,idfbest,idtbest, &
 | 
				
			||||||
               ndistbest,nused,icand,ncand,nrc,ndepth,xdt,f0,snr2,plog,      &
 | 
					                  ibw,ndistbest,nused,icand,ncand,nrc,ndepth,xdt,f0,snr2,plog, &
 | 
				
			||||||
                  tdecode,mycall(1:6),c6,c4,trim(decoded)
 | 
					                  tdecode,mycall(1:6),c6,c4,trim(decoded)
 | 
				
			||||||
             close(22)
 | 
					             close(22)
 | 
				
			||||||
          endif
 | 
					          endif
 | 
				
			||||||
       endif
 | 
					       endif
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
    navg0=1000*navg(0) + navg(1)
 | 
					    navg0=1000*navg(0) + navg(1)
 | 
				
			||||||
    if(single_decode .or. lagain) go to 900
 | 
					    if(single_decode .or. lagain) go to 900
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -333,6 +345,7 @@ contains
 | 
				
			|||||||
          call q65_loops(c00,npts/2,nsps/2,nsubmode,ndepth,jpk0,   &
 | 
					          call q65_loops(c00,npts/2,nsps/2,nsubmode,ndepth,jpk0,   &
 | 
				
			||||||
               xdt,f0,iaptype,xdt1,f1,snr2,dat4,idec)
 | 
					               xdt,f0,iaptype,xdt1,f1,snr2,dat4,idec)
 | 
				
			||||||
          call timer('q65loops',1)
 | 
					          call timer('q65loops',1)
 | 
				
			||||||
 | 
					!          write(*,3001) '=e',nfqso,ntol,ndepth,xdt,f0,idec
 | 
				
			||||||
          if(idec.ge.0) then
 | 
					          if(idec.ge.0) then
 | 
				
			||||||
             dtdec=xdt1
 | 
					             dtdec=xdt1
 | 
				
			||||||
             f0dec=f1
 | 
					             f0dec=f1
 | 
				
			||||||
@ -344,7 +357,14 @@ contains
 | 
				
			|||||||
       if(idec.ge.0) then
 | 
					       if(idec.ge.0) then
 | 
				
			||||||
! Unpack decoded message for display to user
 | 
					! Unpack decoded message for display to user
 | 
				
			||||||
          write(c77,1000) dat4(1:12),dat4(13)/2
 | 
					          write(c77,1000) dat4(1:12),dat4(13)/2
 | 
				
			||||||
          call unpack77(c77,1,decoded,unpk77_success) !Unpack to get msgsent
 | 
					          call unpack77(c77,1,decoded,unpk77_success) !Unpack to get decoded
 | 
				
			||||||
 | 
					          idupe=0
 | 
				
			||||||
 | 
					          do i=1,ndecodes
 | 
				
			||||||
 | 
					             if(decodes(i).eq.decoded) idupe=1
 | 
				
			||||||
 | 
					          enddo
 | 
				
			||||||
 | 
					          if(idupe.eq.0) then
 | 
				
			||||||
 | 
					             ndecodes=min(ndecodes+1,100)
 | 
				
			||||||
 | 
					             decodes(ndecodes)=decoded
 | 
				
			||||||
             call q65_snr(dat4,dtdec,f0dec,mode_q65,nused,snr2)
 | 
					             call q65_snr(dat4,dtdec,f0dec,mode_q65,nused,snr2)
 | 
				
			||||||
             nsnr=nint(snr2)
 | 
					             nsnr=nint(snr2)
 | 
				
			||||||
             call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded,    &
 | 
					             call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded,    &
 | 
				
			||||||
@ -363,16 +383,17 @@ contains
 | 
				
			|||||||
                if(c6.eq.'      ') c6='<b>   '
 | 
					                if(c6.eq.'      ') c6='<b>   '
 | 
				
			||||||
                c4=hisgrid(1:4)
 | 
					                c4=hisgrid(1:4)
 | 
				
			||||||
                if(c4.eq.'    ') c4='<b> '
 | 
					                if(c4.eq.'    ') c4='<b> '
 | 
				
			||||||
             fmt='(i6.4,1x,a4,4i2,6i3,i4,f6.2,f7.1,f6.1,f7.1,f6.2,'//   &
 | 
					                fmt='(i6.4,1x,a4,i5,4i2,6i3,i4,f6.2,f7.1,f6.1,f7.1,f6.2,'//   &
 | 
				
			||||||
                     '1x,a6,1x,a6,1x,a4,1x,a)'
 | 
					                     '1x,a6,1x,a6,1x,a4,1x,a)'
 | 
				
			||||||
                if(ntrperiod.le.30) fmt(5:5)='6'
 | 
					                if(ntrperiod.le.30) fmt(5:5)='6'
 | 
				
			||||||
                if(idec.eq.3) nrc=0
 | 
					                if(idec.eq.3) nrc=0
 | 
				
			||||||
             write(22,fmt) nutc,cmode,nQSOprogress,idec,idfbest,idtbest,ibw,  &
 | 
					                write(22,fmt) nutc,cmode,nfqso,nQSOprogress,idec,idfbest,idtbest, &
 | 
				
			||||||
                  ndistbest,nused,icand,ncand,nrc,ndepth,xdt,f0,snr2,plog,    &
 | 
					                     ibw,ndistbest,nused,icand,ncand,nrc,ndepth,xdt,f0,snr2,plog, &
 | 
				
			||||||
                     tdecode,mycall(1:6),c6,c4,trim(decoded)
 | 
					                     tdecode,mycall(1:6),c6,c4,trim(decoded)
 | 
				
			||||||
                close(22)
 | 
					                close(22)
 | 
				
			||||||
             endif
 | 
					             endif
 | 
				
			||||||
          endif
 | 
					          endif
 | 
				
			||||||
 | 
					       endif
 | 
				
			||||||
    enddo  ! icand
 | 
					    enddo  ! icand
 | 
				
			||||||
    if(iavg.eq.0 .and.navg(iseq).ge.2 .and. iand(ndepth,16).ne.0) go to 50
 | 
					    if(iavg.eq.0 .and.navg(iseq).ge.2 .and. iand(ndepth,16).ne.0) go to 50
 | 
				
			||||||
900 return
 | 
					900 return
 | 
				
			||||||
 | 
				
			|||||||
@ -570,7 +570,6 @@ subroutine q65_ccf_22(s1,iz,jz,nfqso,ntol,ndepth,ntrperiod,iavg,ipk,jpk,  &
 | 
				
			|||||||
     i=indx(k)+ia-1
 | 
					     i=indx(k)+ia-1
 | 
				
			||||||
     if(ccf2(i).lt.3.3) exit                !Candidate limit
 | 
					     if(ccf2(i).lt.3.3) exit                !Candidate limit
 | 
				
			||||||
     f=i*df
 | 
					     f=i*df
 | 
				
			||||||
     if(f.ge.(nfqso-ftol) .and. f.le.(nfqso+ftol)) cycle  !Looked here already
 | 
					 | 
				
			||||||
     i3=max(1, i-mode_q65)
 | 
					     i3=max(1, i-mode_q65)
 | 
				
			||||||
     i4=min(iz,i+mode_q65)
 | 
					     i4=min(iz,i+mode_q65)
 | 
				
			||||||
     biggest=maxval(ccf2(i3:i4))
 | 
					     biggest=maxval(ccf2(i3:i4))
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user