Delimit the times at which 60s and 30s decode attempts are made.

This commit is contained in:
Joe Taylor 2024-01-01 13:56:39 -05:00
parent 5cc82189e6
commit 7276e86e60
4 changed files with 61 additions and 47 deletions

View File

@ -6,7 +6,7 @@ set (libq65_FSRCS
astro0.f90
astrosub.f90
cfom.f90
chkstat.f90
# chkstat.f90
dcoord.f90
decode0.f90
dot.f90

View File

@ -1,4 +1,5 @@
subroutine getcand2(ss,savg0,nts_q65,nagain,ntol,f0_selected,bAlso30,cand,ncand)
subroutine getcand2(ss,savg0,nts_q65,nagain,nhsym,ntol,f0_selected, &
bAlso30,cand,ncand)
! Get candidates for Q65 decodes, based on presence of sync tone.
@ -53,58 +54,61 @@ subroutine getcand2(ss,savg0,nts_q65,nagain,ntol,f0_selected,bAlso30,cand,ncand)
! Check to see if sync tone is present.
ntrperiod=60
iseq=0
call q65_sync(ss,i0,nts_q65,ntrperiod,iseq,sync_ok,snr_sync,xdt)
if(sync_ok) then
if(nhsym.ge.200) then
call q65_sync(ss,i0,nts_q65,ntrperiod,iseq,sync_ok,snr_sync,xdt)
if(sync_ok) then
! Sync tone is present, we have a candidate for decoding
j=j+1
cand(j)%f=fpk
cand(j)%xdt=xdt
cand(j)%snr=snr_sync
cand(j)%ntrperiod=ntrperiod
cand(j)%iseq=iseq
ia=max(1,min(i,i0-nguard))
ib=min(i0+nbw+nguard,32768)
savg(ia:ib)=0.
! write(*,3301) j,fpk+80-48,xdt,snr_sync,ntrperiod,iseq
3301 format(i3,f10.3,f8.2,f8.1,2i5)
if(j.ge.MAX_CANDIDATES) exit
j=j+1
cand(j)%f=fpk
cand(j)%xdt=xdt
cand(j)%snr=snr_sync
cand(j)%ntrperiod=ntrperiod
cand(j)%iseq=iseq
ia=max(1,min(i,i0-nguard))
ib=min(i0+nbw+nguard,32768)
savg(ia:ib)=0.
if(j.ge.MAX_CANDIDATES) exit
endif
endif
if(.not.bAlso30) cycle
ntrperiod=30
call q65_sync(ss,i0,nts_q65,ntrperiod,iseq,sync_ok,snr_sync,xdt)
if(sync_ok) then
if(nhsym.le.200) then
call q65_sync(ss,i0,nts_q65,ntrperiod,iseq,sync_ok,snr_sync,xdt)
if(sync_ok) then
! Sync tone is present, we have a candidate for decoding
j=j+1
cand(j)%f=fpk
cand(j)%xdt=xdt
cand(j)%snr=snr_sync
cand(j)%ntrperiod=ntrperiod
cand(j)%iseq=iseq
ia=max(1,min(i,i0-nguard))
ib=min(i0+nbw+nguard,32768)
savg(ia:ib)=0.
! write(*,3301) j,fpk+80-48,xdt,snr_sync,ntrperiod,iseq
if(j.ge.MAX_CANDIDATES) exit
j=j+1
cand(j)%f=fpk
cand(j)%xdt=xdt
cand(j)%snr=snr_sync
cand(j)%ntrperiod=ntrperiod
cand(j)%iseq=iseq
ia=max(1,min(i,i0-nguard))
ib=min(i0+nbw+nguard,32768)
savg(ia:ib)=0.
if(j.ge.MAX_CANDIDATES) exit
endif
endif
iseq=1
call q65_sync(ss,i0,nts_q65,ntrperiod,iseq,sync_ok,snr_sync,xdt)
if(sync_ok) then
if(nhsym.ge.330) then
call q65_sync(ss,i0,nts_q65,ntrperiod,iseq,sync_ok,snr_sync,xdt)
if(sync_ok) then
! Sync tone is present, we have a candidate for decoding
j=j+1
cand(j)%f=fpk
cand(j)%xdt=xdt
cand(j)%snr=snr_sync
cand(j)%ntrperiod=ntrperiod
cand(j)%iseq=iseq
ia=max(1,min(i,i0-nguard))
ib=min(i0+nbw+nguard,32768)
savg(ia:ib)=0.
! write(*,3301) j,fpk+80-48,xdt,snr_sync,ntrperiod,iseq
if(j.ge.MAX_CANDIDATES) exit
j=j+1
cand(j)%f=fpk
cand(j)%xdt=xdt
cand(j)%snr=snr_sync
cand(j)%ntrperiod=ntrperiod
cand(j)%iseq=iseq
ia=max(1,min(i,i0-nguard))
ib=min(i0+nbw+nguard,32768)
savg(ia:ib)=0.
if(j.ge.MAX_CANDIDATES) exit
endif
endif
enddo
ncand=j !Total number of candidates found

View File

@ -41,11 +41,20 @@ subroutine q65c(itimer)
npatience=1
newdat=1 !Always on ??
call chkstat(dd,nhsym,bSkip)
if(bSkip .and. nagain.eq.0) then
print*,'A',nhsym,ntx30a,ntx30b,ntx60,junk1,junk2,bAlso30
return
if(ntx30a.gt.5) then
dd(1:2,1:30*96000)=0.
ss(1:200,1:NFFT)=0.
endif
if(ntx30b.gt.5) then
dd(1:2,30*96000+1:60*96000)=0.
ss(201:400,1:NFFT)=0.
endif
! call chkstat(dd,nhsym,bSkip)
! if(bSkip .and. nagain.eq.0) then
! print*,'A',nhsym,ntx30a,ntx30b,ntx60,junk1,junk2,bAlso30
! return
! endif
call timer('decode0 ',0)
call decode0(dd,ss,savg)

View File

@ -44,7 +44,8 @@ subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, &
call timer('get_cand',0)
! Get a list of decoding candidates
call getcand2(ss,savg,nts_q65,nagain,ntol,f0_selected,bAlso30,cand,ncand)
call getcand2(ss,savg,nts_q65,nagain,nhsym,ntol,f0_selected,bAlso30, &
cand,ncand)
call timer('get_cand',1)
nwrite_q65=0