Set k0 from f_mouse when nagain=1, and correct the displayed DF.

This commit is contained in:
Joe Taylor 2021-05-20 13:01:36 -04:00
parent 3392d18218
commit 92668c3ed4

View File

@ -1,5 +1,5 @@
subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
mycall0,hiscall0,hisgrid,mode_q65,f0,idec)
mycall0,hiscall0,hisgrid,mode_q65,f0,fqso,nagain,idec)
! This routine provides an interface between MAP65 and the Q65 decoder
! in WSJT-X. All arguments are input data obtained from the MAP65 GUI.
@ -63,10 +63,10 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
df=96000.0/nfft1
endif
nh=nfft2/2
f_mouse=1000.0*(fqso+48.0) + mousedf
f_ipk=ipk*df3
k0=nint((ipk*df3-1000.0)/df)
! write(*,3001) nqd,f0+0.001*nfcal,0.001*ipk*df3,0.001*k0*df+1.0,mousedf,ipk,snr1
!3001 format('=D',i3,3f10.3,2i7,f7.2)
if(nagain.eq.1) k0=nint((f_mouse-1000.0)/df)
if(k0.lt.nh .or. k0.gt.nfft1-nh) go to 900
if(snr1.lt.1.5) go to 900 !### Threshold needs work? ###
@ -120,8 +120,12 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
close(30)
nsubmode=mode_q65-1
nfa=max(100,1000-ntol)
nfb=min(2500,1000+ntol)
nfa=100
nfb=1900
if(nagain.eq.1) then
nfa=max(100,1000-ntol)
nfb=min(2500,1000+ntol)
endif
newdat=1
nagain=0
nsnr0=-99 !Default snr for no decode
@ -129,12 +133,15 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
! NB: Frequency of ipk is now shifted to 1000 Hz.
call map65_mmdec(nutc,iwave,nqd,nsubmode,nfa,nfb,1000,ntol, &
newdat,nagain,mycall,hiscall,hisgrid)
print*,'=A',nqd,nsnr0
MHz=fcenter
freq0=MHz + 0.001*ikhz
if(nsnr0.gt.-99) then
nq65df=nint(1000*(0.001*k0*df+nkhz_center-48.0+1.000-1.27046-ikhz))-nfcal
if(nqd.eq.1 .and. abs(nfreq0-1000.0).lt.0.9*ntol) then
nq65df=nq65df + nfreq0 - 1000
print*,'=B',nqd,nq65df,ntol
if(nqd.eq.1 .and. abs(nq65df).lt.ntol) then
write(line,1020) ikhz,nq65df,45*(ipol-1),nutc,xdt0,nsnr0,msg0(1:27),cq0
1020 format('!',i3.3,i5,i4,i6.4,f5.1,i5,' : ',a27,a3)
write(*,1100) trim(line)