From 65dda491d28f8fe33d0e009237dc6ccafb952b35 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 30 Nov 2020 15:20:19 -0500 Subject: [PATCH] More Q65 code cleanup. Make submodes higher than A work with List Decoding. --- lib/q65_decode.f90 | 2 +- lib/q65_sync.f90 | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/q65_decode.f90 b/lib/q65_decode.f90 index 0473b7119..ef4e67060 100644 --- a/lib/q65_decode.f90 +++ b/lib/q65_decode.f90 @@ -93,7 +93,7 @@ contains dgen=0 call q65_enc(dgen,codewords) !Initialize Q65 call timer('sync_q65',0) - call q65_sync(nutc,iwave,ntrperiod*12000,mode65,codewords,ncw,nsps, & + call q65_sync(iwave,ntrperiod*12000,mode65,codewords,ncw,nsps, & nfqso,ntol,xdt,f0,snr1,dat4,snr2,id1) call timer('sync_q65',1) if(id1.eq.1) then diff --git a/lib/q65_sync.f90 b/lib/q65_sync.f90 index a9d58537d..cbdcbe4dc 100644 --- a/lib/q65_sync.f90 +++ b/lib/q65_sync.f90 @@ -1,4 +1,4 @@ -subroutine q65_sync(nutc,iwave,nmax,mode_q65,codewords,ncw,nsps,nfqso,ntol, & +subroutine q65_sync(iwave,nmax,mode_q65,codewords,ncw,nsps,nfqso,ntol, & xdt,f0,snr1,dat4,snr2,id1) ! Detect and align with the Q65 sync vector, returning time and frequency @@ -126,7 +126,7 @@ subroutine q65_sync(nutc,iwave,nmax,mode_q65,codewords,ncw,nsps,nfqso,ntol, & j=j0 + NSTEP*(k-1) + 1 + lag if(j.ge.1 .and. j.le.jz) then do i=-ia,ia - ii=i0+itone(k)+i + ii=i0+mode_q65*itone(k)+i ccf(i,lag)=ccf(i,lag) + s1(ii,j) enddo endif @@ -157,6 +157,10 @@ subroutine q65_sync(nutc,iwave,nmax,mode_q65,codewords,ncw,nsps,nfqso,ntol, & enddo nsubmode=0 + if(mode_q65.eq.2) nsubmode=1 + if(mode_q65.eq.4) nsubmode=2 + if(mode_q65.eq.8) nsubmode=3 + if(mode_q65.eq.16) nsubmode=4 nFadingModel=1 baud=12000.0/nsps do ibw=0,10