diff --git a/commons.h b/commons.h index fea9ed4ef..4b8d7672d 100644 --- a/commons.h +++ b/commons.h @@ -38,6 +38,8 @@ extern struct dec_data { int nsubmode; bool nagain; int ndepth; + bool lapon; + int napwid; int ntxmode; int nmode; int minw; diff --git a/lib/decoder.f90 b/lib/decoder.f90 index a9dd619c6..e2692d459 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -73,7 +73,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample) call my_ft8%decode(ft8_decoded,id2,params%nfqso, & newdat,params%nutc,params%nfa, & params%nfb,logical(params%nagain), & - params%ndepth,params%nsubmode, & + params%ndepth,logical(params%lapon),params%napwid,params%nsubmode, & params%mycall,params%hiscall,params%hisgrid) call timer('decft8 ',1) go to 800 diff --git a/lib/fsk4hf/ft8b.f90 b/lib/fsk4hf/ft8b.f90 index ea9ba0b82..b754a5372 100644 --- a/lib/fsk4hf/ft8b.f90 +++ b/lib/fsk4hf/ft8b.f90 @@ -1,5 +1,5 @@ -subroutine ft8b(dd0,newdat,nfqso,ndepth,lsubtract,iaptype,icand,sync0,f1,xdt, & - apsym,nharderrors,dmin,nbadcrc,iap,ipass,iera,message,xsnr) +subroutine ft8b(dd0,newdat,nfqso,ndepth,lapon,napwid,lsubtract,iaptype,icand, & + sync0,f1,xdt,apsym,nharderrors,dmin,nbadcrc,iap,ipass,iera,message,xsnr) use timer_module, only: timer include 'ft8_params.f90' @@ -19,11 +19,11 @@ subroutine ft8b(dd0,newdat,nfqso,ndepth,lsubtract,iaptype,icand,sync0,f1,xdt, complex cd0(3200) complex ctwk(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 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 - norder=2 nharderrors=-1 fs2=12000.0/NDOWN 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) llra=2.0*rxdatap/(ss*ss) ! llr's for use with ap apmag=4.0 +! If DxCall exists, only do "MyCall DxCall ???" for candidates within nfqso +/- napwid 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 ### nera=1 @@ -235,12 +237,8 @@ subroutine ft8b(dd0,newdat,nfqso,ndepth,lsubtract,iaptype,icand,sync0,f1,xdt, call timer('bpd174 ',1) dmin=0.0 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 - endif + norder=1 + if(abs(nfqso-f1).le.napwid) norder=2 !Decode using norder=2 within napwid of nfqso. call timer('osd174 ',0) call osd174(llrap,apmask,norder,decoded,cw,nharderrors,dmin) call timer('osd174 ',1) diff --git a/lib/ft8_decode.f90 b/lib/ft8_decode.f90 index 0705824ba..dc8b0f95a 100644 --- a/lib/ft8_decode.f90 +++ b/lib/ft8_decode.f90 @@ -24,7 +24,7 @@ module ft8_decode contains 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 timer_module, only: timer include 'fsk4hf/ft8_params.f90' @@ -35,7 +35,7 @@ contains real s(NH1,NHSYM) real candidate(3,200) real dd(15*12000) - logical, intent(in) :: nagain + logical, intent(in) :: nagain,lapon logical newdat,lsubtract,ldupe character*12 mycall12, hiscall12 character*6 hisgrid6 @@ -83,7 +83,7 @@ contains xdt=candidate(2,icand) nsnr0=min(99,nint(10.0*log10(sync) - 25.5)) !### empirical ### 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) nsnr=nint(xsnr) xdt=xdt-0.5 diff --git a/lib/jt9.f90 b/lib/jt9.f90 index 40d68619a..469a07a1e 100644 --- a/lib/jt9.f90 +++ b/lib/jt9.f90 @@ -262,6 +262,8 @@ program jt9 shared_data%params%kin=64800 shared_data%params%nzhsym=181 shared_data%params%ndepth=ndepth + shared_data%params%lapon=.true. + shared_data%params%napwid=75 shared_data%params%dttol=3. ! shared_data%params%minsync=0 !### TEST ONLY diff --git a/lib/jt9com.f90 b/lib/jt9com.f90 index 94ea719b0..23ec1e643 100644 --- a/lib/jt9com.f90 +++ b/lib/jt9com.f90 @@ -21,6 +21,8 @@ integer(c_int) :: nsubmode logical(c_bool) :: nagain integer(c_int) :: ndepth + logical(c_bool) :: lapon + integer(c_int) :: napwid integer(c_int) :: ntxmode integer(c_int) :: nmode integer(c_int) :: minw diff --git a/mainwindow.cpp b/mainwindow.cpp index 72a01aa74..f7f50b933 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2468,6 +2468,8 @@ void MainWindow::decode() //decode() dec_data.params.ntxmode=4; } 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.nsubmode=m_nSubMode; if(m_mode=="QRA64") dec_data.params.nsubmode=100 + m_nSubMode;