From dc4c3e87ebb1adadc403603f9de437470b6581e1 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 13 Jan 2021 10:44:19 -0500 Subject: [PATCH] Move more things into q65 module. --- lib/qra/q65/q65.f90 | 6 ++++-- lib/qra/q65/q65_sync.f90 | 13 +++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/qra/q65/q65.f90 b/lib/qra/q65/q65.f90 index c21eeb5da..95181c15d 100644 --- a/lib/qra/q65/q65.f90 +++ b/lib/qra/q65/q65.f90 @@ -6,9 +6,11 @@ module q65 integer listutc(10) integer apsym0(58),aph10(10) integer apmask(13),apsymbols(13) + 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 - real,allocatable,save :: s1a(:,:) !Cumulative symbol spectra + real,allocatable,save :: s1a(:,:) !Cumulative symbol spectra contains @@ -46,7 +48,7 @@ end subroutine q65_dec2 subroutine q65_s1_to_s3(s1,iz,jz,i0,j0,ipk,jpk,LL,mode_q65,sync,s3) -! Copy from s1a into s3, then call the dec_q* routines +! Copy from s1 or s1a into s3 real s1(iz,jz) real s3(-64:LL-65,63) diff --git a/lib/qra/q65/q65_sync.f90 b/lib/qra/q65/q65_sync.f90 index 83b0ee127..2aaab4d3f 100644 --- a/lib/qra/q65/q65_sync.f90 +++ b/lib/qra/q65/q65_sync.f90 @@ -19,7 +19,6 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,nsps, & parameter (LN=2176*63) !LN=LL*NN; LL=64*(mode_q65+2), NN=63 integer*2 iwave(0:12000*ntrperiod-1) !Raw data - integer isync(22) !Indices of sync symbols integer dat4(13) integer ijpk(2) character*37 decoded @@ -30,7 +29,6 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,nsps, & real, allocatable :: ccf1(:) !CCF(freq) at best lag real, allocatable :: ccf2(:) !CCF(freq) at any lag real sync(85) !sync vector - data isync/1,9,12,13,15,22,23,26,27,33,35,38,46,50,55,60,62,66,69,74,76,85/ data sync(1)/99.0/ save sync @@ -104,8 +102,8 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,nsps, & if(ncw.gt.0) then ! Try list decoding via "Deep Likelihood". call timer('list_dec',0) - call q65_dec_q3(codewords,ncw,isync,sync,df,s1,iz,jz,ia,ibwa,ibwb, & - nstep,nsps,mode_q65,lag1,lag2,i0,j0,ccf,ccf1,ccf2,ia2,s3,LL,snr2, & + call q65_dec_q3(sync,df,s1,iz,jz,ia, & + nsps,mode_q65,lag1,lag2,i0,j0,ccf,ccf1,ccf2,ia2,s3,LL,snr2, & dat4,idec,decoded) call timer('list_dec',1) endif @@ -217,15 +215,14 @@ subroutine q65_symspec(iwave,nmax,nsps,iz,jz,istep,nsmo,s1) return end subroutine q65_symspec -subroutine q65_dec_q3(codewords,ncw,isync,sync,df,s1,iz,jz,ia,ibwa,ibwb, & - nstep,nsps,mode_q65,lag1,lag2,i0,j0,ccf,ccf1,ccf2,ia2,s3,LL,snr2, & +subroutine q65_dec_q3(sync,df,s1,iz,jz,ia, & + nsps,mode_q65,lag1,lag2,i0,j0,ccf,ccf1,ccf2,ia2,s3,LL,snr2, & dat4,idec,decoded) + use q65 character*37 decoded - integer isync(22) !Indices of sync symbols integer itone(85) integer ijpk(2) - integer codewords(63,206) integer dat4(13) real ccf(-ia2:ia2,-53:214) real ccf1(-ia2:ia2)