Improved version of qra_params() subroutine, for testing.

This commit is contained in:
Joe Taylor 2020-10-16 14:44:13 -04:00
parent 4bf5f23c54
commit 2aa999ba44
3 changed files with 32 additions and 20 deletions

View File

@ -37,7 +37,7 @@ subroutine qra64a(dd,npts,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
nFadingModel=1
maxaptype=4
if(iand(ndepth,64).ne.0) maxaptype=5
call qra_params(ndepth,maxaptype,minsync)
call qra_params(ndepth,maxaptype,idf0max,idt0max,ibwmin,ibwmax)
if(nc1.ne.nc1z .or. nc2.ne.nc2z .or. ng2.ne.ng2z .or. &
maxaptype.ne.maxaptypez) then
do naptype=0,maxaptype
@ -62,7 +62,7 @@ subroutine qra64a(dd,npts,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
if(mode64.eq.1 .and. minsync.ne.-1 .and. (sync-7.0).lt.minsync) go to 900
call timer('qraloops',0)
call qra_loops(c00,npts/2,64,mode64,nsubmode,nFadingModel,minsync, &
call qra_loops(c00,npts/2,64,mode64,nsubmode,nFadingModel, &
ndepth,nc1,nc2,ng2,naptype,jpk0,dtx,f0,width,snr2,irc,dat4)
call timer('qraloops',1)
@ -95,17 +95,32 @@ subroutine qra64a(dd,npts,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
return
end subroutine qra64a
subroutine qra_params(ndepth,maxaptype,minsync)
subroutine qra_params(ndepth,maxaptype,idf0max,idt0max,ibwmin,ibwmax)
! If file qra_params is present in CWD, read decoding params from it.
logical ex
inquire(file='qra_params',exist=ex)
if(ex) then
open(29,file='qra_params',status='old')
read(29,*) ndepth,maxaptype,minsync
close(29)
integer iparam(6)
logical first,ex
data iparam/3,5,11,5,9,9/ !Default values
data first/.true./
save first,iparam
if(first) then
inquire(file='qra_params',exist=ex)
if(ex) then
open(29,file='qra_params',status='old')
read(29,*) iparam
close(29)
endif
write(*,'(6i4)') iparam
first=.false.
endif
ndepth=iparam(1)
maxaptype=iparam(2)
idf0max=iparam(3)
idt0max=iparam(4)
ibwmin=iparam(5)
ibwmax=iparam(6)
return
end subroutine qra_params

View File

@ -97,7 +97,7 @@ contains
! if(ndepth.eq.3) maxaptype=5
if(ndepth.ge.2) maxaptype=5 !###
minsync=-2
call qra_params(ndepth,maxaptype,minsync)
call qra_params(ndepth,maxaptype,idf0max,idt0max,ibwmin,ibwmax)
if(nc1.ne.nc1z .or. nc2.ne.nc2z .or. ng2.ne.ng2z .or. &
maxaptype.ne.maxaptypez) then
@ -127,7 +127,7 @@ contains
call ana64(dd,npts,c00)
call timer('qraloops',0)
call qra_loops(c00,npts/2,nmode,mode65,nsubmode,nFadingModel,minsync, &
call qra_loops(c00,npts/2,nmode,mode65,nsubmode,nFadingModel, &
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,irc,dat4)
call timer('qraloops',1)
xdt=xdt+0.4 !### Empirical -- WHY ??? ###
@ -146,7 +146,7 @@ contains
irc,qual,ntrperiod,fmid,w50)
else
snr2=0.
nsnr=-25
nsnr=-30
!### TEMPORARY? ###
call this%callback(nutc,sync,nsnr,xdt,f0,decoded, &
irc,qual,ntrperiod,fmid,w50)

View File

@ -1,4 +1,4 @@
subroutine qra_loops(c00,npts2,mode,mode64,nsubmode,nFadingModel,minsync, &
subroutine qra_loops(c00,npts2,mode,mode64,nsubmode,nFadingModel, &
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,irc,dat4)
use timer_module, only: timer
@ -15,12 +15,9 @@ subroutine qra_loops(c00,npts2,mode,mode64,nsubmode,nFadingModel,minsync, &
s3lim=20.
ibwmax=11
if(mode64.le.4) ibwmax=9
ibwmin=0
idtmax=5
if(minsync.eq.-2) then
ibwmin=ibwmax
idtmax=3
endif
ibwmin=ibwmax
idtmax=3
call qra_params(ndepth,maxaptype,idf0max,idt0max,ibwmin,ibwmax)
LL=64*(mode64+2)
NN=63
napmin=99