Good performance, including QD (quick decode) at selected fQSO.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@430 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2007-06-28 18:34:13 +00:00
parent 53c2f619f2
commit 25743ac557
6 changed files with 73 additions and 50 deletions

View File

@ -28,7 +28,7 @@ subroutine decode1(iarg)
newdat=1
endif
if((kk-kkdone).gt.32768) call symspec(id,kbuf,kk,kkdone,rxnoise)
if((kk-kkdone).gt.32768) call symspec(id,kbuf,kk,kkdone,rxnoise,newspec)
if(ndecoding.gt.0 .and. mode(1:4).eq.'JT65') then
ndecdone=0

View File

@ -94,13 +94,11 @@ C Test for messages with MyCall + HisCall + report
call encode65(message,ncode(1,k))
nflip(k)=flip
C Insert CQ message
if(m.eq.1 .and. flip.gt.0.0) then
message='CQ '//callgrid(icall)
k=k+1
testmsg(k)=message
call encode65(message,ncode(1,k))
nflip(k)=flip
endif
message='CQ '//callgrid(icall)
k=k+1
testmsg(k)=message
call encode65(message,ncode(1,k))
nflip(k)=flip
enddo
if(nsked.eq.1) go to 20
10 continue
@ -118,8 +116,10 @@ C Insert CQ message
enddo
p1=-1.e30
p2=-1.e30
do k=1,ntot
if(flip.gt.0.0 .or. nflip(k).lt.0) then !Skip CQ msg if flip=-1
pp(k)=0.
! if(flip.gt.0.0 .or. nflip(k).lt.0) then !Skip CQ msg if flip=-1
sum=0.
ref=ref0
do j=1,63
@ -135,10 +135,9 @@ C Insert CQ message
p1=p
ip1=k
endif
endif
! endif
enddo
p2=-1.e30
do i=1,ntot
if(pp(i).gt.p2 .and. pp(i).ne.p1) p2=pp(i)
enddo
@ -155,7 +154,7 @@ C ### compile step.
if(mode65.eq.2) bias=max(1.08*p2,0.405)
if(mode65.ge.4) bias=max(1.04*p2,0.505)
if(p2.eq.p1) stop 'Error in deep65'
if(p2.eq.p1 .and. p1.ne.-1.e30) stop 'Error in deep65'
qual=100.0*(p1-bias)
decoded=' '

View File

@ -959,9 +959,9 @@ def update():
graph2.create_text(13,109,anchor=W,text="Dgrd:%5.1f" % g.Dgrd,font=g2font)
if g.freeze_decode and mode.get()[:4]=='JT65':
itol=2
ltol.configure(text='Tol '+str(50))
Audio.gcom2.dftolerance=50
itol=5
ltol.configure(text='Tol '+str(500))
Audio.gcom2.dftolerance=500
nfreeze.set(1)
Audio.gcom2.nfreeze=1
if Audio.gcom2.monitoring:
@ -1002,14 +1002,14 @@ def update():
msg3.configure(text=t)
t="QSO DF:%4d" % (int(Audio.gcom2.mousedf),)
msg4.configure(text=t)
bdecode.configure(bg='gray85',activebackground='gray95')
if mode.get()[:4]=='JT65' and Audio.gcom2.ndecoding:
#Set button bg while decoding
bc='#66FFFF'
if g.ndecphase==1: bc='orange'
if g.ndecphase==2: bc='yellow'
bdecode.configure(bg=bc,activebackground=bc)
# if g.ndecphase==1: bc='orange'
# if g.ndecphase==2: bc='yellow'
bdecode.configure(bg=bc,activebackground=bc,state=DISABLED)
else:
bdecode.configure(bg='gray85',activebackground='gray95',state=ACTIVE)
g.ndecphase=0
tx1.configure(bg='white')
@ -1065,7 +1065,7 @@ def update():
except:
lines=""
text.configure(state=NORMAL)
for i in range(len(lines)):
for i in range(len(lines)-1):
text.insert(END,lines[i])
text.see(END)
g.ndecphase=1

View File

