It's now (at least) close to correct in handling fcenter reported

by Linrad.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@984 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2008-07-23 00:16:16 +00:00
parent 268e3f9b84
commit 873b389fc3
5 changed files with 18 additions and 29 deletions

View File

@ -46,7 +46,6 @@ integer nkeep !Timeout limit for band maps (min) GUI
integer nmode !Which WSJT mode? GUI,Decoder integer nmode !Which WSJT mode? GUI,Decoder
integer mode65 !JT65 sub-mode (A/B/C ==> 1/2/4) GUI,SoundIn,Decoder integer mode65 !JT65 sub-mode (A/B/C ==> 1/2/4) GUI,SoundIn,Decoder
integer nbpp !# FFT Bins/pixel, wideband waterfall Spec integer nbpp !# FFT Bins/pixel, wideband waterfall Spec
integer nfullspec !Set to 1 to display full spectrum GUI
integer ndebug !Write debugging info? GUI integer ndebug !Write debugging info? GUI
integer ndphi !Set to 1 to compute dphi GUI,Decoder integer ndphi !Set to 1 to compute dphi GUI,Decoder
integer nhispol !Pol angle matching HisCall or HisGrid Decoder integer nhispol !Pol angle matching HisCall or HisGrid Decoder
@ -110,7 +109,7 @@ common/gcom2/fcenter,ps0(431),psavg(450),s2(64,3100),ccf(-5:540), &
ndecdone,npingtime,ierr,lauto,mantx,nrestart,ntr,nmsg,nsave,nadd5, & ndecdone,npingtime,ierr,lauto,mantx,nrestart,ntr,nmsg,nsave,nadd5, &
dftolerance,LDecoded,rxdone,monitoring,nzap,minsigdb, & dftolerance,LDecoded,rxdone,monitoring,nzap,minsigdb, &
nclearave,nfreeze,nafc,ncsmin,newspec,nfa,nfb,nfcal,idphi,nkeep, & nclearave,nfreeze,nafc,ncsmin,newspec,nfa,nfb,nfcal,idphi,nkeep, &
nmode,mode65,nbpp,nfullspec,ndebug,ndphi,nhispol,nt1,nt2, & nmode,mode65,nbpp,ndebug,ndphi,nhispol,nt1,nt2, &
nblank,nport,mousedf,mousefqso,neme,nrw26,naggressive,ntx2,nagain, & nblank,nport,mousedf,mousefqso,neme,nrw26,naggressive,ntx2,nagain, &
shok,sendingsh,d2a(661500),d2b(661500),b(60000),jza,jzb,ntime, & shok,sendingsh,d2a(661500),d2b(661500),b(60000),jza,jzb,ntime, &
idinterval,msmax,lenappdir,idf,ndiskdat,nlines,nflat,ntxreq,ntxnow, & idinterval,msmax,lenappdir,idf,ndiskdat,nlines,nflat,ntxreq,ntxnow, &

View File

@ -979,8 +979,8 @@ def update():
msg4.configure(text=t) msg4.configure(text=t)
t="Drop: %.2f %%" % Audio.gcom2.pctlost t="Drop: %.2f %%" % Audio.gcom2.pctlost
msg5.configure(text=t) msg5.configure(text=t)
t="%d %d %d" % (Audio.datcom.kbuf,Audio.datcom.kk,Audio.datcom.kxp/96000) ## t="%d %d %d" % (Audio.datcom.kbuf,Audio.datcom.kk,Audio.datcom.kxp/96000)
msg7.configure(text=t) ## msg7.configure(text=t)
root_geom=root.geometry() root_geom=root.geometry()
try: try:
bm_geom=bm.geometry() bm_geom=bm.geometry()
@ -1716,8 +1716,8 @@ msg5=Message(iframe6, text="", width=300,relief=SUNKEN)
msg5.pack(side=LEFT, fill=X, padx=1) msg5.pack(side=LEFT, fill=X, padx=1)
msg6=Message(iframe6, text="", width=300,relief=SUNKEN) msg6=Message(iframe6, text="", width=300,relief=SUNKEN)
msg6.pack(side=LEFT, fill=X, padx=1) msg6.pack(side=LEFT, fill=X, padx=1)
msg7=Message(iframe6, text="", width=300,relief=SUNKEN) ##msg7=Message(iframe6, text="", width=300,relief=SUNKEN)
msg7.pack(side=LEFT, fill=X, padx=1) ##msg7.pack(side=LEFT, fill=X, padx=1)
msg8=Message(iframe6, text=' ', width=300,relief=SUNKEN) msg8=Message(iframe6, text=' ', width=300,relief=SUNKEN)
msg8.pack(side=RIGHT, fill=X, padx=1) msg8.pack(side=RIGHT, fill=X, padx=1)
iframe6.pack(expand=1, fill=X, padx=4) iframe6.pack(expand=1, fill=X, padx=4)
@ -1857,7 +1857,6 @@ Audio.ftn_init()
GenStdMsgs() GenStdMsgs()
Audio.gcom4.addpfx=(options.addpfx.get().lstrip()+' ')[:8] Audio.gcom4.addpfx=(options.addpfx.get().lstrip()+' ')[:8]
Audio.gcom2.mousefqso=125 Audio.gcom2.mousefqso=125
Audio.gcom2.nfullspec=0
Audio.gcom2.nhispol=-999 Audio.gcom2.nhispol=-999
monitor() monitor()
first=1 first=1

