Open up the range of record sizes that opdetmsk144 will accept.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7091 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Steven Franke 2016-09-16 22:00:29 +00:00
parent 538f814905
commit 71443a9396

View File

@ -12,9 +12,7 @@ subroutine opdetmsk144(cbig,n,lines,nmessages,nutc,ntol,t00)
complex cs(NSPM) complex cs(NSPM)
complex cb(42) !Complex waveform for sync word complex cb(42) !Complex waveform for sync word
complex cfac,cca,ccb complex cfac,cca,ccb
complex cc1(0:NSPM-1) complex cc(0:NSPM-1)
complex cc2(0:NSPM-1)
complex bb(6)
integer s8(8),hardbits(144) integer s8(8),hardbits(144)
integer, dimension(1) :: iloc integer, dimension(1) :: iloc
integer*1 decoded(80) integer*1 decoded(80)
@ -23,7 +21,6 @@ subroutine opdetmsk144(cbig,n,lines,nmessages,nutc,ntol,t00)
real rcw(12) real rcw(12)
real ccm(0:NSPM-1) real ccm(0:NSPM-1)
real ccms(0:NSPM-1) real ccms(0:NSPM-1)
real dd(0:NSPM-1)
real pp(12) !Half-sine pulse shape real pp(12) !Half-sine pulse shape
real*8 dt, fs, pi, twopi real*8 dt, fs, pi, twopi
real softbits(144) real softbits(144)
@ -68,7 +65,7 @@ subroutine opdetmsk144(cbig,n,lines,nmessages,nutc,ntol,t00)
lines=char(0) lines=char(0)
nshort=0 nshort=0
! write(*,*) "number of points in opdetmsk144",n ! write(*,*) "number of points in opdetmsk144",n
if( n .lt. 24000 .or. n .gt. 49000) return if( n .lt. NPTS .or. n .gt. 181000) return
nsteps=2*n/6000-1 nsteps=2*n/6000-1
! write(*,*) 'nsteps ',nsteps ! write(*,*) 'nsteps ',nsteps
nsnr=-4 nsnr=-4
@ -80,8 +77,8 @@ subroutine opdetmsk144(cbig,n,lines,nmessages,nutc,ntol,t00)
xmax=0.0 xmax=0.0
bestf=0.0 bestf=0.0
do if=-ntol,ntol ! search for frequency that maximizes sync correlation do ifr=-ntol,ntol ! search for frequency that maximizes sync correlation
ferr=if ferr=ifr
! shift analytic signal to baseband ! shift analytic signal to baseband
call tweak1(cdat,NPTS,-(1500+ferr),cdat2) call tweak1(cdat,NPTS,-(1500+ferr),cdat2)
c=0 c=0
@ -91,25 +88,23 @@ subroutine opdetmsk144(cbig,n,lines,nmessages,nutc,ntol,t00)
c(1:NSPM)=c(1:NSPM)+cdat2(ib:ie) c(1:NSPM)=c(1:NSPM)+cdat2(ib:ie)
enddo enddo
cc1=0 cc=0
cc2=0
do ish=0,NSPM-1 do ish=0,NSPM-1
ct=cshift(c,ish) ct=cshift(c,ish)
cc1(ish)=sum(ct(1:42)*conjg(cb)) cc(ish)=sum(ct(1:42)*conjg(cb))+sum(ct(56*6:56*6+41)*conjg(cb))
cc2(ish)=sum(ct(56*6:56*6+41)*conjg(cb))
enddo enddo
ccm=abs(cc1+cc2) ccm=abs(cc)
dd=abs(cc1)*abs(cc2)
xb=maxval(ccm) xb=maxval(ccm)
if( xb .gt. xmax ) then if( xb .gt. xmax ) then
xmax=xb xmax=xb
bestf=ferr bestf=ferr
cs=c cs=c
ccms=ccm ccms=ccm
endif endif
enddo enddo
fest=1500+bestf fest=1500+bestf
! write(*,*) istep,fest,xmax
t0=t00+1.0 t0=t00+1.0
c=cs c=cs
ccm=ccms ccm=ccms