mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-04 06:54:47 -04:00
Plot a red "sync" curve in QRA64 mode.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6876 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+5
-3
@@ -52,8 +52,10 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
else
|
||||
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown')
|
||||
end if
|
||||
if(params%nmode.eq.4 .or. params%nmode.eq.65) open(14,file=trim(temp_dir)//'/avemsg.txt', &
|
||||
status='unknown')
|
||||
if(params%nmode.eq.4 .or. params%nmode.eq.65) open(14,file=trim(temp_dir)// &
|
||||
'/avemsg.txt',status='unknown')
|
||||
if(params%nmode.eq.164) open(17,file=trim(temp_dir)//'/red.dat', &
|
||||
access='stream',status='unknown')
|
||||
|
||||
if(params%nmode.eq.4) then
|
||||
jz=52*nfsample
|
||||
@@ -84,7 +86,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
!$omp parallel sections num_threads(2) copyin(/timer_private/) shared(ndecoded) if(.true.) !iif() needed on Mac
|
||||
|
||||
!$omp section
|
||||
if(params%nmode.eq.65 .or. params%nmode.eq.165 .or. &
|
||||
if(params%nmode.eq.65 .or. params%nmode.eq.164 .or. &
|
||||
(params%nmode.eq.(65+9) .and. params%ntxmode.eq.65)) then
|
||||
! We're in JT65 mode, or should do JT65 first
|
||||
if(newdat65) dd(1:npts65)=id2(1:npts65)
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
type, bind(C) :: dec_data
|
||||
real(c_float) :: ss(184,NSMAX)
|
||||
real(c_float) :: savg(NSMAX)
|
||||
real(c_float) :: sred(5760)
|
||||
integer(c_short) :: id2(NMAX)
|
||||
type(params_block) :: params
|
||||
end type dec_data
|
||||
|
||||
+23
-10
@@ -14,6 +14,7 @@ subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,sync,nsnr,dtx,nfreq, &
|
||||
real s(NZ)
|
||||
real savg(NZ)
|
||||
real blue(0:25)
|
||||
real red0(NZ)
|
||||
real red(NZ)
|
||||
real x(NFFT)
|
||||
complex cx(0:NH)
|
||||
@@ -23,11 +24,6 @@ subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,sync,nsnr,dtx,nfreq, &
|
||||
common/qra64com/ss(NZ,194),s3(0:63,1:63),ccf(NZ,0:25)
|
||||
save
|
||||
|
||||
! rewind 73
|
||||
! rewind 74
|
||||
! rewind 75
|
||||
! rewind 76
|
||||
|
||||
decoded=' '
|
||||
nft=99
|
||||
nsnr=-30
|
||||
@@ -59,10 +55,11 @@ subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,sync,nsnr,dtx,nfreq, &
|
||||
fb=min(nf2,nfqso+ntol)
|
||||
ia=nint(fa/df)
|
||||
ib=nint(fb/df)
|
||||
red0=0.
|
||||
fac=1.0/sqrt(21.0)
|
||||
sync=0.
|
||||
do if0=ia,ib
|
||||
red(if0)=0.
|
||||
red0(if0)=0.
|
||||
do j=0,25
|
||||
t=-3.0
|
||||
do n=0,6
|
||||
@@ -70,10 +67,10 @@ subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,sync,nsnr,dtx,nfreq, &
|
||||
t=t + ss(i,1+2*n+j) + ss(i,1+2*n+j+78) + ss(i,1+2*n+j+154)
|
||||
enddo
|
||||
ccf(if0,j)=fac*t
|
||||
if(ccf(if0,j).gt.red(if0)) then
|
||||
red(if0)=ccf(if0,j)
|
||||
if(red(if0).gt.sync) then
|
||||
sync=red(if0)
|
||||
if(ccf(if0,j).gt.red0(if0)) then
|
||||
red0(if0)=ccf(if0,j)
|
||||
if(red0(if0).gt.sync) then
|
||||
sync=red0(if0)
|
||||
f0=if0*df
|
||||
dtx=j*istep/12000.0 - 1.0
|
||||
i0=if0
|
||||
@@ -83,6 +80,22 @@ subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,sync,nsnr,dtx,nfreq, &
|
||||
enddo
|
||||
enddo
|
||||
|
||||
red(ia:ib)=0.
|
||||
rewind 73
|
||||
do i=ia+3,ib-3
|
||||
r1=red0(i)
|
||||
red0(i)=0.
|
||||
r0=maxval(red0(i-3:i+3))
|
||||
red0(i)=r1
|
||||
red(i)=max(0.0,r1-r0)
|
||||
write(73,3001) i*df,red(i),red0(i),r0
|
||||
3001 format(4f12.3)
|
||||
enddo
|
||||
flush(73)
|
||||
|
||||
write(17) ia,ib,red(ia:ib)
|
||||
close(17)
|
||||
|
||||
if0=nint(f0/df)
|
||||
nfreq=nint(f0)
|
||||
blue(0:25)=ccf(if0,0:25)
|
||||
|
||||
Reference in New Issue
Block a user