mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-29 07:28:54 -04:00
This is a temporary, WIP commit. Many disgnostic statements present!
This commit is contained in:
parent
4b9763b982
commit
2716b3ed8a
@ -1,6 +1,6 @@
|
|||||||
subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
||||||
mycall0,hiscall0,hisgrid,mode_q65,f0,fqso,newdat,nagain, &
|
mycall0,hiscall0,hisgrid,mode_q65,f0,fqso,newdat,nagain, &
|
||||||
max_drift,ndepth,datetime,ndop00)
|
max_drift,ndepth,datetime,ndop00,idec)
|
||||||
|
|
||||||
! This routine provides an interface between MAP65 and the Q65 decoder
|
! This routine provides an interface between MAP65 and the Q65 decoder
|
||||||
! in WSJT-X. All arguments are input data obtained from the MAP65 GUI.
|
! in WSJT-X. All arguments are input data obtained from the MAP65 GUI.
|
||||||
@ -43,7 +43,10 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
|||||||
ib=nint(ifreq+ntol/df3)
|
ib=nint(ifreq+ntol/df3)
|
||||||
ipk1=maxloc(sync(ia:ib)%ccfmax)
|
ipk1=maxloc(sync(ia:ib)%ccfmax)
|
||||||
ipk=ia+ipk1(1)-1
|
ipk=ia+ipk1(1)-1
|
||||||
|
! f_ipk=ipk*df3
|
||||||
|
ipk2=(1000.0*f0-1.0)/df3
|
||||||
snr1=sync(ipk)%ccfmax
|
snr1=sync(ipk)%ccfmax
|
||||||
|
ipk=ipk2 !Substitute new ipk value
|
||||||
|
|
||||||
nfft1=MAXFFT1
|
nfft1=MAXFFT1
|
||||||
nfft2=MAXFFT2
|
nfft2=MAXFFT2
|
||||||
@ -55,7 +58,6 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
|||||||
endif
|
endif
|
||||||
nh=nfft2/2
|
nh=nfft2/2
|
||||||
f_mouse=1000.0*(fqso+48.0) + mousedf
|
f_mouse=1000.0*(fqso+48.0) + mousedf
|
||||||
f_ipk=ipk*df3
|
|
||||||
k0=nint((ipk*df3-1000.0)/df)
|
k0=nint((ipk*df3-1000.0)/df)
|
||||||
if(nagain.eq.1) k0=nint((f_mouse-1000.0)/df)
|
if(nagain.eq.1) k0=nint((f_mouse-1000.0)/df)
|
||||||
|
|
||||||
@ -132,6 +134,8 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
|||||||
write(12,1130) datetime,trim(result(ndecodes)(5:))
|
write(12,1130) datetime,trim(result(ndecodes)(5:))
|
||||||
1130 format(a11,1x,a)
|
1130 format(a11,1x,a)
|
||||||
result(ndecodes)=trim(result(ndecodes))//char(0)
|
result(ndecodes)=trim(result(ndecodes))//char(0)
|
||||||
|
! print*,'AAA',f_ipk,k0*df,f0,ipk,ipk2,trim(msg0)
|
||||||
|
idec=0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
900 flush(12)
|
900 flush(12)
|
||||||
|
@ -38,10 +38,10 @@ subroutine q65wa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, &
|
|||||||
call getcand2(savg,nts_q65,cand,ncand)
|
call getcand2(savg,nts_q65,cand,ncand)
|
||||||
call timer('get_cand',1)
|
call timer('get_cand',1)
|
||||||
|
|
||||||
do i=1,ncand
|
! do i=1,ncand
|
||||||
write(71,3071) i,cand(i)%f,cand(i)%xdt,cand(i)%snr
|
! write(71,3071) i,cand(i)%f,cand(i)%xdt,cand(i)%snr
|
||||||
3071 format(i2,3f10.3)
|
!3071 format(i2,3f10.3)
|
||||||
enddo
|
! enddo
|
||||||
|
|
||||||
candec=.false.
|
candec=.false.
|
||||||
nwrite_q65=0
|
nwrite_q65=0
|
||||||
@ -65,6 +65,7 @@ subroutine q65wa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, &
|
|||||||
if(candec(icand)) cycle !Skip if already decoded
|
if(candec(icand)) cycle !Skip if already decoded
|
||||||
freq=cand(icand)%f+nkhz_center-48.0-1.27046
|
freq=cand(icand)%f+nkhz_center-48.0-1.27046
|
||||||
ikhz=nint(freq)
|
ikhz=nint(freq)
|
||||||
|
idec=-1
|
||||||
|
|
||||||
! print*,'AAA',icand,nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
! print*,'AAA',icand,nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
||||||
! mycall,hiscall,hisgrid,mode_q65,f0,fqso,newdat, &
|
! mycall,hiscall,hisgrid,mode_q65,f0,fqso,newdat, &
|
||||||
@ -72,9 +73,14 @@ subroutine q65wa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, &
|
|||||||
call timer('q65b ',0)
|
call timer('q65b ',0)
|
||||||
call q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
call q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
||||||
mycall,hiscall,hisgrid,mode_q65,f0,fqso,newdat, &
|
mycall,hiscall,hisgrid,mode_q65,f0,fqso,newdat, &
|
||||||
nagain,max_drift,ndepth,datetime,ndop00)
|
nagain,max_drift,ndepth,datetime,ndop00,idec)
|
||||||
call timer('q65b ',1)
|
call timer('q65b ',1)
|
||||||
if(idec.ge.0) candec(icand)=.true.
|
if(idec.ge.0) candec(icand)=.true.
|
||||||
|
|
||||||
|
write(71,3071) icand,cand(icand)%f,32.0+cand(icand)%f, &
|
||||||
|
cand(icand)%xdt,cand(icand)%snr,idec,ndecodes
|
||||||
|
3071 format(i2,4f10.3,2i5)
|
||||||
|
|
||||||
enddo ! icand
|
enddo ! icand
|
||||||
ndecdone=2
|
ndecdone=2
|
||||||
|
|
||||||
@ -93,8 +99,10 @@ subroutine getcand2(savg0,nts_q65,cand,ncand)
|
|||||||
df=96000.0/NFFT
|
df=96000.0/NFFT
|
||||||
bw=65*nts_q65*1.666666667
|
bw=65*nts_q65*1.666666667
|
||||||
nbw=bw/df + 1
|
nbw=bw/df + 1
|
||||||
smin=140.0
|
smin=70.0
|
||||||
nguard=5
|
nguard=5
|
||||||
|
|
||||||
|
! print*,'aaa',nts_q65,bw
|
||||||
j=0
|
j=0
|
||||||
sync(1:NFFT)%ccfmax=0.
|
sync(1:NFFT)%ccfmax=0.
|
||||||
|
|
||||||
@ -108,7 +116,7 @@ subroutine getcand2(savg0,nts_q65,cand,ncand)
|
|||||||
! write(*,3020) j,fpk,spk
|
! write(*,3020) j,fpk,spk
|
||||||
!3020 format(i3,f12.6,f8.1)
|
!3020 format(i3,f12.6,f8.1)
|
||||||
cand(j)%f=fpk
|
cand(j)%f=fpk
|
||||||
cand(j)%xdt=2.5
|
cand(j)%xdt=2.8
|
||||||
cand(j)%snr=spk
|
cand(j)%snr=spk
|
||||||
cand(j)%iflip=0
|
cand(j)%iflip=0
|
||||||
|
|
||||||
@ -123,7 +131,7 @@ subroutine getcand2(savg0,nts_q65,cand,ncand)
|
|||||||
ncand=j
|
ncand=j
|
||||||
|
|
||||||
do i=1,NFFT
|
do i=1,NFFT
|
||||||
write(72,3072) i,0.001*i*df,savg0(i),savg(i),sync(i)%ccfmax
|
write(72,3072) i,0.001*i*df+32.0,savg0(i),savg(i),sync(i)%ccfmax
|
||||||
3072 format(i6,f15.6,3f15.3)
|
3072 format(i6,f15.6,3f15.3)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ subroutine get_candidates(ss,savg,jz,nfa,nfb,nts_jt65,nts_q65,cand,ncand)
|
|||||||
type(candidate) :: cand(MAX_CANDIDATES)
|
type(candidate) :: cand(MAX_CANDIDATES)
|
||||||
type(candidate) :: cand0(MAX_CANDIDATES)
|
type(candidate) :: cand0(MAX_CANDIDATES)
|
||||||
|
|
||||||
call wb_sync(ss,savg,jz,nfa,nfb) !Output to sync() array
|
call wb_sync(ss,savg,jz,nfa,nfb,nts_q65) !Output to sync() array
|
||||||
|
|
||||||
tstep=2048.0/11025.0 !0.185760 s: 0.5*tsym_jt65, 0.3096*tsym_q65
|
tstep=2048.0/11025.0 !0.185760 s: 0.5*tsym_jt65, 0.3096*tsym_q65
|
||||||
df3=96000.0/NFFT
|
df3=96000.0/NFFT
|
||||||
@ -113,7 +113,7 @@ subroutine get_candidates(ss,savg,jz,nfa,nfb,nts_jt65,nts_q65,cand,ncand)
|
|||||||
return
|
return
|
||||||
end subroutine get_candidates
|
end subroutine get_candidates
|
||||||
|
|
||||||
subroutine wb_sync(ss,savg,jz,nfa,nfb)
|
subroutine wb_sync(ss,savg,jz,nfa,nfb,nts_q65)
|
||||||
|
|
||||||
! Compute "orange sync curve" using the Q65 sync pattern
|
! Compute "orange sync curve" using the Q65 sync pattern
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ subroutine wb_sync(ss,savg,jz,nfa,nfb)
|
|||||||
call pctile(sync(ia:ib)%ccfmax,ib-ia+1,50,base)
|
call pctile(sync(ia:ib)%ccfmax,ib-ia+1,50,base)
|
||||||
sync(ia:ib)%ccfmax=sync(ia:ib)%ccfmax/base
|
sync(ia:ib)%ccfmax=sync(ia:ib)%ccfmax/base
|
||||||
|
|
||||||
bw=65*4*1.66666667 !Q65-60C bandwidth
|
bw=65*nts_q65*1.66666667 !Q65-60x bandwidth
|
||||||
nbw=bw/df3 + 1 !Number of bins to blank
|
nbw=bw/df3 + 1 !Number of bins to blank
|
||||||
syncmin=2.0
|
syncmin=2.0
|
||||||
nguard=10
|
nguard=10
|
||||||
|
Loading…
Reference in New Issue
Block a user