mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-31 04:50:34 -04:00 
			
		
		
		
	Optimize calling the QMAP decoder for different sub-sequence tasks.
This commit is contained in:
		
							parent
							
								
									7276e86e60
								
							
						
					
					
						commit
						fd0336f234
					
				| @ -6,7 +6,7 @@ set (libq65_FSRCS | |||||||
|   astro0.f90 |   astro0.f90 | ||||||
|   astrosub.f90 |   astrosub.f90 | ||||||
|   cfom.f90 |   cfom.f90 | ||||||
| #  chkstat.f90 |   chkstat.f90 | ||||||
|   dcoord.f90 |   dcoord.f90 | ||||||
|   decode0.f90 |   decode0.f90 | ||||||
|   dot.f90 |   dot.f90 | ||||||
|  | |||||||
| @ -1,23 +1,22 @@ | |||||||
| subroutine chkstat(dd,ihsym,bSkip) | subroutine chkstat(dd,nhsym,dbdiff) | ||||||
| 
 | 
 | ||||||
|   real dd(2,5760000) |   real dd(2,5760000) | ||||||
|   real power(60) |  | ||||||
|   logical*1 bSkip |  | ||||||
| 
 | 
 | ||||||
|  |   sq0=0. | ||||||
|  |   sq1=0. | ||||||
|   k=0 |   k=0 | ||||||
|   do i=1,60 |   do i=1,60 | ||||||
|      sq=0. |      sq=0. | ||||||
|      do j=1,96000 |      do j=1,96000 | ||||||
|         k=k+1 |         k=k+1 | ||||||
|         sq=sq + dd(1,k)*dd(1,k) + dd(2,k)*dd(2,k) |         sq=sq + dd(1,k)*dd(1,k) + dd(2,k)*dd(2,k) | ||||||
|      enddo |      enddo  | ||||||
|      power(i)=sq/(2.0*96000.0) |      if(i.ge.12 .and. i.le.24) sq0=sq0+sq | ||||||
|  |      if(i.ge.42 .and. i.le.54) sq1=sq1+sq | ||||||
|   enddo |   enddo | ||||||
|   bSkip=.false. |   db0=db(1.0+sq0) | ||||||
|   n1=count(power(1:30).lt.15.0) |   db1=db(1.0+sq1) | ||||||
|   n2=count(power(31:60).lt.15.0) |   dbdiff=db0-db1 | ||||||
|   if(ihsym.le.200 .and. n1.gt.15) bSkip=.true. |    | ||||||
|   if(ihsym.gt.200 .and. n2.gt.15) bSkip=.true. |  | ||||||
| 
 |  | ||||||
|   return |   return | ||||||
| end subroutine chkstat | end subroutine chkstat | ||||||
|  | |||||||
| @ -43,9 +43,9 @@ subroutine decode0(dd,ss,savg) | |||||||
|   hisgrid0=hisgrid |   hisgrid0=hisgrid | ||||||
| 
 | 
 | ||||||
|   call timer('qmapa   ',0) |   call timer('qmapa   ',0) | ||||||
|   call qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb,           & |   call qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb,                  & | ||||||
|        mousedf,mousefqso,nagain,nfshift,max_drift,offset,           & |        mousedf,mousefqso,nagain,ntx30a,ntx30b,nfshift,max_drift,offset,    & | ||||||
|        nfcal,mycall,hiscall,hisgrid,nfsample,nmode,ndepth,          & |        nfcal,mycall,hiscall,hisgrid,nfsample,nmode,ndepth,                 & | ||||||
|        datetime,ndop00,fselected,bAlso30,nhsym,NCFOM) |        datetime,ndop00,fselected,bAlso30,nhsym,NCFOM) | ||||||
|   call timer('qmapa   ',1) |   call timer('qmapa   ',1) | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| subroutine getcand2(ss,savg0,nts_q65,nagain,nhsym,ntol,f0_selected,    & | subroutine getcand2(ss,savg0,nts_q65,nagain,nhsym,ntx30a,ntx30b,     & | ||||||
|      bAlso30,cand,ncand) |      ntol,f0_selected,bAlso30,cand,ncand) | ||||||
| 
 | 
 | ||||||
