mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-31 04:50:34 -04:00 
			
		
		
		
	Add variables lapon and napwid to control ap decoding. Reconfigure the logic for AP decoding and ordered-statistics decoding.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7933 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									d4c6a4e823
								
							
						
					
					
						commit
						bbbcae9233
					
				| @ -38,6 +38,8 @@ extern struct dec_data { | |||||||
|     int nsubmode; |     int nsubmode; | ||||||
|     bool nagain; |     bool nagain; | ||||||
|     int ndepth; |     int ndepth; | ||||||
|  |     bool lapon; | ||||||
|  |     int napwid; | ||||||
|     int ntxmode; |     int ntxmode; | ||||||
|     int nmode; |     int nmode; | ||||||
|     int minw; |     int minw; | ||||||
|  | |||||||
| @ -73,7 +73,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample) | |||||||
|      call my_ft8%decode(ft8_decoded,id2,params%nfqso,                   & |      call my_ft8%decode(ft8_decoded,id2,params%nfqso,                   & | ||||||
|           newdat,params%nutc,params%nfa,      & |           newdat,params%nutc,params%nfa,      & | ||||||
|           params%nfb,logical(params%nagain),     & |           params%nfb,logical(params%nagain),     & | ||||||
|           params%ndepth,params%nsubmode,      & |           params%ndepth,logical(params%lapon),params%napwid,params%nsubmode,      & | ||||||
|           params%mycall,params%hiscall,params%hisgrid) |           params%mycall,params%hiscall,params%hisgrid) | ||||||
|      call timer('decft8  ',1) |      call timer('decft8  ',1) | ||||||
|      go to 800 |      go to 800 | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| subroutine ft8b(dd0,newdat,nfqso,ndepth,lsubtract,iaptype,icand,sync0,f1,xdt,   & | subroutine ft8b(dd0,newdat,nfqso,ndepth,lapon,napwid,lsubtract,iaptype,icand, & | ||||||
|      apsym,nharderrors,dmin,nbadcrc,iap,ipass,iera,message,xsnr) |      sync0,f1,xdt,apsym,nharderrors,dmin,nbadcrc,iap,ipass,iera,message,xsnr)   | ||||||
| 
 | 
 | ||||||
