mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-15 16:42:12 -05:00
Compute spectrum for measuring fspread of a decoded FST240/FST240W signal.
This commit is contained in:
parent
79dbdcca9c
commit
ab3630b2e7
@ -64,7 +64,7 @@ contains
|
|||||||
integer mcq(29),mrrr(19),m73(19),mrr73(19)
|
integer mcq(29),mrrr(19),m73(19),mrr73(19)
|
||||||
|
|
||||||
logical badsync,unpk77_success,single_decode
|
logical badsync,unpk77_success,single_decode
|
||||||
logical first,nohiscall,lwspr
|
logical first,nohiscall,lwspr,ex
|
||||||
|
|
||||||
integer*2 iwave(300*12000)
|
integer*2 iwave(300*12000)
|
||||||
|
|
||||||
@ -547,7 +547,8 @@ contains
|
|||||||
else
|
else
|
||||||
call get_fst240_tones_from_bits(message74,itone,1)
|
call get_fst240_tones_from_bits(message74,itone,1)
|
||||||
endif
|
endif
|
||||||
if(.false.) then
|
inquire(file='plotspec',exist=ex)
|
||||||
|
if(ex) then
|
||||||
call write_ref(itone,iwave,nsps,nmax,ndown,hmod, &
|
call write_ref(itone,iwave,nsps,nmax,ndown,hmod, &
|
||||||
isbest,fc_synced)
|
isbest,fc_synced)
|
||||||
endif
|
endif
|
||||||
@ -808,6 +809,7 @@ contains
|
|||||||
|
|
||||||
subroutine write_ref(itone,iwave,nsps,nmax,ndown,hmod,i0,fc)
|
subroutine write_ref(itone,iwave,nsps,nmax,ndown,hmod,i0,fc)
|
||||||
complex cwave(nmax)
|
complex cwave(nmax)
|
||||||
|
complex c(0:1440000-1)
|
||||||
integer itone(160)
|
integer itone(160)
|
||||||
integer*2 iwave(nmax)
|
integer*2 iwave(nmax)
|
||||||
integer hmod
|
integer hmod
|
||||||
@ -818,9 +820,27 @@ contains
|
|||||||
call gen_fst240wave(itone,nsym,nsps,nmax,fsample,hmod,fc, &
|
call gen_fst240wave(itone,nsym,nsps,nmax,fsample,hmod,fc, &
|
||||||
1,cwave,wave)
|
1,cwave,wave)
|
||||||
cwave=cshift(cwave,-i0*ndown)
|
cwave=cshift(cwave,-i0*ndown)
|
||||||
do i=1,nmax
|
! do i=1,nmax
|
||||||
write(51,*) i,iwave(i),real(cwave(i)),imag(cwave(i))
|
! write(51,1000) i,iwave(i),cwave(i)
|
||||||
|
!1000 format(2i10,f12.6)
|
||||||
|
! enddo
|
||||||
|
|
||||||
|
fac=1.0/32768
|
||||||
|
c=fac*float(iwave)*conjg(cwave)
|
||||||
|
call four2a(c,nmax,1,-1,1) !Forward c2c FFT
|
||||||
|
df=12000.0/nmax
|
||||||
|
ia=-10.0/df
|
||||||
|
ib=10.0/df
|
||||||
|
do i=ia,ib
|
||||||
|
j=i
|
||||||
|
if(j.lt.0) j=i+nmax
|
||||||
|
s=real(c(j))**2 + aimag(c(j))**2
|
||||||
|
f=i*df
|
||||||
|
write(52,1010) f,s,db(s)
|
||||||
|
1010 format(f10.3,e12.3,f10.3)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
return
|
||||||
end subroutine write_ref
|
end subroutine write_ref
|
||||||
|
|
||||||
end module fst240_decode
|
end module fst240_decode
|
||||||
|
Loading…
Reference in New Issue
Block a user