mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-04 05:50:31 -05:00 
			
		
		
		
	Minor tweaks to FT8 decoder, including norder=3 if ndepth=3.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7805 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									31229e9691
								
							
						
					
					
						commit
						a985952057
					
				@ -1,4 +1,5 @@
 | 
				
			|||||||
subroutine ft8b(dd0,newdat,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message,xsnr)
 | 
					subroutine ft8b(dd0,newdat,nfqso,ndepth,icand,sync0,f1,xdt,nharderrors,   &
 | 
				
			||||||
 | 
					     dmin,nbadcrc,message,xsnr)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  use timer_module, only: timer
 | 
					  use timer_module, only: timer
 | 
				
			||||||
  include 'ft8_params.f90'
 | 
					  include 'ft8_params.f90'
 | 
				
			||||||
@ -19,13 +20,13 @@ subroutine ft8b(dd0,newdat,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message,xsnr)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  max_iterations=40
 | 
					  max_iterations=40
 | 
				
			||||||
  norder=2
 | 
					  norder=2
 | 
				
			||||||
 | 
					  if(ndepth.eq.3 .and. abs(nfqso-f1).lt.10.0) norder=3
 | 
				
			||||||
  fs2=12000.0/NDOWN
 | 
					  fs2=12000.0/NDOWN
 | 
				
			||||||
  dt2=1.0/fs2
 | 
					  dt2=1.0/fs2
 | 
				
			||||||
  twopi=8.0*atan(1.0)
 | 
					  twopi=8.0*atan(1.0)
 | 
				
			||||||
  delfbest=0.
 | 
					  delfbest=0.
 | 
				
			||||||
  ibest=0
 | 
					  ibest=0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!  if(abs(nfqso-f1).lt.10.0) norder=3
 | 
					 | 
				
			||||||
  call timer('ft8_down',0)
 | 
					  call timer('ft8_down',0)
 | 
				
			||||||
  call ft8_downsample(dd0,newdat,f1,cd0)   !Mix f1 to baseband and downsample
 | 
					  call ft8_downsample(dd0,newdat,f1,cd0)   !Mix f1 to baseband and downsample
 | 
				
			||||||
  call timer('ft8_down',1)
 | 
					  call timer('ft8_down',1)
 | 
				
			||||||
@ -141,6 +142,8 @@ subroutine ft8b(dd0,newdat,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message,xsnr)
 | 
				
			|||||||
     if( xnoi.gt.0 .and. xnoi.lt.xsig ) xsnr=xsig/xnoi-1.0
 | 
					     if( xnoi.gt.0 .and. xnoi.lt.xsig ) xsnr=xsig/xnoi-1.0
 | 
				
			||||||
     xsnr=10.0*log10(xsnr)-27.0
 | 
					     xsnr=10.0*log10(xsnr)-27.0
 | 
				
			||||||
     if( xsnr .lt. -24.0 ) xsnr=-24.0
 | 
					     if( xsnr .lt. -24.0 ) xsnr=-24.0
 | 
				
			||||||
 | 
					!     write(50,3050) icand,sync0,f1,xdt,nharderrors,dmin,message
 | 
				
			||||||
 | 
					!3050 format(i3,3f10.3,i5,f10.3,2x,a22)
 | 
				
			||||||
  endif
 | 
					  endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
900 continue
 | 
					900 continue
 | 
				
			||||||
 | 
				
			|||||||
@ -8,8 +8,8 @@ subroutine sync8(dd,nfa,nfb,nfqso,s,candidate,ncand)
 | 
				
			|||||||
  real x(NFFT1)
 | 
					  real x(NFFT1)
 | 
				
			||||||
  real sync2d(NH1,-JZ:JZ)
 | 
					  real sync2d(NH1,-JZ:JZ)
 | 
				
			||||||
  real red(NH1)
 | 
					  real red(NH1)
 | 
				
			||||||
  real candidate0(3,100)
 | 
					  real candidate0(3,200)
 | 
				
			||||||
  real candidate(3,100)
 | 
					  real candidate(3,200)
 | 
				
			||||||
  real dd(NMAX)
 | 
					  real dd(NMAX)
 | 
				
			||||||
  integer jpeak(NH1)
 | 
					  integer jpeak(NH1)
 | 
				
			||||||
  integer indx(NH1)
 | 
					  integer indx(NH1)
 | 
				
			||||||