| ! Get candidates for Q65 decodes, based on presence of sync tone. | ! Get candidates for Q65 decodes, based on presence of sync tone. | ||||||
|    |    | ||||||
| @ -74,7 +74,7 @@ subroutine getcand2(ss,savg0,nts_q65,nagain,nhsym,ntol,f0_selected,    & | |||||||
|      if(.not.bAlso30) cycle |      if(.not.bAlso30) cycle | ||||||
|      ntrperiod=30 |      ntrperiod=30 | ||||||
|       |       | ||||||
|      if(nhsym.le.200) then |      if(nhsym.le.200 .and. ntx30a.le.5) then | ||||||
|         call q65_sync(ss,i0,nts_q65,ntrperiod,iseq,sync_ok,snr_sync,xdt) |         call q65_sync(ss,i0,nts_q65,ntrperiod,iseq,sync_ok,snr_sync,xdt) | ||||||
|         if(sync_ok) then |         if(sync_ok) then | ||||||
| ! Sync tone is present, we have a candidate for decoding | ! Sync tone is present, we have a candidate for decoding | ||||||
| @ -92,7 +92,7 @@ subroutine getcand2(ss,savg0,nts_q65,nagain,nhsym,ntol,f0_selected,    & | |||||||
|      endif |      endif | ||||||
| 
 | 
 | ||||||
|      iseq=1 |      iseq=1 | ||||||
|      if(nhsym.ge.330) then |      if(nhsym.ge.330 .and. ntx30b.le.5) then | ||||||
|         call q65_sync(ss,i0,nts_q65,ntrperiod,iseq,sync_ok,snr_sync,xdt) |         call q65_sync(ss,i0,nts_q65,ntrperiod,iseq,sync_ok,snr_sync,xdt) | ||||||
|         if(sync_ok) then |         if(sync_ok) then | ||||||
| ! Sync tone is present, we have a candidate for decoding | ! Sync tone is present, we have a candidate for decoding | ||||||
|  | |||||||
| @ -12,7 +12,7 @@ subroutine q65c(itimer) | |||||||
|   real*8 fcenter |   real*8 fcenter | ||||||
|   integer nparams0(NJUNK+3),nparams(NJUNK+3) |   integer nparams0(NJUNK+3),nparams(NJUNK+3) | ||||||
|   logical first |   logical first | ||||||
|   logical*1 bAlso30,bSkip |   logical*1 bAlso30 | ||||||
|   character*12 mycall,hiscall |   character*12 mycall,hiscall | ||||||
|   character*6 mygrid,hisgrid |   character*6 mygrid,hisgrid | ||||||
|   character*20 datetime |   character*20 datetime | ||||||
| @ -41,21 +41,28 @@ subroutine q65c(itimer) | |||||||
|   npatience=1 |   npatience=1 | ||||||
|   newdat=1                          !Always on ?? |   newdat=1                          !Always on ?? | ||||||
| 
 | 
 | ||||||
|  |   call chkstat(dd,nhsym,dbdiff) | ||||||
|  | !  if(nhsym.eq.390) write(*,3001) nutc,nhsym,dbdiff | ||||||
|  | !3001 format(i4.4,i6,f7.1) | ||||||
|  | 
 | ||||||
|  |   if(dbdiff.gt.5.0) ntx30b=30 | ||||||
|  |   if(dbdiff.lt.-5.0) ntx30a=30 | ||||||
|  | 
 | ||||||
|   if(ntx30a.gt.5) then |   if(ntx30a.gt.5) then | ||||||
|      dd(1:2,1:30*96000)=0. |      dd(1:2,1:30*96000)=0. | ||||||
|      ss(1:200,1:NFFT)=0. |      ss(1:200,1:NFFT)=0. | ||||||
|  |      do i=1,NFFT | ||||||
|  |         savg(i)=sum(ss(201:400,i)) | ||||||
|  |      enddo | ||||||
|   endif |   endif | ||||||
|   if(ntx30b.gt.5) then |   if(ntx30b.gt.5) then | ||||||
|      dd(1:2,30*96000+1:60*96000)=0. |      dd(1:2,30*96000+1:60*96000)=0. | ||||||
|      ss(201:400,1:NFFT)=0. |      ss(201:400,1:NFFT)=0. | ||||||
|  |      do i=1,NFFT | ||||||
|  |         savg(i)=sum(ss(1:200,i)) | ||||||
|  |      enddo | ||||||
|   endif |   endif | ||||||
| 
 | 
 | ||||||
| !  call chkstat(dd,nhsym,bSkip) |  | ||||||
| !  if(bSkip .and. nagain.eq.0) then |  | ||||||
| !     print*,'A',nhsym,ntx30a,ntx30b,ntx60,junk1,junk2,bAlso30 |  | ||||||
| !     return |  | ||||||
| !  endif |  | ||||||
| 
 |  | ||||||
|   call timer('decode0 ',0) |   call timer('decode0 ',0) | ||||||
|   call decode0(dd,ss,savg) |   call decode0(dd,ss,savg) | ||||||
|   call timer('decode0 ',1) |   call timer('decode0 ',1) | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb,         & | subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb,         & | ||||||
|      mousedf,mousefqso,nagain,nfshift,max_drift,offset,nfcal,mycall,  & |      mousedf,mousefqso,nagain,ntx30a,ntx30b,nfshift,max_drift,offset, & | ||||||
|      hiscall,hisgrid,nfsample,nBaseSubmode,ndepth,datetime,ndop00,    & |      nfcal,mycall,hiscall,hisgrid,nfsample,nBaseSubmode,ndepth,       & | ||||||
|      fselected,bAlso30,nhsym,nCFOM) |      datetime,ndop00,fselected,bAlso30,nhsym,nCFOM) | ||||||
| 
 | 
 | ||||||
