mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-07-25 18:22:27 -04:00
Code cleanup in sfox_sync.
This commit is contained in:
parent
665e18f656
commit
b25e7fce8c
@ -1,6 +1,7 @@
|
|||||||
subroutine sfox_sync(crcvd,fsample,isync,f,t)
|
subroutine sfox_sync(crcvd,fsample,isync,f,t)
|
||||||
|
|
||||||
use sfox_mod
|
use sfox_mod
|
||||||
|
parameter (NSTEPS=8)
|
||||||
complex crcvd(NMAX) !Signal as received
|
complex crcvd(NMAX) !Signal as received
|
||||||
complex, allocatable :: c(:) !Work array
|
complex, allocatable :: c(:) !Work array
|
||||||
integer isync(50)
|
integer isync(50)
|
||||||
@ -10,7 +11,7 @@ subroutine sfox_sync(crcvd,fsample,isync,f,t)
|
|||||||
! data mark/' ','.','-','+','X','$','#'/
|
! data mark/' ','.','-','+','X','$','#'/
|
||||||
|
|
||||||
nh=NFFT1/2 !1024
|
nh=NFFT1/2 !1024
|
||||||
istep=nh/8 !128
|
istep=nh/NSTEPS !128
|
||||||
nsz=(nint(3.0*fsample) + NS*NSPS)/istep !473
|
nsz=(nint(3.0*fsample) + NS*NSPS)/istep !473
|
||||||
df=fsample/NFFT1 !5.86 Hz
|
df=fsample/NFFT1 !5.86 Hz
|
||||||
tstep=istep/fsample !0.0107 s
|
tstep=istep/fsample !0.0107 s
|
||||||
@ -18,7 +19,7 @@ subroutine sfox_sync(crcvd,fsample,isync,f,t)
|
|||||||
allocate(c(0:nfft1-1))
|
allocate(c(0:nfft1-1))
|
||||||
allocate(s(nh/2,nsz))
|
allocate(s(nh/2,nsz))
|
||||||
|
|
||||||
! Compute symbol spectra with df=baud/2 and 1/8 symbol steps.
|
! Compute symbol spectra with df=baud/2 and NSTEPS steps per symbol.
|
||||||
ia=1-istep
|
ia=1-istep
|
||||||
fac=1.0/NFFT1
|
fac=1.0/NFFT1
|
||||||
do j=1,nsz
|
do j=1,nsz
|
||||||
@ -38,7 +39,7 @@ subroutine sfox_sync(crcvd,fsample,isync,f,t)
|
|||||||
i0=nint(1500.0/df)
|
i0=nint(1500.0/df)
|
||||||
ipk=-999
|
ipk=-999
|
||||||
jpk=-999
|
jpk=-999
|
||||||
jz=nsz-8*NS
|
jz=nsz-NSTEPS*NS
|
||||||
allocate(ccf(-iz:iz,1:jz))
|
allocate(ccf(-iz:iz,1:jz))
|
||||||
ccf=0.
|
ccf=0.
|
||||||
do j=1,jz
|
do j=1,jz
|
||||||
@ -46,7 +47,7 @@ subroutine sfox_sync(crcvd,fsample,isync,f,t)
|
|||||||
p=0.
|
p=0.
|
||||||
do k=1,NS
|
do k=1,NS
|
||||||
ii=i0+i+(2*(isync(k)-NQ/2))
|
ii=i0+i+(2*(isync(k)-NQ/2))
|
||||||
jj=j + 8*(k-1)
|
jj=j + NSTEPS*(k-1)
|
||||||
p=p + s(ii,jj)
|
p=p + s(ii,jj)
|
||||||
enddo
|
enddo
|
||||||
ccf(i,j)=p
|
ccf(i,j)=p
|
||||||
|
Loading…
x
Reference in New Issue
Block a user