View File

@ -23,9 +23,10 @@ subroutine map65a(newdat)
data nfile/0/,nutc0/-999/,nid/0/,ip000/1/,ip001/1/,mousefqso0/-999/ data nfile/0/,nutc0/-999/,nid/0/,ip000/1/,ip001/1/,mousefqso0/-999/
save save
nfoffset=nint(1000*(fcenter-144.125d0))
if(mousefqso.ne.mousefqso0 .and. nagain.eq.1) newspec=2 if(mousefqso.ne.mousefqso0 .and. nagain.eq.1) newspec=2
mousefqso0=mousefqso mousefqso0=mousefqso
nfoffset=nint(1000*(fcenter-144.125d0))
mfqso=mousefqso - nfoffset
pctlost=nlost/331.03 pctlost=nlost/331.03
if(ndebug.eq.2) write(29,3001) nutc,mod(int(sec_midn()),60),nlost,pctlost if(ndebug.eq.2) write(29,3001) nutc,mod(int(sec_midn()),60),nlost,pctlost
@ -51,7 +52,7 @@ subroutine map65a(newdat)
df=96000.0/NFFT !df = 96000/NFFT = 2.930 Hz df=96000.0/NFFT !df = 96000/NFFT = 2.930 Hz
ftol=0.020 !Frequency tolerance (kHz) ftol=0.020 !Frequency tolerance (kHz)
foffset=0.001*(1270 + nfcal) foffset=0.001*(1270 + nfcal)
fselect=mousefqso + foffset fselect=mfqso + foffset
nfilt=1 nfilt=1
dphi=idphi/57.2957795 dphi=idphi/57.2957795
@ -142,7 +143,7 @@ subroutine map65a(newdat)
noffset=0 noffset=0
if(nqd.eq.1) noffset=nint(1000.0* & if(nqd.eq.1) noffset=nint(1000.0* &
(fshort-foffset-mousefqso)-mousedf) (fshort-foffset-mfqso)-mousedf)
if(abs(noffset).le.dftolerance) then if(abs(noffset).le.dftolerance) then
! Keep only the best candidate within ftol. ! Keep only the best candidate within ftol.
!### NB: sync2 was not defined here! !### NB: sync2 was not defined here!
@ -186,7 +187,7 @@ subroutine map65a(newdat)
! Use lower thresh1 at fQSO ! Use lower thresh1 at fQSO
if(nqd.eq.1 .and. dftolerance.le.100) thresh1=0. if(nqd.eq.1 .and. dftolerance.le.100) thresh1=0.
noffset=0 noffset=0
if(nqd.eq.1) noffset=nint(1000.0*(freq-foffset-mousefqso)-mousedf) if(nqd.eq.1) noffset=nint(1000.0*(freq-foffset-mfqso)-mousedf)
if(sync1.gt.thresh1 .and. abs(noffset).le.dftolerance) then if(sync1.gt.thresh1 .and. abs(noffset).le.dftolerance) then
! Keep only the best candidate within ftol. ! Keep only the best candidate within ftol.
! (Am I deleting any good decodes by doing this?) ! (Am I deleting any good decodes by doing this?)
@ -256,7 +257,7 @@ subroutine map65a(newdat)
endif endif
nkHz=nint(freq-foffset) + nfoffset nkHz=nint(freq-foffset) + nfoffset
f0=144.0+0.001*nkHz f0=144.0+0.001*nkHz
ndf=nint(1000.0*(freq-foffset-nkHz)) ndf=nint(1000.0*(freq-foffset-nkHz+nfoffset))
! ndf0=nint(a(1)) ! ndf0=nint(a(1))
! ndf1=nint(a(2)) ! ndf1=nint(a(2))
@ -281,7 +282,7 @@ subroutine map65a(newdat)
endif endif
enddo enddo
if(nwrite.eq.0) then if(nwrite.eq.0) then
nfqso=mousefqso + nfoffset nfqso=mfqso + nfoffset
write(11,1012) nfqso,nutc write(11,1012) nfqso,nutc
1012 format(i3,9x,i5.4) 1012 format(i3,9x,i5.4)
endif endif
@ -353,7 +354,7 @@ subroutine map65a(newdat)
endif endif
nkHz=nint(freq-foffset) + nfoffset nkHz=nint(freq-foffset) + nfoffset
f0=144.0+0.001*nkHz f0=144.0+0.001*nkHz
ndf=nint(1000.0*(freq-foffset-nkHz)) ndf=nint(1000.0*(freq-foffset-nkHz+nfoffset))
ndf0=nint(a(1)) ndf0=nint(a(1))
ndf1=nint(a(2)) ndf1=nint(a(2))
ndf2=nint(a(3)) ndf2=nint(a(3))