| !  Processes timf2 data received from Linrad to find and decode Q65 signals. | !  Processes timf2 data received from Linrad to find and decode Q65 signals. | ||||||
| 
 | 
 | ||||||
| @ -32,7 +32,7 @@ subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb,         & | |||||||
|   common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy,              & |   common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy,              & | ||||||
|        nWTransmitting,result(50) |        nWTransmitting,result(50) | ||||||
|   save |   save | ||||||
| 
 |    | ||||||
|   tsec0=sec_midn() |   tsec0=sec_midn() | ||||||
|   if(nagain.eq.1) ndepth=3            !Use full depth for click-to-decode |   if(nagain.eq.1) ndepth=3            !Use full depth for click-to-decode | ||||||
|   nkhz_center=nint(1000.0*(fcenter-int(fcenter))) |   nkhz_center=nint(1000.0*(fcenter-int(fcenter))) | ||||||
| @ -44,8 +44,8 @@ subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb,         & | |||||||
| 
 | 
 | ||||||
|   call timer('get_cand',0) |   call timer('get_cand',0) | ||||||
| ! Get a list of decoding candidates | ! Get a list of decoding candidates | ||||||
|   call getcand2(ss,savg,nts_q65,nagain,nhsym,ntol,f0_selected,bAlso30,  & |   call getcand2(ss,savg,nts_q65,nagain,nhsym,ntx30a,ntx30b,ntol,     & | ||||||
|        cand,ncand) |        f0_selected,bAlso30,cand,ncand) | ||||||
|   call timer('get_cand',1) |   call timer('get_cand',1) | ||||||
| 
 | 
 | ||||||
|   nwrite_q65=0 |   nwrite_q65=0 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user