diff --git a/q65w/libq65/CMakeLists.txt b/q65w/libq65/CMakeLists.txt index b5c21ee62..e67b20149 100644 --- a/q65w/libq65/CMakeLists.txt +++ b/q65w/libq65/CMakeLists.txt @@ -1,6 +1,5 @@ set (libq65_FSRCS # Modules come first: -wideband_sync.f90 # Non-module Fortran routines: astro.f90 diff --git a/q65w/libq65/getcand2.f90 b/q65w/libq65/getcand2.f90 index da779e470..1971f54d8 100644 --- a/q65w/libq65/getcand2.f90 +++ b/q65w/libq65/getcand2.f90 @@ -1,6 +1,15 @@ subroutine getcand2(ss,savg0,nts_q65,cand,ncand) - use wideband_sync +! use wideband_sync + + type candidate + real :: snr !Relative S/N of sync detection + real :: f !Freq of sync tone, 0 to 96000 Hz + real :: xdt !DT of matching sync pattern, -1.0 to +4.0 s + end type candidate + + parameter (NFFT=32768) + parameter (MAX_CANDIDATES=50) real ss(322,NFFT) real savg0(NFFT),savg(NFFT) integer ipk1(1) diff --git a/q65w/libq65/q65b.f90 b/q65w/libq65/q65b.f90 index 373e5183a..9c8f330ec 100644 --- a/q65w/libq65/q65b.f90 +++ b/q65w/libq65/q65b.f90 @@ -1,5 +1,5 @@ -subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & - mycall0,hiscall0,hisgrid,mode_q65,f0,fqso,newdat,nagain, & +subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & + mycall0,hiscall0,hisgrid,mode_q65,f0,fqso,nkhz_center, newdat,nagain, & max_drift,ndepth,datetime,ndop00,idec) ! This routine provides an interface between MAP65 and the Q65 decoder @@ -8,7 +8,7 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & ! in common/cacb. Decoded messages are sent back to the GUI on stdout. use q65_decode - use wideband_sync +! use wideband_sync use timer_module, only: timer parameter (MAXFFT1=5376000) !56*96000 diff --git a/q65w/libq65/q65wa.f90 b/q65w/libq65/q65wa.f90 index d9f7d1b10..09b757997 100644 --- a/q65w/libq65/q65wa.f90 +++ b/q65w/libq65/q65wa.f90 @@ -5,9 +5,18 @@ subroutine q65wa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, & ! Processes timf2 data from Linrad to find and decode JT65 and Q65 signals. - use wideband_sync +! use wideband_sync use timer_module, only: timer + type candidate + real :: snr !Relative S/N of sync detection + real :: f !Freq of sync tone, 0 to 96000 Hz + real :: xdt !DT of matching sync pattern, -1.0 to +4.0 s + end type candidate + + parameter (NFFT=32768) + parameter (MAX_CANDIDATES=50) + parameter (MAXMSG=1000) !Size of decoded message list parameter (NSMAX=60*96000) complex cx(NSMAX/64) !Data at 1378.125 samples/s @@ -60,8 +69,8 @@ subroutine q65wa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, & idec=-1 call timer('q65b ',0) - call q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & - mycall,hiscall,hisgrid,mode_q65,f0,fqso,newdat, & + call q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & + mycall,hiscall,hisgrid,mode_q65,f0,fqso,nkhz_center,newdat, & nagain,max_drift,ndepth,datetime,ndop00,idec) call timer('q65b ',1) if(idec.ge.0) candec(icand)=.true. diff --git a/q65w/libq65/synctest.f90 b/q65w/libq65/synctest.f90 deleted file mode 100644 index a710daa13..000000000 --- a/q65w/libq65/synctest.f90 +++ /dev/null @@ -1,57 +0,0 @@ -program synctest - - ! Program to test an algorithm for detecting sync signals for both - ! JT65 and Q65-60x signals and rejecting birdies in MAP65 data. - ! The important work is done in module wideband_sync. - - use timer_module, only: timer - use timer_impl, only: init_timer, fini_timer - use wideband_sync - - real ss(4,322,NFFT),savg(4,NFFT) -! real candidate(MAX_CANDIDATES,5) !snr1,f0,xdt0,ipol,flip - character*8 arg - type(candidate) :: cand(MAX_CANDIDATES) - - nargs=iargc() - if(nargs.ne.5) then - print*,'Usage: synctest iutc nfa nfb nts_jt65 nts_q65' - print*,'Example: synctest 1814 23 83 2 1' - go to 999 - endif - call getarg(1,arg) - read (arg,*) iutc - call getarg(2,arg) - read (arg,*) nfa - call getarg(3,arg) - read (arg,*) nfb - call getarg(4,arg) - read (arg,*) nts_jt65 - call getarg(5,arg) - read (arg,*) nts_q65 - - open(50,file='50.a',form='unformatted',status='old') - do ifile=1,9999 - read(50,end=998) nutc,npol,ss(1:npol,:,:),savg(1:npol,:) - if(nutc.eq.iutc) exit - enddo - close(50) - - call init_timer('timer.out') - call timer('synctest',0) - - call timer('get_cand',0) - call get_candidates(ss,savg,302,.true.,nfa,nfb,nts_jt65,nts_q65,cand,ncand) - call timer('get_cand',1) - - do k=1,ncand - write(*,1010) k,cand(k)%snr,cand(k)%f,cand(k)%f+77,cand(k)%xdt, & - cand(k)%ipol,cand(k)%iflip -1010 format(i3,4f10.3,2i3) - enddo - -998 call timer('synctest',1) - call timer('synctest',101) - call fini_timer() - -999 end program synctest diff --git a/q65w/libq65/wideband_sync.f90 b/q65w/libq65/wideband_sync.f90 deleted file mode 100644 index 45702e653..000000000 --- a/q65w/libq65/wideband_sync.f90 +++ /dev/null @@ -1,14 +0,0 @@ -module wideband_sync - - type candidate - real :: snr !Relative S/N of sync detection - real :: f !Freq of sync tone, 0 to 96000 Hz - real :: xdt !DT of matching sync pattern, -1.0 to +4.0 s - end type candidate - - parameter (NFFT=32768) - parameter (MAX_CANDIDATES=50) - parameter (SNR1_THRESHOLD=4.5) - integer nkhz_center - -end module wideband_sync