diff --git a/lib/q65_decode.f90 b/lib/q65_decode.f90 index 9e4bf38d8..d2a1e468e 100644 --- a/lib/q65_decode.f90 +++ b/lib/q65_decode.f90 @@ -133,15 +133,11 @@ contains !3002 format('b ',13b6.6/4x,13b6.6) call timer('q65loops',0) call q65_loops(c00,npts/2,nsps/2,nmode,mode65,nsubmode,nFadingModel, & - ndepth,jpk0,xdt,f0,width,iaptype,apmask,apsymbols,snr1,snr2, & - irc,dat4) + ndepth,jpk0,xdt,f0,width,iaptype,apmask,apsymbols,snr1,xdt1,f1, & + snr2,irc,dat4) call timer('q65loops',1) snr2=snr2 + db(6912.0/nsps) - if(irc.ge.0) then -! write(54,3003) dat4,dat4 -!3003 format('c ',13b6.6,13i3) - exit - endif + if(irc.ge.0) exit enddo 100 decoded=' ' @@ -155,12 +151,12 @@ contains 1000 format(12b6.6,b5.5) call unpack77(c77,0,decoded,unpk77_success) !Unpack to get msgsent nsnr=nint(snr2) - call this%callback(nutc,sync,nsnr,xdt,f0,decoded, & + call this%callback(nutc,sync,nsnr,xdt1,f1,decoded, & irc,qual,ntrperiod,fmid,w50) else ! Report sync, even if no decode. nsnr=db(snr1) - 35.0 - call this%callback(nutc,sync,nsnr,xdt,f0,decoded, & + call this%callback(nutc,sync,nsnr,xdt1,f1,decoded, & irc,qual,ntrperiod,fmid,w50) endif diff --git a/lib/qra/q65/q65_loops.f90 b/lib/qra/q65/q65_loops.f90 index e10f0a624..ebcbc7c94 100644 --- a/lib/qra/q65/q65_loops.f90 +++ b/lib/qra/q65/q65_loops.f90 @@ -1,5 +1,6 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode64,nsubmode,nFadingModel, & - ndepth,jpk0,xdt,f0,width,iaptype,APmask,APsymbols,snr1,snr2,irc,dat4) + ndepth,jpk0,xdt0,f0,width,iaptype,APmask,APsymbols,snr1,xdt1,f1, & + snr2,irc,dat4) use packjt77 use timer_module, only: timer @@ -38,6 +39,8 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode64,nsubmode,nFadingModel, & NN=63 napmin=99 baud=6000.0/nsps + xdt1=xdt0 + f1=f0 maxavg=0 if(iand(ndepth,16).ne.0) maxavg=1 @@ -111,6 +114,8 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode64,nsubmode,nFadingModel, & navg=nsave snr2=esnodb - db(2500.0/baud) if(iavg.eq.0) navg=0 + xdt1=xdt0 + nsps*ndt/(16.0*6000.0) + f1=f0 + 0.5*baud*ndf !### For tests only: open(53,file='fort.53',status='unknown',position='append') write(c77,1100) dat4(1:12),dat4(13)/2