mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-07-04 10:55:16 -04:00
Further adjustments to sync64; extend QRA64 data length to 54 s; some code cleanup.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7414 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
c3b52ab787
commit
ec7e099cf8
@ -73,6 +73,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
npts65=52*12000
|
npts65=52*12000
|
||||||
|
if(params%nmode.eq.164) npts65=54*12000
|
||||||
if(baddata(id2,npts65)) then
|
if(baddata(id2,npts65)) then
|
||||||
nsynced=0
|
nsynced=0
|
||||||
ndecoded=0
|
ndecoded=0
|
||||||
|
@ -64,7 +64,7 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
|
|||||||
call sync64(c00,nf1,nf2,nfqso,ntol,mode64,dtx,f0,jpk0,sync,sync2,width)
|
call sync64(c00,nf1,nf2,nfqso,ntol,mode64,dtx,f0,jpk0,sync,sync2,width)
|
||||||
call timer('sync64 ',1)
|
call timer('sync64 ',1)
|
||||||
nfreq=nint(f0)
|
nfreq=nint(f0)
|
||||||
if((sync-3.4).lt.float(minsync) .or.width.gt.340.0) go to 900
|
! if((sync-3.4).lt.float(minsync) .or.width.gt.340.0) go to 900
|
||||||
a=0.
|
a=0.
|
||||||
a(1)=-f0
|
a(1)=-f0
|
||||||
npts2=npts/2
|
npts2=npts/2
|
||||||
@ -72,7 +72,6 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
|
|||||||
|
|
||||||
irc=-99
|
irc=-99
|
||||||
s3lim=20.
|
s3lim=20.
|
||||||
|
|
||||||
itz=11
|
itz=11
|
||||||
if(mode64.eq.4) itz=9
|
if(mode64.eq.4) itz=9
|
||||||
if(mode64.eq.2) itz=7
|
if(mode64.eq.2) itz=7
|
||||||
|
@ -11,7 +11,6 @@ subroutine sync64(c0,nf1,nf2,nfqso,ntol,mode64,dtx,f0,jpk,sync,sync2,width)
|
|||||||
real s0(0:NSPC-1) !Sum of s1+s2+s3
|
real s0(0:NSPC-1) !Sum of s1+s2+s3
|
||||||
real s0a(0:NSPC-1) !Best synchromized spectrum (saved)
|
real s0a(0:NSPC-1) !Best synchromized spectrum (saved)
|
||||||
real s0b(0:NSPC-1) !tmp
|
real s0b(0:NSPC-1) !tmp
|
||||||
real s0c(0:NSPC-1) !tmp
|
|
||||||
real a(5)
|
real a(5)
|
||||||
integer icos7(0:6) !Costas 7x7 tones
|
integer icos7(0:6) !Costas 7x7 tones
|
||||||
integer ipk0(1)
|
integer ipk0(1)
|
||||||
@ -56,9 +55,8 @@ subroutine sync64(c0,nf1,nf2,nfqso,ntol,mode64,dtx,f0,jpk,sync,sync2,width)
|
|||||||
ia=max(0,nint(fa/df3))
|
ia=max(0,nint(fa/df3))
|
||||||
ib=min(NSPC-1,nint(fb/df3))
|
ib=min(NSPC-1,nint(fb/df3))
|
||||||
id=0.1*(ib-ia)
|
id=0.1*(ib-ia)
|
||||||
|
|
||||||
iz=ib-ia+1
|
iz=ib-ia+1
|
||||||
sync=0.
|
sync=-1.e30
|
||||||
smaxall=0.
|
smaxall=0.
|
||||||
jpk=0
|
jpk=0
|
||||||
ja=0
|
ja=0
|
||||||
@ -75,10 +73,10 @@ subroutine sync64(c0,nf1,nf2,nfqso,ntol,mode64,dtx,f0,jpk,sync,sync2,width)
|
|||||||
j2=j1 + 39*NSPS
|
j2=j1 + 39*NSPS
|
||||||
j3=j1 + 77*NSPS
|
j3=j1 + 77*NSPS
|
||||||
c1=1.e-4*c0(j1:j1+NSPC-1) * conjg(cc)
|
c1=1.e-4*c0(j1:j1+NSPC-1) * conjg(cc)
|
||||||
call four2a(c1,nfft3,1,-1,1)
|
|
||||||
c2=1.e-4*c0(j2:j2+NSPC-1) * conjg(cc)
|
c2=1.e-4*c0(j2:j2+NSPC-1) * conjg(cc)
|
||||||
call four2a(c2,nfft3,1,-1,1)
|
|
||||||
c3=1.e-4*c0(j3:j3+NSPC-1) * conjg(cc)
|
c3=1.e-4*c0(j3:j3+NSPC-1) * conjg(cc)
|
||||||
|
call four2a(c1,nfft3,1,-1,1)
|
||||||
|
call four2a(c2,nfft3,1,-1,1)
|
||||||
call four2a(c3,nfft3,1,-1,1)
|
call four2a(c3,nfft3,1,-1,1)
|
||||||
s1=0.
|
s1=0.
|
||||||
s2=0.
|
s2=0.
|
||||||
@ -102,11 +100,13 @@ subroutine sync64(c0,nf1,nf2,nfqso,ntol,mode64,dtx,f0,jpk,sync,sync2,width)
|
|||||||
call smo(s0b(ia:ib),iz,s0(ia:ib),nadd)
|
call smo(s0b(ia:ib),iz,s0(ia:ib),nadd)
|
||||||
enddo
|
enddo
|
||||||
endif
|
endif
|
||||||
|
if(j1.eq.ja) then
|
||||||
call averms(s0(ia+id:ib-id),iz-2*id,nskip,ave,rms)
|
call averms(s0(ia+id:ib-id),iz-2*id,nskip,ave,rms)
|
||||||
s=(maxval(s0(ia:ib))-ave)/rms
|
endif
|
||||||
ipk0=maxloc(s0(ia:ib))
|
s=(maxval(s0(iaa:ibb))-ave)/rms
|
||||||
ip=ipk0(1) + ia - 1
|
ipk0=maxloc(s0(iaa:ibb))
|
||||||
if(s.gt.sync .and. ip.ge.iaa .and. ip.le.ibb) then
|
ip=ipk0(1) + iaa - 1
|
||||||
|
if(s.gt.sync) then
|
||||||
jpk=j1
|
jpk=j1
|
||||||
s0a=(s0-ave)/rms
|
s0a=(s0-ave)/rms
|
||||||
sync=s
|
sync=s
|
||||||
@ -114,17 +114,6 @@ subroutine sync64(c0,nf1,nf2,nfqso,ntol,mode64,dtx,f0,jpk,sync,sync2,width)
|
|||||||
ipk=ip
|
ipk=ip
|
||||||
f0=ip*df3
|
f0=ip*df3
|
||||||
endif
|
endif
|
||||||
s0=s0c
|
|
||||||
ipk0=maxloc(s0(ia:ib))
|
|
||||||
ip=ipk0(1) + ia - 1
|
|
||||||
|
|
||||||
if(smax.gt.sync .and. ip.ge.iaa .and. ip.le.ibb) then
|
|
||||||
jpk=j1
|
|
||||||
sync=smax
|
|
||||||
dtx=jpk/6000.0 - 1.0
|
|
||||||
ipk=ip
|
|
||||||
f0=ip*df3
|
|
||||||
endif
|
|
||||||
call timer('sync64_2',1)
|
call timer('sync64_2',1)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
@ -146,8 +135,8 @@ subroutine sync64(c0,nf1,nf2,nfqso,ntol,mode64,dtx,f0,jpk,sync,sync2,width)
|
|||||||
k=ib-nskip-21+i
|
k=ib-nskip-21+i
|
||||||
sq=sq + (s0a(j)-a(1))**2 + (s0a(k)-a(1))**2
|
sq=sq + (s0a(j)-a(1))**2 + (s0a(k)-a(1))**2
|
||||||
enddo
|
enddo
|
||||||
rms=sqrt(sq/40.0)
|
rms2=sqrt(sq/40.0)
|
||||||
sync2=10.0*log10(a(2)/rms)
|
sync2=10.0*log10(a(2)/rms2)
|
||||||
|
|
||||||
! do i=1,iz-2*nskip
|
! do i=1,iz-2*nskip
|
||||||
! x=i
|
! x=i
|
||||||
|
Loading…
x
Reference in New Issue
Block a user