summaryrefslogtreecommitdiff
path: root/map65/libm65
diff options
context:
space:
mode:
Diffstat (limited to 'map65/libm65')
-rwxr-xr-xmap65/libm65/astrosub.f9012
-rwxr-xr-xmap65/libm65/decode0.f904
-rwxr-xr-xmap65/libm65/ftninit.f901
-rwxr-xr-xmap65/libm65/m65.f906
-rwxr-xr-xmap65/libm65/m65a.f902
-rwxr-xr-xmap65/libm65/map65a.f9016
-rwxr-xr-xmap65/libm65/q65b.f9014
-rwxr-xr-xmap65/libm65/wideband_sync.f9031
8 files changed, 61 insertions, 25 deletions
diff --git a/map65/libm65/astrosub.f90 b/map65/libm65/astrosub.f90
index c1f8b328..5704df57 100755
--- a/map65/libm65/astrosub.f90
+++ b/map65/libm65/astrosub.f90
@@ -12,3 +12,15 @@ subroutine astrosub(nyear,month,nday,uth8,nfreq,mygrid,hisgrid, &
return
end subroutine astrosub
+
+subroutine astrosub00(nyear,month,nday,uth8,nfreq,mygrid,ndop00)
+
+ implicit real*8 (a-h,o-z)
+ character*6 mygrid
+
+ call astrosub(nyear,month,nday,uth8,nfreq,mygrid,mygrid, &
+ AzSun8,ElSun8,AzMoon8,ElMoon8,AzMoonB8,ElMoonB8,ntsky,ndop,ndop00, &
+ RAMoon8,DecMoon8,Dgrd8,poloffset8,xnr8)
+
+ return
+end subroutine astrosub00
diff --git a/map65/libm65/decode0.f90 b/map65/libm65/decode0.f90
index 411e38ed..aa4c83c5 100755
--- a/map65/libm65/decode0.f90
+++ b/map65/libm65/decode0.f90
@@ -12,7 +12,7 @@ subroutine decode0(dd,ss,savg,nstandalone)
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, &
- nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime
+ ndop00,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime
common/early/nhsym1,nhsym2,ldecoded(32768)
common/decodes/ndecodes
data neme0/-99/,mcall3b/1/
@@ -56,7 +56,7 @@ subroutine decode0(dd,ss,savg,nstandalone)
mousedf,mousefqso,nagain,ndecdone,nfshift,ndphi,max_drift, &
nfcal,nkeep,mcall3b,nsum,nsave,nxant,mycall,mygrid, &
neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, &
- ndiskdat,nxpol,nmode)
+ ndiskdat,nxpol,nmode,ndop00)
call timer('map65a ',1)
call timer('decode0 ',1)
diff --git a/map65/libm65/ftninit.f90 b/map65/libm65/ftninit.f90
index ffe35bca..22c03ab8 100755
--- a/map65/libm65/ftninit.f90
+++ b/map65/libm65/ftninit.f90
@@ -10,6 +10,7 @@ subroutine ftninit(appd)
addpfx=' '
call pfxdump(appd//'/prefixes.txt')
+ open(12,file=appd//'/wb_q65.txt',status='unknown')
open(13,file=appd//'/map65.log',status='unknown')
open(19,file=appd//'/livecq.txt',status='unknown')
open(21,file=appd//'/map65_rx.log',status='unknown',access='append',err=950)
diff --git a/map65/libm65/m65.f90 b/map65/libm65/m65.f90
index 2de5bcb3..72768826 100755
--- a/map65/libm65/m65.f90
+++ b/map65/libm65/m65.f90
@@ -7,9 +7,9 @@ program m65
!
! 10 binary input data, *.tf2 files
! 11 prefixes.txt
-! 12
+! 12 wb_w65.txt
! 13 map65.log
-! 14
+! 14
! 15
! 16 tquick log
! 17 saved *.tf2 files
@@ -41,7 +41,7 @@ program m65
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, &
- nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime
+ ndop00,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime
common/early/nhsym1,nhsym2,ldecoded(32768)
nargs=iargc()
diff --git a/map65/libm65/m65a.f90 b/map65/libm65/m65a.f90
index 2135c52f..6a23e90b 100755
--- a/map65/libm65/m65a.f90
+++ b/map65/libm65/m65a.f90
@@ -82,7 +82,7 @@ subroutine m65c(dd,ss,savg,nparams0)
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, &
- nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid, &
+ ndop00,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid, &
datetime,junk1,junk2
common/early/nhsym1,nhsym2,ldecoded(32768)
equivalence (nparams,fcenter)
diff --git a/map65/libm65/map65a.f90 b/map65/libm65/map65a.f90
index e1f31993..e0b47cb9 100755
--- a/map65/libm65/map65a.f90
+++ b/map65/libm65/map65a.f90
@@ -2,7 +2,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
mousedf,mousefqso,nagain,ndecdone,nfshift,ndphi,max_drift, &
nfcal,nkeep,mcall3b,nsum,nsave,nxant,mycall,mygrid, &
neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, &
- ndiskdat,nxpol,nmode)
+ ndiskdat,nxpol,nmode,ndop00)
! Processes timf2 data from Linrad to find and decode JT65 signals.
@@ -41,6 +41,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
data nfile/0/,nutc0/-999/,nid/0/,ip000/1/,ip001/1/,mousefqso0/-999/
save
+ rewind 12
ndecodes=0
! Clean start for Q65 at early decode
@@ -68,11 +69,11 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
endif
!###
! do k=1,ncand
-! freq=cand(k)%f+nkhz_center-48.0-1.27046
+! freq=cand(k)%f+nkhz_center-48.0
! ipk=cand(k)%indx
-! write(*,3010) nutc,k,db(cand(k)%snr),freq,cand(k)%xdt, &
+! write(71,3071) k,db(cand(k)%snr),freq,cand(k)%xdt, &
! cand(k)%ipol,cand(k)%iflip,ipk,ldecoded(ipk)
-!3010 format('=a',i5.4,i5,f8.2,f10.3,f8.2,2i3,i6,L4)
+!3071 format(i3,f8.2,f10.3,f8.2,2i3,i6,L4)
! enddo
!###
@@ -365,7 +366,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
call timer('q65b ',0)
call q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf, &
ntol,xpol,mycall,mygrid, hiscall,hisgrid,mode_q65,f0,fqso, &
- newdat,nagain,max_drift,nhsym,idec)
+ newdat,nagain,max_drift,nhsym,ndop00,idec)
call timer('q65b ',1)
if(idec.ge.0) candec(icand)=.true.
enddo
@@ -376,7 +377,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
call timer('q65b ',0)
call q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf, &
ntol,xpol,mycall,mygrid,hiscall,hisgrid,mode_q65,f0,fqso, &
- newdat,nagain,max_drift,nhsym,idec)
+ newdat,nagain,max_drift,nhsym,ndop00,idec)
call timer('q65b ',1)
endif
endif
@@ -420,7 +421,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
call timer('q65b ',0)
call q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
xpol,mycall,mygrid,hiscall,hisgrid,mode_q65,f0,fqso,newdat, &
- nagain,max_drift,nhsym,idec)
+ nagain,max_drift,nhsym,ndop00,idec)
call timer('q65b ',1)
if(idec.ge.0) candec(icand)=.true.
enddo ! icand
@@ -520,6 +521,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
ndecdone=2
900 close(23)
+ call flush(12)
ndphi=0
mcall3b=mcall3a
diff --git a/map65/libm65/q65b.f90 b/map65/libm65/q65b.f90
index 6e555284..6305e5c0 100755
--- a/map65/libm65/q65b.f90
+++ b/map65/libm65/q65b.f90
@@ -1,6 +1,6 @@
subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
mycall0,mygrid,hiscall0,hisgrid,mode_q65,f0,fqso,newdat,nagain, &
- max_drift,nhsym,idec)
+ max_drift,nhsym,ndop00,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.
@@ -137,10 +137,11 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
nfb=min(2500,1000+ntol)
endif
nsnr0=-99 !Default snr for no decode
+ ndpth=3
! NB: Frequency of ipk is now shifted to 1000 Hz.
call map65_mmdec(nutc,iwave,nqd,nsubmode,nfa,nfb,1000,ntol, &
- newdat,nagain,max_drift,mycall,hiscall,hisgrid)
+ newdat,nagain,max_drift,ndepth,mycall,hiscall0,hisgrid)
MHz=fcenter
freq0=MHz + 0.001d0*ikhz
@@ -181,11 +182,16 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
if(nutc.ne.nutc00 .or. msg0(1:28).ne.msg00 .or. freq1.ne.freq1_00) then
! Write to file map65_rx.log:
ndecodes=ndecodes+1
- write(21,1110) freq1,ndf,xdt0,npol,nsnr0,nutc,msg0(1:28),cq0
-1110 format(f8.3,i5,f5.1,2i4,i5.4,2x,a28,': A',2x,a3)
+ write(21,1110) freq1,ndf,xdt0,npol,nsnr0,nutc,msg0(1:28), &
+ cmode(2:2),cq0
+1110 format(f8.3,i5,f5.1,2i4,i5.4,2x,a28,': ',a1,2x,a3)
nutc00=nutc
msg00=msg0(1:28)
freq1_00=freq1
+ frx=0.001*k0*df+nkhz_center-48.0+1.0 - 0.001*nfcal
+ fsked=frx - 0.001*ndop00/2.0 - 1.5
+ write(12,1120) nutc,fsked,xdt0,nsnr0,trim(msg0)
+1120 format(i4.4,f9.3,f7.2,i5,2x,a,i6)
endif
endif
diff --git a/map65/libm65/wideband_sync.f90 b/map65/libm65/wideband_sync.f90
index 0b6689d1..009b3b00 100755
--- a/map65/libm65/wideband_sync.f90
+++ b/map65/libm65/wideband_sync.f90
@@ -41,7 +41,7 @@ subroutine get_candidates(ss,savg,xpol,jz,nfa,nfb,nts_jt65,nts_q65,cand,ncand)
type(candidate) :: cand(MAX_CANDIDATES)
common/early/nhsym1,nhsym2,ldecoded(32768)
- call wb_sync(ss,savg,xpol,jz,nfa,nfb)
+ call wb_sync(ss,savg,xpol,jz,nfa,nfb) !Output to sync() array
tstep=2048.0/11025.0 !0.185760 s: 0.5*tsym_jt65, 0.3096*tsym_q65
df3=96000.0/NFFT
@@ -89,8 +89,6 @@ subroutine get_candidates(ss,savg,xpol,jz,nfa,nfb,nts_jt65,nts_q65,cand,ncand)
if(diffhz.gt.-0.03*bw .and. diffhz.lt.1.03*bw) skip=.true.
enddo
if(skip) cycle
-! write(*,3301) i,k,m,f0,diffhz,bw,db(snr1)
-!3301 format('=A',3i5,f8.3,2f8.0,f8.2)
k=k+1
cand(k)%snr=snr1
cand(k)%f=f0
@@ -99,6 +97,8 @@ subroutine get_candidates(ss,savg,xpol,jz,nfa,nfb,nts_jt65,nts_q65,cand,ncand)
cand(k)%ipol=sync(n)%ipol
cand(k)%iflip=nint(flip)
cand(k)%indx=n
+! write(50,3050) i,k,m,f0+32.0,diffhz,bw,snr1,db(snr1)
+!3050 format(3i5,f8.3,2f8.0,2f8.2)
if(k.ge.MAX_CANDIDATES) exit
enddo
ncand=k
@@ -251,14 +251,29 @@ subroutine wb_sync(ss,savg,xpol,jz,nfa,nfb)
enddo ! i (frequency bin)
+ call pctile(sync(ia:ib)%ccfmax,ib-ia+1,50,base)
+ sync(ia:ib)%ccfmax=sync(ia:ib)%ccfmax/base
+
+ bw=65*4*1.66666667 !Q65-60C bandwidth
+ nbw=bw/df3 + 1 !Number of bins to blank
+ syncmin=2.0
+ nguard=10
+ do i=ia,ib
+ if(sync(i)%ccfmax.lt.syncmin) cycle
+ spk=maxval(sync(i:i+nbw)%ccfmax)
+ ip =maxloc(sync(i:i+nbw)%ccfmax)
+ i0=ip(1)+i-1
+ ja=min(i,i0-nguard)
+ jb=i0+nbw+nguard
+ sync(ja:jb)%ccfmax=0.
+ sync(i0)%ccfmax=spk
+ enddo
+
! do i=ia,ib
-! write(15,3015) 0.001*(i-1)*df3,sync(i)%ccfmax,sync(i)%xdt,sync(i)%ipol, &
-! sync(i)%iflip,sync(i)%birdie
+! write(15,3015) 0.001*(i-1)*df3+32.0,sync(i)%ccfmax,sync(i)%xdt, &
+! sync(i)%ipol,sync(i)%iflip,sync(i)%birdie
!3015 format(3f10.3,2i6,L5)
! enddo
-
- call pctile(sync(ia:ib)%ccfmax,ib-ia+1,50,base)
- sync(ia:ib)%ccfmax=sync(ia:ib)%ccfmax/base
return
end subroutine wb_sync