View File

@ -101,7 +101,7 @@ subroutine spec(brightness,contrast,ngain,nspeed,a,a2)
! fac=fac*(0.1537/base) ! fac=fac*(0.1537/base)
foffset=0.001*(1270+nfcal) foffset=0.001*(1270+nfcal)
nbpp=(nfb-nfa)*NFFT/(96.0*NX) !Bins per pixel in wideband (upper) waterfall nbpp=(nfb-nfa)*NFFT/(96.0*NX) !Bins per pixel in wideband (upper) waterfall
fselect=mousefqso + foffset fselect=mousefqso + foffset - 1000.d0*(fcenter-144.125d0)
imid=nint(1000.0*(fselect-125.0+48.0)/df) imid=nint(1000.0*(fselect-125.0+48.0)/df)
fmid=0.5*(nfa+nfb) + foffset fmid=0.5*(nfa+nfb) + foffset
imid0=nint(1000.0*(fmid-125.0+48.0)/df) - nbpp/2 !Last term is empirical imid0=nint(1000.0*(fmid-125.0+48.0)/df) - nbpp/2 !Last term is empirical

View File

@ -120,8 +120,8 @@ def pal_AFMHot():
# Readout of graphical cursor location # Readout of graphical cursor location
def fdf_change(event): def fdf_change(event):
global bw global bw
fmid=0.5*float(Audio.gcom2.nfb + Audio.gcom2.nfa) m=int(1000.0*Audio.gcom2.fcenter) % 1000 - 125
if Audio.gcom2.nfullspec: fmid=125.0 - 2.2 #Empirical fmid=0.5*float(Audio.gcom2.nfa + Audio.gcom2.nfb) + m
df=bw/NX #kHz per pixel df=bw/NX #kHz per pixel
g.Freq=df*(event.x-375) + fmid g.Freq=df*(event.x-375) + fmid
n=int(g.Freq+0.5) n=int(g.Freq+0.5)
@ -158,16 +158,11 @@ def df_mark():
draw_axis() draw_axis()
# Mark QSO freq in top graph # Mark QSO freq in top graph
color='green' color='green'
fmid=0.5*float(Audio.gcom2.nfb + Audio.gcom2.nfa) m=int(1000.0*Audio.gcom2.fcenter) % 1000 - 125
if Audio.gcom2.nfullspec: fmid=125.0 - 2.3 #Empirical fmid=0.5*float(Audio.gcom2.nfa + Audio.gcom2.nfb) + m
df=bw/NX #kHz per pixel df=bw/NX #kHz per pixel
x1=375.0 + (Audio.gcom2.mousefqso-fmid)/df x1=375.0 + (Audio.gcom2.mousefqso-fmid)/df
c.create_line(x1,25,x1,12,fill=color,width=2) c.create_line(x1,25,x1,12,fill=color,width=2)
if Audio.gcom2.nfullspec:
x1=375.0 + (Audio.gcom2.nfa-fmid)/df
x2=375.0 + (Audio.gcom2.nfb-fmid)/df
c.create_line(x1,25,x2,25,fill=color,width=2)
df=96000.0/32768.0 df=96000.0/32768.0
# Mark sync tone and top JT65 tone (green) and shorthand tones (red) # Mark sync tone and top JT65 tone (green) and shorthand tones (red)
fstep=20.0*11025.0/4096.0 fstep=20.0*11025.0/4096.0
@ -188,8 +183,6 @@ def draw_axis():
c.delete(ALL) c.delete(ALL)
xdf=bw/NX #kHz per pixel xdf=bw/NX #kHz per pixel
xmid=0.5*float(Audio.gcom2.nfb + Audio.gcom2.nfa) xmid=0.5*float(Audio.gcom2.nfb + Audio.gcom2.nfa)
if Audio.gcom2.nfullspec:
xmid=125.0 - 2.3 #Empirical
x1=int(xmid-0.6*bw) #Make it too wide, to be x1=int(xmid-0.6*bw) #Make it too wide, to be
x2=int(xmid+0.6*bw) #sure to get all the numbers x2=int(xmid+0.6*bw) #sure to get all the numbers
ixadd=(int(1000.0*Audio.gcom2.fcenter) % 1000) - 125 ixadd=(int(1000.0*Audio.gcom2.fcenter) % 1000) - 125
@ -277,9 +270,6 @@ def update():
nbpp=int((Audio.gcom2.nfb - Audio.gcom2.nfa)*32768/(96.0*NX)) nbpp=int((Audio.gcom2.nfb - Audio.gcom2.nfa)*32768/(96.0*NX))
bw=750.0*(96.0/32768.0)*nbpp bw=750.0*(96.0/32768.0)*nbpp
if Audio.gcom2.nfullspec:
nbpp=int(32768.0/NX)
bw=750.0*(96.0/32768.0)*nbpp
if g.showspecjt==1: if g.showspecjt==1:
showspecjt() showspecjt()