From 6b351165f2f0e5f6d41babbf12b7feffcb9918c2 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 1 Jan 2021 10:47:22 -0500 Subject: [PATCH] Re-introduce Q65 timer calls. Extend red sync baseline to minimum +/- 100 Hz. --- lib/qra/q65/q65_avg.f90 | 5 +++++ lib/qra/q65/q65_loops.f90 | 2 ++ lib/qra/q65/q65_sync.f90 | 5 ++++- widgets/mainwindow.cpp | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/qra/q65/q65_avg.f90 b/lib/qra/q65/q65_avg.f90 index 1c2ee8702..85fda7fc7 100644 --- a/lib/qra/q65/q65_avg.f90 +++ b/lib/qra/q65/q65_avg.f90 @@ -5,6 +5,7 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3) use q65 use packjt77 + use timer_module, only: timer character*78 c78 character*37 avemsg character*1 cused(MAXAVE) @@ -123,7 +124,9 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3) do ibw=ibwa,ibwb b90=1.72**ibw b90ts=b90/baud + call timer('dec1avg ',0) call q65_dec1(s3avg,nsubmode,b90ts,codewords,ncw,esnodb,irc,dat4,avemsg) + call timer('dec1avg ',1) if(irc.ge.0) then snr2=esnodb - 0.5*db(2500.0/baud) + 3.0 !Empirical adjustment snr2=snr2 - db(float(navg)) !Is this right? @@ -166,7 +169,9 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3) do ibw=ibwa,ibwb b90=1.72**ibw b90ts=b90/baud + call timer('dec2avg ',0) call q65_dec2(s3avg,nsubmode,b90ts,esnodb,irc,dat4,avemsg) + call timer('dec2avg ',1) if(irc.ge.0) then snr2=esnodb - db(2500.0/baud) + 3.0 !Empirical adjustment snr2=snr2 - 0.5*db(float(navg)) !Is this right? diff --git a/lib/qra/q65/q65_loops.f90 b/lib/qra/q65/q65_loops.f90 index ef5504040..b3c4eece8 100644 --- a/lib/qra/q65/q65_loops.f90 +++ b/lib/qra/q65/q65_loops.f90 @@ -74,7 +74,9 @@ subroutine q65_loops(c00,npts2,nsps,mode_q65,nsubmode,ndepth,jpk0, & b90=1.72**ibw if(b90.gt.345.0) cycle b90ts = b90/baud + call timer('dec2 ',0) call q65_dec2(s3,nsubmode,b90ts,esnodb,irc,dat4,decoded) + call timer('dec2 ',1) ! irc > 0 ==> number of iterations required to decode ! -1 = invalid params ! -2 = decode failed diff --git a/lib/qra/q65/q65_sync.f90 b/lib/qra/q65/q65_sync.f90 index 4ea4e5e15..75e055ea9 100644 --- a/lib/qra/q65/q65_sync.f90 +++ b/lib/qra/q65/q65_sync.f90 @@ -14,6 +14,7 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps, & ! snr1 Relative SNR of sync signal use packjt77 + use timer_module, only: timer parameter (NSTEP=8) !Step size nsps/NSTEP parameter (LN=2176*63) !LN=LL*NN; LL=64*(mode_q65+2), NN=63 parameter (PLOG_MIN=-240.0) !List decoding threshold @@ -47,7 +48,7 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps, & jz=(txt+1.0)*12000.0/istep !Number of quarter-symbol steps if(nsps.ge.6912) jz=(txt+2.0)*12000.0/istep !For TR 60 s and higher ia=ntol/df - ia2=max(ia,10*mode_q65) + ia2=max(ia,10*mode_q65,nint(100.0/df)) nsmo=int(0.7*mode_q65*mode_q65) if(nsmo.lt.1) nsmo=1 @@ -179,7 +180,9 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps, & do ibw=ibwa,ibwb b90=1.72**ibw b90ts=b90/baud + call timer('dec1 ',0) call q65_dec1(s3,nsubmode,b90ts,codewords,ncw,esnodb,irc,dat4,decoded) + call timer('dec1 ',1) if(irc.ge.0) then snr2=esnodb - db(2500.0/baud) + 3.0 !Empirical adjustment idec=1 diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index bbdbf50d0..ad8837b57 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -7508,7 +7508,7 @@ void MainWindow::on_sbFtol_valueChanged(int value) void::MainWindow::VHF_features_enabled(bool b) { if(m_mode!="JT4" and m_mode!="JT65" and m_mode!="Q65") b=false; - if(b and (ui->actionInclude_averaging->isChecked() or + if(b and m_mode!="Q65" and (ui->actionInclude_averaging->isChecked() or ui->actionInclude_correlation->isChecked())) { ui->actionDeepestDecode->setChecked (true); }