Measure fSpread from ccf1, then use resulting width to set effective ibwmin.

This commit is contained in:
Joe Taylor 2020-12-19 13:25:51 -05:00
parent 3ccb7f2b85
commit 1f33c857ac
3 changed files with 13 additions and 7 deletions

View File

@ -94,7 +94,7 @@ contains
call q65_enc(dgen,codewords) !Initialize Q65
call timer('sync_q65',0)
call q65_sync(nutc,iwave,ntrperiod*12000,mode65,codewords,ncw,nsps, &
nfqso,ntol,emedelay,xdt,f0,snr1,dat4,snr2,id1)
nfqso,ntol,emedelay,xdt,f0,snr1,width,dat4,snr2,id1)
call timer('sync_q65',1)
if(id1.eq.1) then
xdt1=xdt
@ -140,7 +140,7 @@ contains
endif
call timer('q65loops',0)
call q65_loops(c00,npts/2,nsps/2,nmode,mode65,nsubmode, &
nFadingModel,ndepth,jpk0,xdt,f0,iaptype,apmask,apsymbols, &
nFadingModel,ndepth,jpk0,xdt,f0,width,iaptype,apmask,apsymbols, &
xdt1,f1,snr2,dat4,id2)
call timer('q65loops',1)
! snr2=snr2 + db(6912.0/nsps)

View File

@ -1,5 +1,5 @@
subroutine q65_sync(nutc,iwave,nmax,mode_q65,codewords,ncw,nsps,nfqso,ntol, &
emedelay,xdt,f0,snr1,dat4,snr2,id1)
emedelay,xdt,f0,snr1,width,dat4,snr2,id1)
! Detect and align with the Q65 sync vector, returning time and frequency
! offsets and SNR estimate.
@ -243,12 +243,18 @@ subroutine q65_sync(nutc,iwave,nmax,mode_q65,codewords,ncw,nsps,nfqso,ntol, &
ccf1=ccf(-ia:ia,jpk)/rms
if(snr1.gt.10.0) ccf1=(10.0/snr1)*ccf1
200 do i=-ia,ia
200 smax=maxval(ccf1)
i1=-9999
i2=-9999
do i=-ia,ia
if(i1.eq.-9999 .and. ccf1(i).ge.0.5*smax) i1=i
if(i2.eq.-9999 .and. ccf1(-i).ge.0.5*smax) i2=-i
freq=nfqso + i*df
write(17,1100) freq,ccf1(i),xdt
1100 format(3f10.3)
enddo
close(17)
width=df*(i2-i1)
900 return
end subroutine q65_sync

View File

@ -1,5 +1,5 @@
subroutine q65_loops(c00,npts2,nsps,mode,mode_q65,nsubmode,nFadingModel, &
ndepth,jpk0,xdt0,f0,iaptype,APmask,APsymbols,xdt1,f1,snr2,dat4,id2)
ndepth,jpk0,xdt0,f0,width,iaptype,APmask,APsymbols,xdt1,f1,snr2,dat4,id2)
use packjt77
use timer_module, only: timer
@ -69,9 +69,9 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode_q65,nsubmode,nFadingModel, &
nbw=ibw
ndist=ndf**2 + ndt**2 + ((nbw-2))**2
if(ndist.gt.maxdist) cycle
! b90=1.728**ibw
b90=3.0**nbw !### Mult by ~baud/3.33 ??? ###
if(nbw.eq.0) b90=baud
if(b90.lt.0.5*width) cycle
if(b90.gt.230.0) cycle
call timer('q65_intr',0)
b90ts = b90/baud