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 nFadingModel=1
maxaptype=4 maxaptype=4
if(iand(ndepth,64).ne.0) maxaptype=5 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. & if(nc1.ne.nc1z .or. nc2.ne.nc2z .or. ng2.ne.ng2z .or. &
maxaptype.ne.maxaptypez) then maxaptype.ne.maxaptypez) then
do naptype=0,maxaptype do naptype=0,maxaptype
@ -101,7 +101,8 @@ subroutine qra_params(ndepth,maxaptype,idf0max,idt0max,ibwmin,ibwmax)
integer iparam(6) integer iparam(6)
logical first,ex 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./ data first/.true./
save first,iparam save first,iparam
@ -112,7 +113,6 @@ subroutine qra_params(ndepth,maxaptype,idf0max,idt0max,ibwmin,ibwmax)
read(29,*) iparam read(29,*) iparam
close(29) close(29)
endif endif
write(*,'(6i4)') iparam
first=.false. first=.false.
endif endif
ndepth=iparam(1) ndepth=iparam(1)

View File

@ -97,7 +97,7 @@ contains
! if(ndepth.eq.3) maxaptype=5 ! if(ndepth.eq.3) maxaptype=5
if(ndepth.ge.2) maxaptype=5 !### if(ndepth.ge.2) maxaptype=5 !###
minsync=-2 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. & if(nc1.ne.nc1z .or. nc2.ne.nc2z .or. ng2.ne.ng2z .or. &
maxaptype.ne.maxaptypez) then maxaptype.ne.maxaptypez) then

View File

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

View File

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