Separate message averaging for Odd and Even sequences.

This commit is contained in:
Joe Taylor 2021-01-19 16:06:10 -05:00
parent 0cc67bbc59
commit 8a436b63dd
4 changed files with 20 additions and 14 deletions

View File

@ -367,8 +367,9 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
endif endif
if(params%nmode.ne.8 .or. params%nzhsym.eq.50 .or. & if(params%nmode.ne.8 .or. params%nzhsym.eq.50 .or. &
.not.params%ndiskdat) then .not.params%ndiskdat) then
write(*,1010) nsynced,ndecoded,navg0 write(*,1010) nsynced,ndecoded,navg0
1010 format('<DecodeFinished>',3i4) 1010 format('<DecodeFinished>',2i4,i9)
call flush(6) call flush(6)
endif endif
close(13) close(13)
@ -763,7 +764,7 @@ contains
end subroutine fst4_decoded end subroutine fst4_decoded
subroutine q65_decoded (this,nutc,snr1,nsnr,dt,freq,decoded,idec, & subroutine q65_decoded (this,nutc,snr1,nsnr,dt,freq,decoded,idec, &
navg,ntrperiod) nused,ntrperiod)
use q65_decode use q65_decode
implicit none implicit none
@ -776,7 +777,7 @@ contains
real, intent(in) :: freq real, intent(in) :: freq
character(len=37), intent(in) :: decoded character(len=37), intent(in) :: decoded
integer, intent(in) :: idec integer, intent(in) :: idec
integer, intent(in) :: navg integer, intent(in) :: nused
integer, intent(in) :: ntrperiod integer, intent(in) :: ntrperiod
character*3 cflags character*3 cflags
@ -784,7 +785,7 @@ contains
if(idec.ge.0) then if(idec.ge.0) then
cflags='q ' cflags='q '
write(cflags(2:2),'(i1)') idec write(cflags(2:2),'(i1)') idec
if(navg.ge.2) write(cflags(3:3),'(i1)') navg if(nused.ge.2) write(cflags(3:3),'(i1)') nused
endif endif
if(ntrperiod.lt.60) then if(ntrperiod.lt.60) then

View File

@ -180,7 +180,7 @@ contains
endif endif
enddo ! ipass enddo ! ipass
if(iand(ndepth,16).eq.0 .or. navg.lt.2) go to 100 if(iand(ndepth,16).eq.0 .or. navg(iseq).lt.2) go to 100
! There was no single-transmission decode. Try for an average 'q3n' decode. ! There was no single-transmission decode. Try for an average 'q3n' decode.
call timer('list_avg',0) call timer('list_avg',0)
! Call top-level routine in q65 module: establish sync and try for a q3 ! Call top-level routine in q65 module: establish sync and try for a q3
@ -192,7 +192,7 @@ contains
if(idec.ge.0) then if(idec.ge.0) then
dtdec=xdt !We have a list-decode result from averaged data dtdec=xdt !We have a list-decode result from averaged data
f0dec=f0 f0dec=f0
nused=navg nused=navg(iseq)
go to 100 go to 100
endif endif
@ -208,7 +208,7 @@ contains
if(idec.ge.0) then if(idec.ge.0) then
dtdec=xdt !We have a q[012]n result dtdec=xdt !We have a q[012]n result
f0dec=f0 f0dec=f0
nused=navg nused=navg(iseq)
endif endif
100 decoded=' ' 100 decoded=' '
@ -237,7 +237,7 @@ contains
call this%callback(nutc,snr1,nsnr,xdt,f0,decoded, & call this%callback(nutc,snr1,nsnr,xdt,f0,decoded, &
idec,0,ntrperiod) idec,0,ntrperiod)
endif endif
navg0=navg navg0=1000*navg(0) + navg(1)
return return
end subroutine decode end subroutine decode

View File

@ -10,9 +10,10 @@ module q65
integer,dimension(22) :: isync = (/1,9,12,13,15,22,23,26,27,33,35, & 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/) 38,46,50,55,60,62,66,69,74,76,85/)
integer codewords(63,206) integer codewords(63,206)
integer navg,ibwa,ibwb,ncw,nsps,mode_q65,nfa,nfb integer ibwa,ibwb,ncw,nsps,mode_q65,nfa,nfb
integer istep,nsmo,lag1,lag2,npasses,nused,iseq integer istep,nsmo,lag1,lag2,npasses,nused,iseq
integer i0,j0 integer i0,j0
integer navg(0:1)
real,allocatable,save :: s1a(:,:,:) !Cumulative symbol spectra real,allocatable,save :: s1a(:,:,:) !Cumulative symbol spectra
real sync(85) !sync vector real sync(85) !sync vector
real df,dtstep,dtdec,f0dec real df,dtstep,dtdec,f0dec
@ -222,8 +223,8 @@ subroutine q65_clravg
! Clear the averaging array to start a new average. ! Clear the averaging array to start a new average.
if(allocated(s1a)) s1a=0. if(allocated(s1a)) s1a(:,:,iseq)=0.
navg=0 navg(iseq)=0
return return
end subroutine q65_clravg end subroutine q65_clravg
@ -260,7 +261,7 @@ subroutine q65_symspec(iwave,nmax,iz,jz,s1)
enddo enddo
enddo enddo
s1a(:,:,iseq)=s1a(:,:,iseq) + s1 s1a(:,:,iseq)=s1a(:,:,iseq) + s1
navg=navg+1 navg(iseq)=navg(iseq) + 1
return return
end subroutine q65_symspec end subroutine q65_symspec

View File

@ -3374,9 +3374,13 @@ void MainWindow::readFromStdout() //readFromStdout
if(line_read.indexOf("<DecodeFinished>") >= 0) { if(line_read.indexOf("<DecodeFinished>") >= 0) {
m_bDecoded = line_read.mid(20).trimmed().toInt() > 0; m_bDecoded = line_read.mid(20).trimmed().toInt() > 0;
int n=line_read.trimmed().size(); int n=line_read.trimmed().size();
int navg=line_read.trimmed().mid(n-2).toInt(); int n2=line_read.trimmed().mid(n-7).toInt();
int n0=n2/1000;
int n1=n2%1000;
if(m_mode=="Q65") { if(m_mode=="Q65") {
ndecodes_label.setText(QString::number(navg)); QString t;
t.sprintf("%d %d",n0,n1);
ndecodes_label.setText(t);
} else { } else {
if(m_nDecodes==0) ndecodes_label.setText("0"); if(m_nDecodes==0) ndecodes_label.setText("0");
} }