|   use timer_module, only: timer |   use timer_module, only: timer | ||||||
|   include 'ft8_params.f90' |   include 'ft8_params.f90' | ||||||
| @ -19,11 +19,11 @@ subroutine ft8b(dd0,newdat,nfqso,ndepth,lsubtract,iaptype,icand,sync0,f1,xdt, | |||||||
|   complex cd0(3200) |   complex cd0(3200) | ||||||
|   complex ctwk(32) |   complex ctwk(32) | ||||||
|   complex csymb(32) |   complex csymb(32) | ||||||
|   logical newdat,lsubtract |   logical newdat,lsubtract,lapon | ||||||
|   data rr73/-1,1,1,1,1,1,1,-1,1,1,-1/ |   data rr73/-1,1,1,1,1,1,1,-1,1,1,-1/ | ||||||
|   data cq/1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1/ |   data cq/1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1/ | ||||||
|  | 
 | ||||||
|   max_iterations=30 |   max_iterations=30 | ||||||
|   norder=2 |  | ||||||
|   nharderrors=-1 |   nharderrors=-1 | ||||||
|   fs2=12000.0/NDOWN |   fs2=12000.0/NDOWN | ||||||
|   dt2=1.0/fs2 |   dt2=1.0/fs2 | ||||||
| @ -153,8 +153,10 @@ subroutine ft8b(dd0,newdat,nfqso,ndepth,lsubtract,iaptype,icand,sync0,f1,xdt, | |||||||
|   llr0=2.0*rxdata/(ss*ss) |   llr0=2.0*rxdata/(ss*ss) | ||||||
|   llra=2.0*rxdatap/(ss*ss)  ! llr's for use with ap |   llra=2.0*rxdatap/(ss*ss)  ! llr's for use with ap | ||||||
|   apmag=4.0 |   apmag=4.0 | ||||||
|  | ! If DxCall exists, only do "MyCall DxCall ???" for candidates within nfqso +/- napwid | ||||||
|   nap=0 |   nap=0 | ||||||
|   if(ndepth.eq.3) nap=2   |   if(lapon.and.(ndepth.eq.3).and.(iaptype.eq.1 .or. (iaptype.eq.2.and.abs(nfqso-f1).le.napwid))) nap=2   | ||||||
|  |   if(lapon.and.(ndepth.eq.3).and.iaptype.eq.2.and.abs(nfqso-f1).gt.napwid) nap=1  | ||||||
| 
 | 
 | ||||||
|   do iap=0,nap                            !### Temporary ### |   do iap=0,nap                            !### Temporary ### | ||||||
|      nera=1 |      nera=1 | ||||||
| @ -235,12 +237,8 @@ subroutine ft8b(dd0,newdat,nfqso,ndepth,lsubtract,iaptype,icand,sync0,f1,xdt, | |||||||
|         call timer('bpd174  ',1) |         call timer('bpd174  ',1) | ||||||
|         dmin=0.0 |         dmin=0.0 | ||||||
|         if(ndepth.eq.3 .and. nharderrors.lt.0) then |         if(ndepth.eq.3 .and. nharderrors.lt.0) then | ||||||
|            if(iaptype.eq.1) norder=2 |  | ||||||
|            if(iaptype.eq.2 .and. abs(nfqso-f1).lt.10.0) then |  | ||||||
|              norder=3 |  | ||||||
|            else |  | ||||||
|            norder=1 |            norder=1 | ||||||
|            endif |            if(abs(nfqso-f1).le.napwid) norder=2   !Decode using norder=2 within napwid of nfqso.  | ||||||
|            call timer('osd174  ',0) |            call timer('osd174  ',0) | ||||||
|            call osd174(llrap,apmask,norder,decoded,cw,nharderrors,dmin) |            call osd174(llrap,apmask,norder,decoded,cw,nharderrors,dmin) | ||||||
|            call timer('osd174  ',1) |            call timer('osd174  ',1) | ||||||
|  | |||||||
| @ -24,7 +24,7 @@ module ft8_decode | |||||||
| contains | contains | ||||||
| 
 | 
 | ||||||
|   subroutine decode(this,callback,iwave,nfqso,newdat,nutc,nfa,    & |   subroutine decode(this,callback,iwave,nfqso,newdat,nutc,nfa,    & | ||||||
|        nfb,nagain,ndepth,nsubmode,mycall12,hiscall12,hisgrid6) |        nfb,nagain,ndepth,lapon,napwid,nsubmode,mycall12,hiscall12,hisgrid6) | ||||||
| !    use wavhdr | !    use wavhdr | ||||||
|     use timer_module, only: timer |     use timer_module, only: timer | ||||||
|     include 'fsk4hf/ft8_params.f90' |     include 'fsk4hf/ft8_params.f90' | ||||||
| @ -35,7 +35,7 @@ contains | |||||||
|     real s(NH1,NHSYM) |     real s(NH1,NHSYM) | ||||||
|     real candidate(3,200) |     real candidate(3,200) | ||||||
|     real dd(15*12000) |     real dd(15*12000) | ||||||
|     logical, intent(in) :: nagain |     logical, intent(in) :: nagain,lapon | ||||||
|     logical newdat,lsubtract,ldupe |     logical newdat,lsubtract,ldupe | ||||||
|     character*12 mycall12, hiscall12 |     character*12 mycall12, hiscall12 | ||||||
|     character*6 hisgrid6 |     character*6 hisgrid6 | ||||||
| @ -83,7 +83,7 @@ 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,ndepth,lsubtract,iaptype,icand,sync,f1,   & |         call ft8b(dd,newdat,nfqso,ndepth,lapon,napwid,lsubtract,iaptype,icand,sync,f1,   & | ||||||
|              xdt,apsym,nharderrors,dmin,nbadcrc,iap,ipass,iera,message,xsnr) |              xdt,apsym,nharderrors,dmin,nbadcrc,iap,ipass,iera,message,xsnr) | ||||||
|         nsnr=nint(xsnr)  |         nsnr=nint(xsnr)  | ||||||
|         xdt=xdt-0.5 |         xdt=xdt-0.5 | ||||||
|  | |||||||
| @ -262,6 +262,8 @@ program jt9 | |||||||
|      shared_data%params%kin=64800 |      shared_data%params%kin=64800 | ||||||
|      shared_data%params%nzhsym=181 |      shared_data%params%nzhsym=181 | ||||||
|      shared_data%params%ndepth=ndepth |      shared_data%params%ndepth=ndepth | ||||||
|  |      shared_data%params%lapon=.true. | ||||||
|  |      shared_data%params%napwid=75 | ||||||
|      shared_data%params%dttol=3. |      shared_data%params%dttol=3. | ||||||
| 
 | 
 | ||||||
| !     shared_data%params%minsync=0       !### TEST ONLY | !     shared_data%params%minsync=0       !### TEST ONLY | ||||||
|  | |||||||
| @ -21,6 +21,8 @@ | |||||||
|      integer(c_int) :: nsubmode |      integer(c_int) :: nsubmode | ||||||
|      logical(c_bool) :: nagain |      logical(c_bool) :: nagain | ||||||
|      integer(c_int) :: ndepth |      integer(c_int) :: ndepth | ||||||
|  |      logical(c_bool) :: lapon  | ||||||
|  |      integer(c_int) :: napwid | ||||||
|      integer(c_int) :: ntxmode |      integer(c_int) :: ntxmode | ||||||
|      integer(c_int) :: nmode |      integer(c_int) :: nmode | ||||||
|      integer(c_int) :: minw |      integer(c_int) :: minw | ||||||
|  | |||||||
| @ -2468,6 +2468,8 @@ void MainWindow::decode()                                       //decode() | |||||||
|     dec_data.params.ntxmode=4; |     dec_data.params.ntxmode=4; | ||||||
|   } |   } | ||||||
|   if(m_mode=="FT8") dec_data.params.nmode=8; |   if(m_mode=="FT8") dec_data.params.nmode=8; | ||||||
|  |   if(m_mode=="FT8") dec_data.params.lapon=true; | ||||||
|  |   if(m_mode=="FT8") dec_data.params.napwid=50; | ||||||
|   dec_data.params.ntrperiod=m_TRperiod; |   dec_data.params.ntrperiod=m_TRperiod; | ||||||
|   dec_data.params.nsubmode=m_nSubMode; |   dec_data.params.nsubmode=m_nSubMode; | ||||||
|   if(m_mode=="QRA64") dec_data.params.nsubmode=100 + m_nSubMode; |   if(m_mode=="QRA64") dec_data.params.nsubmode=100 + m_nSubMode; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user