deep65: corrected error in determining p2

sync65: added call to smooth for improved sync in mode JT65C.
        added +2 dB to SNR estimates for JT65C.
wsjt65: cleaned up some display details of decoded lines
short65: added calls to smooth for improved shorthand decodes in JT65C.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@217 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2006-08-01 15:55:52 +00:00
parent f043624fd7
commit 9ba3471dfe
5 changed files with 35 additions and 28 deletions

View File

@ -11,7 +11,8 @@
character*180 line
character*4 rpt(MAXRPT)
logical first
integer ncode(63,2*MAXCALLS)
integer ncode(63,2*MAXCALLS + 2 + MAXRPT)
real pp(2*MAXCALLS + 2 + MAXRPT)
common/tmp9/ mrs(63),mrs2(63)
data neme0/-99/
@ -73,7 +74,7 @@
mz=1
if(n.eq.1 .and. j3.lt.1 .and. j4.lt.1 .and.
+ flip.gt.0.0) mz=MAXRPT+1
+ flip.gt.0.0 .and. callsign(1:6).ne.' ') mz=MAXRPT+1
C Test for messages with MyCall + HisCall + report
do m=1,mz
if(m.gt.1) grid=rpt(m-1)
@ -83,7 +84,8 @@ C Test for messages with MyCall + HisCall + report
k=k+1
testmsg(k)=message
call encode65(message,ncode(1,k))
if(m.eq.1) then
C Insert CQ message unless sync=OOO (flip=-1).
if(m.eq.1 .and. flip.gt.0.0) then
message='CQ '//callgrid(icall)
k=k+1
testmsg(k)=message
@ -102,10 +104,7 @@ C Test for messages with MyCall + HisCall + report
p1=-1.e30
p2=-1.e30
n=0
do k=1,ntot
C If sync=OOO, no CQ messages
if(flip.lt.0.0 .and. testmsg(k)(1:3).eq.'CQ ') go to 30
sum=0.
ref=ref0
do j=1,63
@ -116,26 +115,25 @@ C If sync=OOO, no CQ messages
endif
enddo
p=sum/ref
n=n+1
pp(k)=p
if(p.gt.p1) then
if(p1.gt.p2) then
p2=p1
ip2=ip1
endif
p1=p
ip1=k
else if(p.gt.p2 .and. p.lt.p1) then
p2=p
ip2=k
endif
30 enddo
ntot=n
p2=-1.e30
do i=1,ntot
if(pp(i).gt.p2 .and. pp(i).ne.p1) p2=pp(i)
enddo
40 if(mode65.eq.1) bias=max(1.12*p2,0.335)
if(mode65.eq.1) bias=max(1.12*p2,0.335)
if(mode65.eq.2) bias=max(1.08*p2,0.405)
if(mode65.ge.4) bias=max(1.04*p2,0.505)
C This is really weird, but do not remove the following statement!
rewind 23
qual=100.0*(p1-bias)
decoded=' '
c=' '

View File

@ -34,6 +34,10 @@ C Do 16 k FFTs, stepped by 8k. (*** Maybe should step by 4k? ***)
do j=1,nsteps
k=(j-1)*NH + 1
call ps(data(k),NFFT,s2(1,j)) !Get power spectra
if(mode65.eq.4) then
call smooth(s2(1,j),NQ)
call smooth(s2(1,j),NQ)
endif
call add(psavg,s2(1,j),psavg,NQ)
enddo

View File

@ -1,5 +1,5 @@
subroutine sync65(dat,jz,DFTolerance,NFreeze,NAFC,MouseDF,
+ dtx,dfx,snrx,snrsync,ccfblue,ccfred,flip,width)
+ mode65,dtx,dfx,snrx,snrsync,ccfblue,ccfred,flip,width)
C Synchronizes JT65 data, finding the best-fit DT and DF.
C NB: at this stage, submodes ABC are processed in the same way.
@ -32,6 +32,7 @@ C Compute power spectrum for each step and get average
k=(j-1)*nh + 1
call limit(dat(k),nfft)
call ps(dat(k),nfft,s2(1,j))
if(mode65.eq.4) call smooth(s2(1,j),nh)
call add(psavg,s2(1,j),psavg,nh)
enddo
@ -133,6 +134,7 @@ C Find rms of the CCF, without the main peak
C Plus 3 dB because sync tone is on half the time. (Don't understand
C why an additional +2 dB is needed ...)
if(ppmax.gt.0.0001) snrx=db(ppmax*df/2500.0) + 5.0 !###
if(mode65.eq.4) snrx=snrx + 2.0
if(snrx.lt.-33.0) snrx=-33.0
C Compute width of sync tone to outermost -3 dB points

View File

@ -1,4 +1,4 @@
#----------------------------------------------------------------- WSJT
#------------------------------------------------------------------ WSJT
from Tkinter import *
from tkFileDialog import *
import Pmw

View File

@ -57,7 +57,7 @@ C already been done.
C Attempt to synchronize: look for sync tone, get DF and DT.
call sync65(dat,npts,DFTolerance,NFreeze,NAFC,MouseDF,
+ dtx,dfx,snrx,snrsync,ccfblue,ccfred,flip,width)
+ mode65,dtx,dfx,snrx,snrsync,ccfblue,ccfred,flip,width)
f0=1270.46 + dfx
csync=' '
decoded=' '
@ -69,6 +69,8 @@ C Attempt to synchronize: look for sync tone, get DF and DT.
ncount1=-1 !Flag for RS Decode of ave1
ncount2=-1 !Flag for RS Decode of ave2
NSyncOK=0
nqual1=0
nqual2=0
if(nsave.lt.MAXAVE .and. (NAgain.eq.0 .or. NClearAve.eq.1))
+ nsave=nsave+1
@ -134,19 +136,22 @@ C If we get here, we have achieved sync!
+ nint(width),csync,special,decoded(1:19),cooo,kvqual,nqual
1010 format(a6,i3,i5,f5.1,i5,i3,1x,a1,1x,a5,a19,1x,a3,i4,i4)
C Blank all end-of-line stuff if no decode
if(line(31:40).eq.' ') line=line(:30)
C Blank DT if shorthand message (### wrong logic? ###)
if(special.ne.' ') then
line(15:19)=' '
line=line(:35)
ccfblue(-5)=-9999.0
if(ndiag.gt.0) write(line(51:57),1012) iderrsh,idriftsh
1012 format(i3,i4)
! if(ndiag.gt.0) write(line(51:57),1012) iderrsh,idriftsh
! 1012 format(i3,i4)
else
nspecial=0
endif
C Blank the end-of-line numbers
if(naggressive.eq.0 .and. ndiag.eq.0) line(58:67)=' '
if(ndiag.eq.0) line(66:67)=' '
if(naggressive.eq.0 .and. ndiag.eq.0) line(59:66)=' '
if(lcum) write(21,1011) line
1011 format(a67)
@ -199,10 +204,8 @@ C If Monitor segment #2 is available, write that line also
ns20=ns2
endif
if(ndiag.eq.0) then
ave1(58:67)=' '
ave2(58:67)=' '
endif
if(ave1(31:40).eq.' ') ave1=ave1(:30)
if(ave2(31:40).eq.' ') ave2=ave2(:30)
write(12,1011) ave1
write(12,1011) ave2
call flushqqq(12)