From df8ad7a8d99616fc7c30d998180461d32a3cff4d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 13 Jan 2021 11:07:20 -0500 Subject: [PATCH] More into q65 module. --- lib/q65_decode.f90 | 2 +- lib/qra/q65/q65.f90 | 2 +- lib/qra/q65/q65_loops.f90 | 10 +++++----- lib/qra/q65/q65_sync.f90 | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/q65_decode.f90 b/lib/q65_decode.f90 index b337e058d..cb97a10a7 100644 --- a/lib/q65_decode.f90 +++ b/lib/q65_decode.f90 @@ -101,7 +101,7 @@ contains dgen=0 call q65_enc(dgen,codewords) !Initialize the Q65 codec call timer('sync_q65',0) - call q65_sync(nutc,iwave,ntrperiod,mode65,nsps, & + call q65_sync(nutc,iwave,ntrperiod,mode65, & nfqso,ntol,ndepth,lclearave,emedelay,xdt,f0,snr1,width,dat4, & snr2,idec) call timer('sync_q65',1) diff --git a/lib/qra/q65/q65.f90 b/lib/qra/q65/q65.f90 index 0ce9527cd..870a0f155 100644 --- a/lib/qra/q65/q65.f90 +++ b/lib/qra/q65/q65.f90 @@ -9,7 +9,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 + integer navg,ibwa,ibwb,ncw,nsps real,allocatable,save :: s1a(:,:) !Cumulative symbol spectra real sync(85) !sync vector diff --git a/lib/qra/q65/q65_loops.f90 b/lib/qra/q65/q65_loops.f90 index 2754c50ab..92bed63df 100644 --- a/lib/qra/q65/q65_loops.f90 +++ b/lib/qra/q65/q65_loops.f90 @@ -1,4 +1,4 @@ -subroutine q65_loops(c00,npts2,nsps,mode_q65,nsubmode,ndepth,jpk0, & +subroutine q65_loops(c00,npts2,nsps2,mode_q65,nsubmode,ndepth,jpk0, & xdt0,f0,iaptype,xdt1,f1,snr2,dat4,idec) use packjt77 @@ -21,7 +21,7 @@ subroutine q65_loops(c00,npts2,nsps,mode_q65,nsubmode,ndepth,jpk0, & allocate(c0(0:npts2-1)) irc=-99 s3lim=20. - baud=6000.0/nsps + baud=6000.0/nsps2 idfmax=3 idtmax=3 @@ -48,10 +48,10 @@ subroutine q65_loops(c00,npts2,nsps,mode_q65,nsubmode,ndepth,jpk0, & do idt=1,idtmax ndt=idt/2 if(mod(idt,2).eq.0) ndt=-ndt - jpk=jpk0 + nsps*ndt/16 !tsym/16 + jpk=jpk0 + nsps2*ndt/16 !tsym/16 if(jpk.lt.0) jpk=0 call timer('spec64 ',0) - call spec64(c0,nsps,65,mode_q65,jpk,s3,LL,NN) + call spec64(c0,nsps2,65,mode_q65,jpk,s3,LL,NN) call timer('spec64 ',1) call pctile(s3,LL*NN,40,base) s3=s3/base @@ -80,7 +80,7 @@ subroutine q65_loops(c00,npts2,nsps,mode_q65,nsubmode,ndepth,jpk0, & !3055 format(7i4,f10.1,1x,a) idec=iaptype+2 snr2=esnodb - db(2500.0/baud) - xdt1=xdt0 + nsps*ndt/(16.0*6000.0) + xdt1=xdt0 + nsps2*ndt/(16.0*6000.0) f1=f0 + 0.5*baud*ndf endif diff --git a/lib/qra/q65/q65_sync.f90 b/lib/qra/q65/q65_sync.f90 index 57d62c769..f5f6b97dc 100644 --- a/lib/qra/q65/q65_sync.f90 +++ b/lib/qra/q65/q65_sync.f90 @@ -1,4 +1,4 @@ -subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,nsps, & +subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65, & nfqso,ntol,ndepth,lclearave,emedelay,xdt,f0,snr1,width,dat4,snr2,idec) ! Detect and align with the Q65 sync vector, returning time and frequency @@ -73,7 +73,7 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,nsps, & call timer('s1 ',0) nmax=ntrperiod*12000 - call q65_symspec(iwave,nmax,nsps,iz,jz,istep,nsmo,s1) + call q65_symspec(iwave,nmax,iz,jz,istep,nsmo,s1) call timer('s1 ',1) i0=nint(nfqso/df) !Target QSO frequency @@ -102,7 +102,7 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,nsps, & ! Try list decoding via "Deep Likelihood". call timer('list_dec',0) call q65_dec_q3(df,s1,iz,jz,ia, & - nsps,mode_q65,lag1,lag2,i0,j0,ccf,ccf1,ccf2,ia2,s3,LL,snr2, & + mode_q65,lag1,lag2,i0,j0,ccf,ccf1,ccf2,ia2,s3,LL,snr2, & dat4,idec,decoded) call timer('list_dec',1) endif @@ -178,7 +178,7 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,nsps, & 900 return end subroutine q65_sync -subroutine q65_symspec(iwave,nmax,nsps,iz,jz,istep,nsmo,s1) +subroutine q65_symspec(iwave,nmax,iz,jz,istep,nsmo,s1) use q65 integer*2 iwave(0:nmax-1) !Raw data @@ -215,7 +215,7 @@ subroutine q65_symspec(iwave,nmax,nsps,iz,jz,istep,nsmo,s1) end subroutine q65_symspec subroutine q65_dec_q3(df,s1,iz,jz,ia, & - nsps,mode_q65,lag1,lag2,i0,j0,ccf,ccf1,ccf2,ia2,s3,LL,snr2, & + mode_q65,lag1,lag2,i0,j0,ccf,ccf1,ccf2,ia2,s3,LL,snr2, & dat4,idec,decoded) use q65