Save nrc (number of q[0124] iterations) to q65_decodes.dat.

This commit is contained in:
Joe Taylor 2021-02-08 09:24:16 -05:00
parent 25a5b780c4
commit 3ccf949691
3 changed files with 16 additions and 9 deletions

View File

@ -79,7 +79,7 @@ contains
idec=-1 idec=-1
idf=0 idf=0
idt=0 idt=0
irc=0 nrc=-2
mode_q65=2**nsubmode mode_q65=2**nsubmode
npts=ntrperiod*12000 npts=ntrperiod*12000
nfft1=ntrperiod*12000 nfft1=ntrperiod*12000
@ -172,7 +172,6 @@ contains
call timer('q65loops',0) call timer('q65loops',0)
call q65_loops(c00,npts/2,nsps/2,nsubmode,ndepth,jpk0, & call q65_loops(c00,npts/2,nsps/2,nsubmode,ndepth,jpk0, &
xdt,f0,iaptype,xdt1,f1,snr2,dat4,idec) xdt,f0,iaptype,xdt1,f1,snr2,dat4,idec)
! idec=-1 !### TEMPORARY ###
call timer('q65loops',1) call timer('q65loops',1)
if(idec.ge.0) then if(idec.ge.0) then
dtdec=xdt1 dtdec=xdt1
@ -241,12 +240,13 @@ contains
if(c6.eq.' ') c6='<b> ' if(c6.eq.' ') c6='<b> '
c4=hisgrid(1:4) c4=hisgrid(1:4)
if(c4.eq.' ') c4='<b> ' if(c4.eq.' ') c4='<b> '
fmt='(i6.4,1x,a4,5i2,3i3,f6.2,f7.1,f7.2,f6.1,f6.2,'// & fmt='(i6.4,1x,a4,5i2,4i3,f6.2,f7.1,f7.2,f6.1,f6.2,'// &
'1x,a6,1x,a6,1x,a4,1x,a)' '1x,a6,1x,a6,1x,a4,1x,a)'
if(ntrperiod.le.30) fmt(5:5)='6' if(ntrperiod.le.30) fmt(5:5)='6'
if(idec.eq.3) nrc=0
write(22,fmt) nutc,cmode,nQSOprogress,idec,idf,idt,ibw,nused, & write(22,fmt) nutc,cmode,nQSOprogress,idec,idf,idt,ibw,nused, &
icand,ncand,xdt,f0,snr1,snr2,tdecode,mycall(1:6),c6,c4, & icand,ncand,nrc,xdt,f0,db(snr1),snr2,tdecode,mycall(1:6), &
trim(decoded) c6,c4,trim(decoded)
close(22) close(22)
endif endif
else else
@ -321,12 +321,13 @@ contains
if(c6.eq.' ') c6='<b> ' if(c6.eq.' ') c6='<b> '
c4=hisgrid(1:4) c4=hisgrid(1:4)
if(c4.eq.' ') c4='<b> ' if(c4.eq.' ') c4='<b> '
fmt='(i6.4,1x,a4,5i2,3i3,f6.2,f7.1,f7.2,f6.1,f6.2,'// & fmt='(i6.4,1x,a4,5i2,4i3,f6.2,f7.1,f7.2,f6.1,f6.2,'// &
'1x,a6,1x,a6,1x,a4,1x,a)' '1x,a6,1x,a6,1x,a4,1x,a)'
if(ntrperiod.le.30) fmt(5:5)='6' if(ntrperiod.le.30) fmt(5:5)='6'
if(idec.eq.3) nrc=0
write(22,fmt) nutc,cmode,nQSOprogress,idec,idf,idt,ibw,nused, & write(22,fmt) nutc,cmode,nQSOprogress,idec,idf,idt,ibw,nused, &
icand,ncand,xdt,f0,snr1,snr2,tdecode,mycall(1:6),c6,c4, & icand,ncand,nrc,xdt,f0,db(snr1),snr2,tdecode,mycall(1:6), &
trim(decoded) c6,c4,trim(decoded)
close(22) close(22)
endif endif
endif endif

View File

