mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-29 06:54:49 -04:00
Merge branch 'feat-ft2' of bitbucket.org:k1jt/wsjtx into feat-ft2
This commit is contained in:
+16
-20
@@ -1,13 +1,14 @@
|
||||
subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
|
||||
df3,ihsym,npts8,pxdbmax)
|
||||
subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,bLowSidelobes, &
|
||||
nminw,pxdb,s,df3,ihsym,npts8,pxdbmax)
|
||||
|
||||
! Input:
|
||||
! k pointer to the most recent new data
|
||||
! ntrperiod T/R sequence length, minutes
|
||||
! nsps samples per symbol, at 12000 Hz
|
||||
! ndiskdat 0/1 to indicate if data from disk
|
||||
! nb 0/1 status of noise blanker (off/on)
|
||||
! nbslider NB setting, 0-100
|
||||
! k pointer to the most recent new data
|
||||
! ntrperiod T/R sequence length, minutes
|
||||
! nsps samples per symbol, at 12000 Hz
|
||||
! bLowSidelobes true to use windowed FFTs
|
||||
! ndiskdat 0/1 to indicate if data from disk
|
||||
! nb 0/1 status of noise blanker (off/on)
|
||||
! nbslider NB setting, 0-100
|
||||
|
||||
! Output:
|
||||
! pxdb raw power (0-90 dB)
|
||||
@@ -29,6 +30,7 @@ subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
|
||||
real*4 tmp(NSMAX)
|
||||
complex cx(0:MAXFFT3/2)
|
||||
integer nch(7)
|
||||
logical*1 bLowSidelobes
|
||||
|
||||
common/spectra/syellow(NSMAX),ref(0:3456),filter(0:3456)
|
||||
data k0/99999999/,nfft3z/0/
|
||||
@@ -48,23 +50,17 @@ subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
|
||||
if(nfft3.ne.nfft3z) then
|
||||
! Compute new window
|
||||
pi=4.0*atan(1.0)
|
||||
! width=0.25*nsps
|
||||
! do i=1,nfft3
|
||||
! z=(i-nfft3/2)/width
|
||||
! w3(i)=exp(-z*z)
|
||||
! enddo
|
||||
! Coefficients taken from equation 37 of NUSC report:
|
||||
! "Some windows with very good sidelobe behavior: application to
|
||||
! discrete Hilbert Transform, by Albert Nuttall"
|
||||
!
|
||||
a0=0.3635819
|
||||
a1=-0.4891775;
|
||||
a2=0.1365995;
|
||||
a3=-0.0106411;
|
||||
do i=1,nfft3
|
||||
w3(i)=a0+a1*cos(2*pi*(i-1)/(nfft3))+ &
|
||||
a2*cos(4*pi*(i-1)/(nfft3))+ &
|
||||
a3*cos(6*pi*(i-1)/(nfft3))
|
||||
w3(i)=a0+a1*cos(2*pi*(i-1)/(nfft3))+ &
|
||||
a2*cos(4*pi*(i-1)/(nfft3))+ &
|
||||
a3*cos(6*pi*(i-1)/(nfft3))
|
||||
enddo
|
||||
nfft3z=nfft3
|
||||
endif
|
||||
@@ -99,10 +95,10 @@ subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
|
||||
enddo
|
||||
ihsym=ihsym+1
|
||||
|
||||
xc(0:nfft3-1)=w3(1:nfft3)*xc(0:nfft3-1) !Apply window w3
|
||||
call four2a(xc,nfft3,1,-1,0) !Real-to-complex FFT
|
||||
if(bLowSidelobes) xc(0:nfft3-1)=w3(1:nfft3)*xc(0:nfft3-1) !Apply window
|
||||
call four2a(xc,nfft3,1,-1,0) !Real-to-complex FFT
|
||||
|
||||
df3=12000.0/nfft3 !JT9-1: 0.732 Hz = 0.42 * tone spacing
|
||||
df3=12000.0/nfft3 !JT9: 0.732 Hz = 0.42 * tone spacing
|
||||
iz=min(NSMAX,nint(5000.0/df3))
|
||||
fac=(1.0/nfft3)**2
|
||||
do i=1,iz
|
||||
|
||||
Reference in New Issue
Block a user