Tweak some QRA65 decoding ideas.

This commit is contained in:
Joe Taylor 2020-10-17 11:19:15 -04:00
parent 8542af30f9
commit 3f68f075e8
4 changed files with 25 additions and 17 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,idf0max,idt0max,ibwmin,ibwmax)
call qra_params(ndepth,maxaptype,idfmax,idtmax,ibwmin,ibwmax)
if(nc1.ne.nc1z .or. nc2.ne.nc2z .or. ng2.ne.ng2z .or. &
maxaptype.ne.maxaptypez) then
do naptype=0,maxaptype
@ -101,7 +101,8 @@ subroutine qra_params(ndepth,maxaptype,idf0max,idt0max,ibwmin,ibwmax)
integer iparam(6)
logical first,ex
data iparam/3,5,11,5,0,9/ !Default values
! data iparam/3,5,11,5,0,9/ !Maximum effort
data iparam/3,5,3,3,7,9/ !Default values
data first/.true./
save first,iparam
@ -112,7 +113,6 @@ subroutine qra_params(ndepth,maxaptype,idf0max,idt0max,ibwmin,ibwmax)
read(29,*) iparam
close(29)
endif
write(*,'(6i4)') iparam
first=.false.
endif
ndepth=iparam(1)

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,idf0max,idt0max,ibwmin,ibwmax)
call qra_params(ndepth,maxaptype,idfmax,idtmax,ibwmin,ibwmax)
if(nc1.ne.nc1z .or. nc2.ne.nc2z .or. ng2.ne.ng2z .or. &
maxaptype.ne.maxaptypez) then

View File

@ -1,8 +1,10 @@
subroutine qra_loops(c00,npts2,mode,mode64,nsubmode,nFadingModel, &
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,irc,dat4)
use packjt
use timer_module, only: timer
parameter (LN=1152*63)
character*37 decoded
complex c00(0:720000) !Analytic representation of dd(), 6000 Hz
complex c0(0:720000) !Ditto, with freq shift
real a(3) !twkfreq params f,f1,f2
@ -17,7 +19,7 @@ subroutine qra_loops(c00,npts2,mode,mode64,nsubmode,nFadingModel, &
if(mode64.le.4) ibwmax=9
ibwmin=ibwmax
idtmax=3
call qra_params(ndepth,maxaptype,idf0max,idt0max,ibwmin,ibwmax)
call qra_params(ndepth,maxaptype,idfmax,idtmax,ibwmin,ibwmax)
LL=64*(mode64+2)
NN=63
napmin=99
@ -25,16 +27,16 @@ subroutine qra_loops(c00,npts2,mode,mode64,nsubmode,nFadingModel, &
nsps=3456 !QRA64
if(mode.eq.65) nsps=3840 !QRA65 ### Is 3840 too big? ###
do idf0=1,11
idf=idf0/2
if(mod(idf0,2).eq.0) idf=-idf
do idf=1,idfmax
ndf=idfn/2
if(mod(idf,2).eq.0) ndf=-ndf
a=0.
a(1)=-(f0+0.868*idf)
a(1)=-(f0+0.868*ndf)
call twkfreq(c00,c0,npts2,6000.0,a)
do idt0=1,idtmax
idt=idt0/2
if(mod(idt0,2).eq.0) idt=-idt
jpk=jpk0 + 750*idt
do idt=1,idtmax
ndt=idt/2
if(mod(idt,2).eq.0) ndt=-ndt
jpk=jpk0 + 750*ndt
if(jpk.lt.0) jpk=0
call spec64(c0,nsps,mode,jpk,s3,LL,NN)
call pctile(s3,LL*NN,40,base)
@ -82,8 +84,14 @@ subroutine qra_loops(c00,npts2,mode,mode64,nsubmode,nFadingModel, &
endif
200 continue
write(53,3053) idt,idf,ibw,irc,b90,xdt,f0,snr2
3053 format(4i5,f7.1,f7.2,2f7.1)
!### For tests only:
if(irc.ge.0) then
open(53,file='fort.53',status='unknown',position='append')
call unpackmsg(dat4,decoded) !Unpack the user message
write(53,3053) idf,idt,ibw,b90,xdt,f0,snr2,irc,decoded(1:22)
3053 format(3i5,f7.1,f7.2,2f7.1,i5,2x,a22)
close(53)
endif
!###
return
end subroutine qra_loops

View File

@ -102,7 +102,7 @@ program test_qra65
if(index(line,'<Decode').eq.1) cycle
read(line(11:20),*) xdt,nf
if(ntrperiod.ge.60) xdt=xdt-0.5 !### TEMPORARY ###
decok=index(line,'W9XYZ').gt.0
decok=index(line,'K1ABC W9XYZ EN37').gt.0
if((abs(xdt-dt).le.dterr .and. abs(nf-nf0).le.nferr) .or. decok) then
nsync=nsync+1
endif