@ -88,12 +88,12 @@ subroutine sync8(dd,nfa,nfb,nfqso,s,candidate,ncand)
 | 
				
			|||||||
  do i=1,100
 | 
					  do i=1,100
 | 
				
			||||||
     n=ia + indx(iz+1-i) - 1
 | 
					     n=ia + indx(iz+1-i) - 1
 | 
				
			||||||
     if(red(n).lt.syncmin) exit
 | 
					     if(red(n).lt.syncmin) exit
 | 
				
			||||||
     k=k+1
 | 
					     if(k.lt.200) k=k+1
 | 
				
			||||||
     candidate0(1,k)=n*df
 | 
					     candidate0(1,k)=n*df
 | 
				
			||||||
     candidate0(2,k)=(jpeak(n)-1)*tstep
 | 
					     candidate0(2,k)=(jpeak(n)-1)*tstep
 | 
				
			||||||
     candidate0(3,k)=red(n)
 | 
					     candidate0(3,k)=red(n)
 | 
				
			||||||
  enddo
 | 
					  enddo
 | 
				
			||||||
  ncand=min(100,k)
 | 
					  ncand=k
 | 
				
			||||||
 | 
					
 | 
				
			||||||
! Put nfqso at top of list, and save only the best of near-dupe freqs.  
 | 
					! Put nfqso at top of list, and save only the best of near-dupe freqs.  
 | 
				
			||||||
  do i=1,ncand
 | 
					  do i=1,ncand
 | 
				
			||||||
 | 
				
			|||||||
@ -32,7 +32,7 @@ contains
 | 
				
			|||||||
    class(ft8_decoder), intent(inout) :: this
 | 
					    class(ft8_decoder), intent(inout) :: this
 | 
				
			||||||
    procedure(ft8_decode_callback) :: callback
 | 
					    procedure(ft8_decode_callback) :: callback
 | 
				
			||||||
    real s(NH1,NHSYM)
 | 
					    real s(NH1,NHSYM)
 | 
				
			||||||
    real candidate(3,100)
 | 
					    real candidate(3,200)
 | 
				
			||||||
    real dd(15*12000)
 | 
					    real dd(15*12000)
 | 
				
			||||||
    logical, intent(in) :: newdat, nagain
 | 
					    logical, intent(in) :: newdat, nagain
 | 
				
			||||||
    character*12 mycall, hiscall
 | 
					    character*12 mycall, hiscall
 | 
				
			||||||
@ -52,7 +52,6 @@ contains
 | 
				
			|||||||
    call timer('sync8   ',1)
 | 
					    call timer('sync8   ',1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    syncmin=2.0
 | 
					    syncmin=2.0
 | 
				
			||||||
!    rewind 51
 | 
					 | 
				
			||||||
    do icand=1,ncand
 | 
					    do icand=1,ncand
 | 
				
			||||||
       sync=candidate(3,icand)
 | 
					       sync=candidate(3,icand)
 | 
				
			||||||
       if(sync.lt.syncmin) cycle
 | 
					       if(sync.lt.syncmin) cycle
 | 
				
			||||||
@ -60,7 +59,8 @@ contains
 | 
				
			|||||||
       xdt=candidate(2,icand)
 | 
					       xdt=candidate(2,icand)
 | 
				
			||||||
       nsnr0=min(99,nint(10.0*log10(sync) - 25.5))    !### empirical ###
 | 
					       nsnr0=min(99,nint(10.0*log10(sync) - 25.5))    !### empirical ###
 | 
				
			||||||
       call timer('ft8b    ',0)
 | 
					       call timer('ft8b    ',0)
 | 
				
			||||||
       call ft8b(dd,newdat,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message,xsnr)
 | 
					       call ft8b(dd,newdat,nfqso,ndepth,icand,sync,f1,xdt,nharderrors,   &
 | 
				
			||||||
 | 
					            dmin,nbadcrc,message,xsnr)
 | 
				
			||||||
       nsnr=xsnr  
 | 
					       nsnr=xsnr  
 | 
				
			||||||
       xdt=xdt-0.6
 | 
					       xdt=xdt-0.6
 | 
				
			||||||
       call timer('ft8b    ',1)
 | 
					       call timer('ft8b    ',1)
 | 
				
			||||||
 | 
				
			|||||||
@ -1788,6 +1788,7 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
 | 
				
			|||||||
    case Qt::Key_Minus:
 | 
					    case Qt::Key_Minus:
 | 
				
			||||||
      if(e->modifiers() & Qt::ControlModifier) {
 | 
					      if(e->modifiers() & Qt::ControlModifier) {
 | 
				
			||||||
        int f=ui->TxFreqSpinBox->value()/50;
 | 
					        int f=ui->TxFreqSpinBox->value()/50;
 | 
				
			||||||
 | 
					        if((ui->TxFreqSpinBox->value() % 50) == 0) f=f-1;
 | 
				
			||||||
        ui->TxFreqSpinBox->setValue(50*f);
 | 
					        ui->TxFreqSpinBox->setValue(50*f);
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user