Set the "b90" search range once (in q65_decocd.f90) and share valies through q65.mod.

This commit is contained in:
Joe Taylor 2021-01-08 09:42:07 -05:00
parent f5d2c5cd90
commit 57b6b2dca1
5 changed files with 18 additions and 17 deletions

View File

@ -85,10 +85,18 @@ contains
else else
stop 'Invalid TR period' stop 'Invalid TR period'
endif endif
baud=12000.0/nsps baud=12000.0/nsps
df1=12000.0/nfft1 df1=12000.0/nfft1
this%callback => callback this%callback => callback
nFadingModel=1 nFadingModel=1
ibwa=max(1,int(1.8*log(baud*mode65)) + 2)
ibwb=min(10,ibwa+4)
if(iand(ndepth,3).eq.3) then
ibwa=max(1,ibwa-1)
ibwb=min(10,ibwb+1)
endif
! Set up the codewords for full-AP list decoding ! Set up the codewords for full-AP list decoding
call q65_set_list(mycall,hiscall,hisgrid,codewords,ncw) call q65_set_list(mycall,hiscall,hisgrid,codewords,ncw)
dgen=0 dgen=0
@ -103,7 +111,7 @@ contains
f1=f0 f1=f0
go to 100 go to 100
endif endif
if(snr1.lt.2.8) then if(snr1.lt.2.8) then
xdt1=0. !No reliable sync, abandon decoding attempt xdt1=0. !No reliable sync, abandon decoding attempt
f1=0. f1=0.
@ -161,7 +169,7 @@ contains
if(iand(ndepth,16).eq.16) then if(iand(ndepth,16).eq.16) then
! Try for an average decode. ! Try for an average decode.
call q65_avg2(ntrperiod,ntol,baud,nsubmode,nQSOprogress,lapcqonly, & call q65_avg2(ntrperiod,ntol,baud,nsubmode,nQSOprogress,lapcqonly, &
ibwa,ibwb,codewords,ncw,xdt,f0,snr1,snr2,dat4,idec) codewords,ncw,xdt,f0,snr1,snr2,dat4,idec)
endif endif
100 decoded=' ' 100 decoded=' '

View File

@ -8,7 +8,7 @@ module q65
integer listutc(10) integer listutc(10)
integer apsym0(58),aph10(10) integer apsym0(58),aph10(10)
integer apmask(13),apsymbols(13) integer apmask(13),apsymbols(13)
integer navg integer navg,ibwa,ibwb
real f0save(MAXAVE) real f0save(MAXAVE)
real xdtsave(MAXAVE) real xdtsave(MAXAVE)
real snr1save(MAXAVE) real snr1save(MAXAVE)

View File

@ -71,12 +71,10 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3)
10 return 10 return
entry q65_avg2(ntrperiod,ntol,baud,nsubmode,nQSOprogress,lapcqonly, & entry q65_avg2(ntrperiod,ntol,baud,nsubmode,nQSOprogress,lapcqonly, &
ibwa,ibwb,codewords,ncw,xdt,f0,snr1,snr2,dat4,idec) codewords,ncw,xdt,f0,snr1,snr2,dat4,idec)
mode_q65=2**nsubmode mode_q65=2**nsubmode
f0diff=baud*mode_q65 f0diff=baud*mode_q65
ibwa=1.8*log(baud*mode_q65) + 2
ibwb=min(10,ibwa+4)
snr1sum=0. snr1sum=0.
xdtsum=0. xdtsum=0.
fsum=0. fsum=0.

View File

@ -3,6 +3,8 @@ subroutine q65_loops(c00,npts2,nsps,mode_q65,nsubmode,ndepth,jpk0, &
use packjt77 use packjt77
use timer_module, only: timer use timer_module, only: timer
use q65
parameter (NN=63) parameter (NN=63)
parameter (LN=1152*63) !LN=LL*NN; LL=64*(mode_q65+2), NN=63 parameter (LN=1152*63) !LN=LL*NN; LL=64*(mode_q65+2), NN=63
complex c00(0:npts2-1) !Analytic representation of dd(), 6000 Hz complex c00(0:npts2-1) !Analytic representation of dd(), 6000 Hz
@ -28,8 +30,6 @@ subroutine q65_loops(c00,npts2,nsps,mode_q65,nsubmode,ndepth,jpk0, &
idfmax=3 idfmax=3
idtmax=3 idtmax=3
ibwa=max(1,int(1.8*log(baud*mode_q65)) + 2)
ibwb=min(10,ibwa+4)
ibw0=(ibwa+ibwb)/2 ibw0=(ibwa+ibwb)/2
maxdist=5 maxdist=5
if(iand(ndepth,3).ge.2) then if(iand(ndepth,3).ge.2) then
@ -37,12 +37,8 @@ subroutine q65_loops(c00,npts2,nsps,mode_q65,nsubmode,ndepth,jpk0, &
idtmax=5 idtmax=5
maxdist=10 maxdist=10
endif endif
if(iand(ndepth,3).eq.3) then if(iand(ndepth,3).eq.3) maxdist=15
maxdist=15
ibwa=max(1,ibwa-1)
ibwb=min(10,ibwb+1)
endif
LL=64*(mode_q65+2) LL=64*(mode_q65+2)
napmin=99 napmin=99
xdt1=xdt0 xdt1=xdt0

View File

@ -15,9 +15,10 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps, &
use packjt77 use packjt77
use timer_module, only: timer use timer_module, only: timer
use q65
parameter (NSTEP=8) !Step size nsps/NSTEP parameter (NSTEP=8) !Step size nsps/NSTEP
parameter (LN=2176*63) !LN=LL*NN; LL=64*(mode_q65+2), NN=63 parameter (LN=2176*63) !LN=LL*NN; LL=64*(mode_q65+2), NN=63
parameter (PLOG_MIN=-240.0) !List decoding threshold
integer*2 iwave(0:12000*ntrperiod-1) !Raw data integer*2 iwave(0:12000*ntrperiod-1) !Raw data
integer isync(22) !Indices of sync symbols integer isync(22) !Indices of sync symbols
integer itone(85) integer itone(85)
@ -183,8 +184,6 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps, &
if(mode_q65.eq.16) nsubmode=4 if(mode_q65.eq.16) nsubmode=4
nFadingModel=1 nFadingModel=1
baud=12000.0/nsps baud=12000.0/nsps
ibwa=1.8*log(baud*mode_q65) + 2
ibwb=min(10,ibwa+4)
do ibw=ibwa,ibwb do ibw=ibwa,ibwb
b90=1.72**ibw b90=1.72**ibw