diff --git a/lib/decoder.f90 b/lib/decoder.f90 index 582865a4e..e2c762f52 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -61,6 +61,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample) type(counting_fst4_decoder) :: my_fst4 type(counting_q65_decoder) :: my_q65 + nused=0 rms=sqrt(dot_product(float(id2(1:180000)), & float(id2(1:180000)))/180000.0) if(rms.lt.3.0) go to 800 @@ -205,8 +206,9 @@ subroutine multimode_decoder(ss,id2,params,nfsample) call timer('dec_q65 ',0) call my_q65%decode(q65_decoded,id2,params%nutc,params%ntr, & params%nsubmode,params%nfqso,params%ntol,params%ndepth, & - logical(params%nclearave),params%emedelay,mycall,hiscall, & - hisgrid,params%nQSOProgress,ncontest,logical(params%lapcqonly)) + params%nfa,params%nfb,logical(params%nclearave), & + params%emedelay,mycall,hiscall,hisgrid,params%nQSOProgress, & + ncontest,logical(params%lapcqonly),navg0) call timer('dec_q65 ',1) go to 800 endif @@ -363,8 +365,8 @@ subroutine multimode_decoder(ss,id2,params,nfsample) endif if(params%nmode.ne.8 .or. params%nzhsym.eq.50 .or. & .not.params%ndiskdat) then - write(*,1010) nsynced,ndecoded -1010 format('',2i4) + write(*,1010) nsynced,ndecoded,navg0 +1010 format('',3i4) call flush(6) endif close(13) diff --git a/lib/q65_decode.f90 b/lib/q65_decode.f90 index c0d842690..0ac662ace 100644 --- a/lib/q65_decode.f90 +++ b/lib/q65_decode.f90 @@ -27,8 +27,8 @@ module q65_decode contains subroutine decode(this,callback,iwave,nutc,ntrperiod,nsubmode,nfqso, & - ntol,ndepth,lclearave,emedelay,mycall,hiscall,hisgrid,nQSOprogress, & - ncontest,lapcqonly) + ntol,ndepth,nfa0,nfb0,lclearave,emedelay,mycall,hiscall,hisgrid, & + nQSOprogress,ncontest,lapcqonly,navg0) ! Top-level routine that organizes the decoding of Q65 signals ! Input: iwave Raw data, i*2 @@ -67,6 +67,8 @@ contains complex, allocatable :: c0(:) !Analytic signal, 6000 Sa/s ! Start by setting some parameters and allocating storage for large arrays + nfa=nfa0 + nfb=nfb0 idec=-1 mode_q65=2**nsubmode npts=ntrperiod*12000 @@ -212,8 +214,9 @@ contains if(nsnr.lt.-35) nsnr=-35 idec=-1 call this%callback(nutc,snr1,nsnr,xdt1,f1,decoded, & - idec,navg,ntrperiod) + idec,0,ntrperiod) endif + navg0=navg return end subroutine decode diff --git a/lib/qra/q65/q65.f90 b/lib/qra/q65/q65.f90 index 3383db63e..0da0c336a 100644 --- a/lib/qra/q65/q65.f90 +++ b/lib/qra/q65/q65.f90 @@ -10,7 +10,7 @@ module q65 integer,dimension(22) :: isync = (/1,9,12,13,15,22,23,26,27,33,35, & 38,46,50,55,60,62,66,69,74,76,85/) integer codewords(63,206) - integer navg,ibwa,ibwb,ncw,nsps,mode_q65 + integer navg,ibwa,ibwb,ncw,nsps,mode_q65,nfa,nfb integer istep,nsmo,lag1,lag2,npasses,nused integer i0,j0 real,allocatable,save :: s1a(:,:) !Cumulative symbol spectra @@ -198,8 +198,10 @@ subroutine q65_dec0(iavg,nutc,iwave,ntrperiod,nfqso,ntol,ndepth,lclearave, & ! Write data for the red and orange sync curves. do i=-ia2,ia2 freq=nfqso + i*df - write(17,1100) freq,ccf1(i),xdt,ccf2(i) -1100 format(4f10.3) + if(freq.ge.float(nfa) .and. freq.le.float(nfb)) then + write(17,1100) freq,ccf1(i),xdt,ccf2(i) +1100 format(4f10.3) + endif enddo close(17) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index fb2d6784c..a087a2ef5 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3373,12 +3373,18 @@ void MainWindow::readFromStdout() //readFromStdout if(line_read.indexOf("") >= 0) { m_bDecoded = line_read.mid(20).trimmed().toInt() > 0; - if(m_nDecodes==0) ndecodes_label.setText("0"); + int n=line_read.trimmed().size(); + int navg=line_read.trimmed().mid(n-2).toInt(); + if(m_mode=="Q65") { + ndecodes_label.setText(QString::number(navg)); + } else { + if(m_nDecodes==0) ndecodes_label.setText("0"); + } decodeDone (); return; } else { m_nDecodes+=1; - ndecodes_label.setText(QString::number(m_nDecodes)); + if(m_mode!="Q65") ndecodes_label.setText(QString::number(m_nDecodes)); if(m_mode=="JT4" or m_mode=="JT65" or m_mode=="Q65") { //### Do something about Q65 here ? ### int nf=line_read.indexOf("f");