diff --git a/q65w/libm65/map65a.f90 b/q65w/libm65/map65a.f90 index 4cc1e26ef..a6bf1bb80 100644 --- a/q65w/libm65/map65a.f90 +++ b/q65w/libm65/map65a.f90 @@ -4,7 +4,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, & ndiskdat,nxpol,nmode,ndop00) -! Processes timf2 data from Linrad to find and decode JT65 signals. +! Processes timf2 data from Linrad to find and decode JT65 and Q65 signals. use wideband_sync use timer_module, only: timer @@ -67,7 +67,6 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & call timer('get_cand',1) candec=.false. endif - print*,'~ncand:',ncand !### ! do k=1,ncand ! freq=cand(k)%f+nkhz_center-48.0 diff --git a/q65w/libm65/wideband_sync.f90 b/q65w/libm65/wideband_sync.f90 index 31a96d2cb..7d6373a14 100644 --- a/q65w/libm65/wideband_sync.f90 +++ b/q65w/libm65/wideband_sync.f90 @@ -39,6 +39,7 @@ subroutine get_candidates(ss,savg,xpol,jz,nfa,nfb,nts_jt65,nts_q65,cand,ncand) integer indx(NFFT) logical xpol,skip,ldecoded type(candidate) :: cand(MAX_CANDIDATES) + type(candidate) :: cand0(MAX_CANDIDATES) common/early/nhsym1,nhsym2,ldecoded(32768) call wb_sync(ss,savg,xpol,jz,nfa,nfb) !Output to sync() array @@ -103,6 +104,13 @@ subroutine get_candidates(ss,savg,xpol,jz,nfa,nfb,nts_jt65,nts_q65,cand,ncand) enddo ncand=k + cand0(1:ncand)=cand(1:ncand) + call indexx(cand0(1:ncand)%f,ncand,indx) !Sort by relative snr + do i=1,ncand + k=indx(i) + cand(i)=cand0(k) + enddo + return end subroutine get_candidates