@ -39,7 +39,7 @@ subroutine map65a(newdat)
utcdata=utcdata(1:2)//':'//utcdata(3:4)
open(23,file='CALL3.TXT',status='old')
fselect=mousefqso + 1.6 + 0.001*mousedf
fselect=mousefqso + 1.6
df=96000.0/NFFT !df = 96000/NFFT = 2.930 Hz
ftol=0.020 !Frequency tolerance (kHz)
nfilt=1
@ -47,11 +47,10 @@ subroutine map65a(newdat)
do nqd=1,0,-1
if(nqd.eq.1) then
fa=1000.0*(fselect-100.0) - dftolerance
fb=1000.0*(fselect-100.0) + dftolerance
fa=1000.0*(fselect+0.001*mousedf-100.0) - dftolerance
fb=1000.0*(fselect+0.001*mousedf-100.0) + dftolerance
ia=nint((fa+23000.0)/df + 1.0) ! 23000 = 48000 - 25000
ib=nint((fb+23000.0)/df + 1.0)
print*,dftolerance,ia,ib
else
fa=0.0
fb=60000.0
@ -63,15 +62,12 @@ subroutine map65a(newdat)
nkk=1
nz=n/8
ndecdone=1
do i=1,NFFT
short(1,i)=0.
short(2,i)=0.
short(3,i)=0.
enddo
newspec=1
freq0=-999.
sync10=-999.
fshort0=-999.
@ -159,14 +155,12 @@ subroutine map65a(newdat)
! (Am I deleting any good decodes by doing this? Any harm in omitting
! these statements??)
if(freq-freq0.le.ftol .and. sync1.gt.sync10 .and. &
nkk.eq.1) kk=kk-1
nkk.eq.1 .and.nqd.eq.0) kk=kk-1
if(freq-freq0.gt.ftol .or. sync1.gt.sync10) then
if(freq-freq0.gt.ftol .or. sync1.gt.sync10 .and. nqd.eq.0) then
nflip=nint(flipk)
call decode1a(id(1,1,kbuf),newdat,nfilt,freq,nflip,dphi, &
ipol,sync2,a,dt,pol,nkv,nhist,qual,decoded)
! i9=index(decoded,'AA1YN')
! if(i9.gt.0) print*,i,i9,fselect,freq,decoded
kk=kk+1
sig(kk,1)=nfile
sig(kk,2)=nutc
@ -195,21 +189,41 @@ subroutine map65a(newdat)
endif
enddo
if(nqd.eq.1) then
nkHz=nint(freq-1.600)
npol=nint(57.2957795*pol)
nqual=qual
if(nflip.eq.-1) then !Should this be in decode1a ?
do i=22,9,-1
if(decoded(i:i).ne.' ') then
decoded(i+2:i+4)='OOO'
go to 6
do k=1,kk
decoded=msg(k)
if(decoded.ne.' ') then
nutc=sig(k,2)
freq=sig(k,3)
sync1=sig(k,4)
dt=sig(k,5)
npol=nint(57.2957795*sig(k,6))
flip=sig(k,7)
sync2=sig(k,8)
nkv=sig(k,9)
nqual=sig(k,10)
if(flip.lt.0.0) then
do i=22,1,-1
if(decoded(i:i).ne.' ') go to 8
enddo
stop 'Error in message format'
8 if(i.le.18) decoded(i+2:i+4)='OOO'
endif
enddo
endif
nw=0
6 write(11,1010) nkHz,ndf,npol,nutc,nsync2,dt,nw,decoded,nkv,nqual
1010 format(i3,i5,i4,i5.4,i4,f5.1,i3,2x,a22,2i3)
nkHz=nint(freq-1.600)
f0=144.0+0.001*nkHz
ndf=nint(1000.0*(freq-1.600-nkHz))
! ndf0=nint(a(1))
! ndf1=nint(a(2))
! ndf2=nint(a(3))
nsync1=sync1
nsync2=nint(10.0*log10(sync2)) - 40 !### empirical ###
nw=0
write(11,1010) nkHz,ndf,npol,nutc,nsync2,dt,nw,decoded,nkv,nqual
1010 format(i3,i5,i4,i5.4,i4,f5.1,i3,2x,a22,2i3)
endif
enddo
write(11,*) '$EOF'
call flushqqq(11)
ndecdone=1
endif
if(nagain.eq.1) go to 999
enddo

View File

@ -175,8 +175,15 @@ def freq_range(event):
if fmid<1000*nfr.get(): fmid=1000*nfr.get()
if fmid>5000-1000*nfr.get(): fmid=5000-1000*nfr.get()
#---------------------------------------------------- freeze_decode
def freeze_decode(event):
#---------------------------------------------------- freeze_decode1
def freeze_decode1(event):
# If decoder is busy or we are not monitoring, ignore request
if Audio.gcom2.ndecoding==0 or Audio.gcom2.monitoring==0:
set_fqso(event)
g.freeze_decode=1
#---------------------------------------------------- freeze_decode2
def freeze_decode2(event):
# If decoder is busy or we are not monitoring, ignore request
if Audio.gcom2.ndecoding==0 or Audio.gcom2.monitoring==0:
set_freezedf(event)
@ -400,7 +407,7 @@ graph1=Canvas(iframe1, bg='black', width=NX, height=NY,bd=0,cursor='crosshair')
graph1.pack(side=TOP)
Widget.bind(graph1,"<Motion>",fdf_change)
Widget.bind(graph1,"<Button-1>",set_fqso)
Widget.bind(graph1,"<Double-Button-1>",freeze_decode)
Widget.bind(graph1,"<Double-Button-1>",freeze_decode1)
iframe1.pack(expand=1, fill=X)
c2=Canvas(iframe1, bg='white', width=NX, height=25,bd=0)
@ -413,7 +420,7 @@ graph2=Canvas(iframe1, bg='black', width=NX, height=NY,bd=0,cursor='crosshair')
graph2.pack(side=TOP)
Widget.bind(graph2,"<Motion>",fdf_change2)
Widget.bind(graph2,"<Button-1>",set_freezedf)
Widget.bind(graph2,"<Double-Button-1>",freeze_decode)
Widget.bind(graph2,"<Double-Button-1>",freeze_decode2)
iframe1.pack(expand=1, fill=X)

View File

@ -1,4 +1,4 @@
subroutine symspec(id,kbuf,kk,kkdone,rxnoise)
subroutine symspec(id,kbuf,kk,kkdone,rxnoise,newspec)
C Compute spectra at four polarizations, using half-symbol steps.
@ -84,7 +84,10 @@ C Compute spectra at four polarizations, using half-symbol steps.
ss5(n,i)=0.707*sqrt(q*q + u*u)
enddo
if(n.eq.ntot) go to 999
if(n.eq.ntot) then
newspec=1
go to 999
endif
enddo
999 return