From d010929fab80c8a6b80250416de94b784edd27df Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 2 May 2021 11:36:17 -0400 Subject: [PATCH] Correct for the fact that ss and savg start at bin 1 = zero freq. --- map65/libm65/wideband_sync.f90 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/map65/libm65/wideband_sync.f90 b/map65/libm65/wideband_sync.f90 index 82a6bc30c..f358d01d7 100644 --- a/map65/libm65/wideband_sync.f90 +++ b/map65/libm65/wideband_sync.f90 @@ -43,9 +43,9 @@ subroutine wb_sync(ss,savg) ccf=0. do j=1,22 k=isync(j) + lag - ccf=ccf + ss(ipol,k,i) + ccf=ccf + ss(ipol,k,i+1) enddo - ccf=ccf - savg(ipol,i)*22.0/322.0 + ccf=ccf - savg(ipol,i+1)*22.0/322.0 if(ccf.gt.ccfmax) then ipolbest=ipol lagbest=lag @@ -60,8 +60,9 @@ subroutine wb_sync(ss,savg) sync_dat(i,2)=ccfmax sync_dat(i,3)=xdt sync_dat(i,4)=ipolbest -! write(14,3010) i,sync_dat(i,1:3),nint(sync_dat(i,4)),0.001*i*df,nkhz_center -!3010 format(i6,3f10.3,i5,f10.3,i5) +! f0=0.001*i*df +! write(70,3010) f0,sync_dat(i,2:3),nint(sync_dat(i,4)),0.001*i*df,nkhz_center +!3010 format(3f10.3,i5,f10.3,i5) enddo