@ -12,7 +12,7 @@ module q65
integer codewords(63,206) integer codewords(63,206)
integer ibwa,ibwb,ncw,nsps,mode_q65,nfa,nfb integer ibwa,ibwb,ncw,nsps,mode_q65,nfa,nfb
integer idf,idt,ibw integer idf,idt,ibw
integer istep,nsmo,lag1,lag2,npasses,nused,iseq,ncand integer istep,nsmo,lag1,lag2,npasses,nused,iseq,ncand,nrc
integer i0,j0 integer i0,j0
integer navg(0:1) integer navg(0:1)
logical lnewdat logical lnewdat
@ -71,6 +71,7 @@ subroutine q65_dec0(iavg,nutc,iwave,ntrperiod,nfqso,ntol,ndepth,lclearave, &
! Set some parameters and allocate storage for large arrays ! Set some parameters and allocate storage for large arrays
irc=-2 irc=-2
nrc=-2
idec=-1 idec=-1
snr1=0. snr1=0.
dat4=0 dat4=0
@ -263,6 +264,7 @@ subroutine q65_dec_q3(s1,iz,jz,s3,LL,ipk,jpk,snr2,dat4,idec,decoded)
b90=1.72**ibw b90=1.72**ibw
b90ts=b90/baud b90ts=b90/baud
call q65_dec1(s3,nsubmode,b90ts,esnodb,irc,dat4,decoded) call q65_dec1(s3,nsubmode,b90ts,esnodb,irc,dat4,decoded)
nrc=irc
if(irc.ge.0) then if(irc.ge.0) then
snr2=esnodb - db(2500.0/baud) + 3.0 !Empirical adjustment snr2=esnodb - db(2500.0/baud) + 3.0 !Empirical adjustment
idec=3 idec=3
@ -314,6 +316,7 @@ subroutine q65_dec_q012(s3,LL,snr2,dat4,idec,decoded)
b90=1.72**ibw b90=1.72**ibw
b90ts=b90/baud b90ts=b90/baud
call q65_dec2(s3,nsubmode,b90ts,esnodb,irc,dat4,decoded) call q65_dec2(s3,nsubmode,b90ts,esnodb,irc,dat4,decoded)
nrc=irc
if(irc.ge.0) then if(irc.ge.0) then
snr2=esnodb - db(2500.0/baud) + 3.0 !Empirical adjustment snr2=esnodb - db(2500.0/baud) + 3.0 !Empirical adjustment
idec=iaptype idec=iaptype
@ -486,6 +489,7 @@ subroutine q65_dec1(s3,nsubmode,b90ts,esnodb,irc,dat4,decoded)
else else
irc=-1 irc=-1
endif endif
nrc=irc
return return
end subroutine q65_dec1 end subroutine q65_dec1
@ -506,6 +510,7 @@ subroutine q65_dec2(s3,nsubmode,b90ts,esnodb,irc,dat4,decoded)
call q65_intrinsics_ff(s3,nsubmode,b90ts,nFadingModel,s3prob) call q65_intrinsics_ff(s3,nsubmode,b90ts,nFadingModel,s3prob)
call q65_dec(s3,s3prob,APmask,APsymbols,esnodb,dat4,irc) call q65_dec(s3,s3prob,APmask,APsymbols,esnodb,dat4,irc)
if(sum(dat4).le.0) irc=-2 if(sum(dat4).le.0) irc=-2
nrc=irc
if(irc.ge.0) then if(irc.ge.0) then
write(c77,1000) dat4(1:12),dat4(13)/2 write(c77,1000) dat4(1:12),dat4(13)/2
1000 format(12b6.6,b5.5) 1000 format(12b6.6,b5.5)

View File

@ -64,6 +64,7 @@ subroutine q65_loops(c00,npts2,nsps2,nsubmode,ndepth,jpk0, &
b90ts = b90/baud b90ts = b90/baud
call timer('dec2 ',0) call timer('dec2 ',0)
call q65_dec2(s3,nsubmode,b90ts,esnodb,irc,dat4,decoded) call q65_dec2(s3,nsubmode,b90ts,esnodb,irc,dat4,decoded)
nrc=irc
call timer('dec2 ',1) call timer('dec2 ',1)
! irc > 0 ==> number of iterations required to decode ! irc > 0 ==> number of iterations required to decode
! -1 = invalid params ! -1 = invalid params