mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-09-30 17:16:39 -04:00
Move s3, s3a arrays into qra_loops.
This commit is contained in:
parent
a4ba64a5fa
commit
538b0b91ab
@ -56,10 +56,8 @@ contains
|
|||||||
logical ltext
|
logical ltext
|
||||||
complex, allocatable :: c00(:) !Analytic signal, 6000 Sa/s
|
complex, allocatable :: c00(:) !Analytic signal, 6000 Sa/s
|
||||||
complex, allocatable :: c0(:) !Analytic signal, 6000 Sa/s
|
complex, allocatable :: c0(:) !Analytic signal, 6000 Sa/s
|
||||||
real, allocatable, save :: s3(:,:) !Synchronized symbol spectra
|
|
||||||
real, allocatable, save :: s3a(:,:) !Symbol spectra for avg messages
|
|
||||||
data nc1z/-1/,nc2z/-1/,ng2z/-1/,maxaptypez/-1/,nsubmodez/-1/
|
data nc1z/-1/,nc2z/-1/,ng2z/-1/,maxaptypez/-1/,nsubmodez/-1/
|
||||||
save nc1z,nc2z,ng2z,maxaptypez,nsave,nsubmodez
|
save nc1z,nc2z,ng2z,maxaptypez,nsubmodez
|
||||||
|
|
||||||
mode65=2**nsubmode
|
mode65=2**nsubmode
|
||||||
nfft1=ntrperiod*12000
|
nfft1=ntrperiod*12000
|
||||||
@ -67,13 +65,6 @@ contains
|
|||||||
allocate (c00(0:nfft1-1))
|
allocate (c00(0:nfft1-1))
|
||||||
allocate (c0(0:nfft1-1))
|
allocate (c0(0:nfft1-1))
|
||||||
|
|
||||||
if(nsubmode.ne.nsubmodez) then
|
|
||||||
if(allocated(s3)) deallocate(s3)
|
|
||||||
if(allocated(s3a)) deallocate(s3a)
|
|
||||||
allocate(s3(-64:64*mode65+63,63))
|
|
||||||
allocate(s3a(-64:64*mode65+63,63))
|
|
||||||
endif
|
|
||||||
|
|
||||||
if(ntrperiod.eq.15) then
|
if(ntrperiod.eq.15) then
|
||||||
nsps=1800
|
nsps=1800
|
||||||
else if(ntrperiod.eq.30) then
|
else if(ntrperiod.eq.30) then
|
||||||
@ -85,67 +76,62 @@ contains
|
|||||||
else if(ntrperiod.eq.300) then
|
else if(ntrperiod.eq.300) then
|
||||||
nsps=41472
|
nsps=41472
|
||||||
else
|
else
|
||||||
stop 'Invalid TR period'
|
stop 'Invalid TR period'
|
||||||
endif
|
endif
|
||||||
npts=ntrperiod*12000
|
npts=ntrperiod*12000
|
||||||
baud=12000.0/nsps
|
baud=12000.0/nsps
|
||||||
df1=12000.0/nfft1
|
df1=12000.0/nfft1
|
||||||
this%callback => callback
|
this%callback => callback
|
||||||
if(nutc.eq.-999) print*,lapdx,nfa,nfb,nfqso !Silence warning
|
if(nutc.eq.-999) print*,lapdx,nfa,nfb,nfqso !Silence warning
|
||||||
|
|
||||||
! Prime the QRA decoder for possible use of AP
|
! Prime the QRA decoder for possible use of AP
|
||||||
call packcall(mycall(1:6),nc1,ltext)
|
call packcall(mycall(1:6),nc1,ltext)
|
||||||
call packcall(hiscall(1:6),nc2,ltext)
|
call packcall(hiscall(1:6),nc2,ltext)
|
||||||
call packgrid(hisgrid(1:4),ng2,ltext)
|
call packgrid(hisgrid(1:4),ng2,ltext)
|
||||||
b90=20.0 !8 to 25 is OK; not very critical
|
b90=20.0 !8 to 25 is OK; not very critical
|
||||||
nFadingModel=1
|
nFadingModel=1
|
||||||
|
|
||||||
! AP control could be done differently, but this works well:
|
! AP control could be done differently, but this works well:
|
||||||
maxaptype=0
|
maxaptype=0
|
||||||
if(ndepth.eq.2) maxaptype=3
|
if(ndepth.eq.2) maxaptype=3
|
||||||
if(ndepth.eq.3) maxaptype=5
|
if(ndepth.eq.3) maxaptype=5
|
||||||
|
|
||||||
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
|
||||||
if(naptype.eq.2 .and. maxaptype.eq.4) cycle
|
if(naptype.eq.2 .and. maxaptype.eq.4) cycle
|
||||||
call qra64_dec(s3,nc1,nc2,ng2,naptype,1,nSubmode,b90, &
|
call qra64_dec(s3dummy,nc1,nc2,ng2,naptype,1,nSubmode,b90, &
|
||||||
nFadingModel,dat4,snr2,irc)
|
nFadingModel,dat4,snr2,irc)
|
||||||
enddo
|
enddo
|
||||||
nc1z=nc1
|
nc1z=nc1
|
||||||
nc2z=nc2
|
nc2z=nc2
|
||||||
ng2z=ng2
|
ng2z=ng2
|
||||||
maxaptypez=maxaptype
|
maxaptypez=maxaptype
|
||||||
s3a=0.
|
endif
|
||||||
nsave=0
|
naptype=maxaptype
|
||||||
endif
|
|
||||||
naptype=maxaptype
|
|
||||||
|
|
||||||
call timer('sync_q65',0)
|
call timer('sync_q65',0)
|
||||||
call sync_qra65(iwave,ntrperiod*12000,mode65,nsps,nfqso,ntol,xdt,f0,snr1)
|
call sync_qra65(iwave,ntrperiod*12000,mode65,nsps,nfqso,ntol,xdt,f0,snr1)
|
||||||
call timer('sync_q65',1)
|
call timer('sync_q65',1)
|
||||||
|
|
||||||
jpk0=(xdt+1.0)*6000 !###
|
jpk0=(xdt+1.0)*6000 !###
|
||||||
if(jpk0.lt.0) jpk0=0
|
if(jpk0.lt.0) jpk0=0
|
||||||
|
|
||||||
fac=1.0/32767.0
|
fac=1.0/32767.0
|
||||||
dd=fac*iwave
|
dd=fac*iwave
|
||||||
! npts=648000
|
minsync=-2
|
||||||
minsync=-2
|
nmode=65
|
||||||
nmode=65
|
|
||||||
|
|
||||||
call ana64(dd,npts,c00)
|
call ana64(dd,npts,c00)
|
||||||
|
|
||||||
call timer('qraloops',0)
|
|
||||||
call qra_loops(c00,npts/2,nmode,mode65,nsubmode,nFadingModel,minsync, &
|
|
||||||
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,s3,irc,dat4)
|
|
||||||
if(nmode.eq.65) xdt=xdt+0.4 !### Empirical WHY ??? ###
|
|
||||||
call timer('qraloops',1)
|
|
||||||
|
|
||||||
|
call timer('qraloops',0)
|
||||||
|
call qra_loops(c00,npts/2,nmode,mode65,nsubmode,nFadingModel,minsync, &
|
||||||
|
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,irc,dat4)
|
||||||
|
call timer('qraloops',1)
|
||||||
|
xdt=xdt+0.4 !### Empirical -- WHY ??? ###
|
||||||
|
snr2=snr2 + db(6912.0/nsps)
|
||||||
decoded=' '
|
decoded=' '
|
||||||
if(irc.ge.0) then
|
if(irc.ge.0) then
|
||||||
nsave=0
|
|
||||||
s3a=0.
|
|
||||||
call unpackmsg(dat4,decoded) !Unpack the user message
|
call unpackmsg(dat4,decoded) !Unpack the user message
|
||||||
call fmtmsg(decoded,iz)
|
call fmtmsg(decoded,iz)
|
||||||
if(index(decoded,"000AAA ").ge.1) then
|
if(index(decoded,"000AAA ").ge.1) then
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subroutine qra_loops(c00,npts2,mode,mode64,nsubmode,nFadingModel,minsync, &
|
subroutine qra_loops(c00,npts2,mode,mode64,nsubmode,nFadingModel,minsync, &
|
||||||
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,s3,irc,dat4)
|
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,irc,dat4)
|
||||||
|
|
||||||
use timer_module, only: timer
|
use timer_module, only: timer
|
||||||
parameter (LN=1152*63)
|
parameter (LN=1152*63)
|
||||||
|
Loading…
Reference in New Issue
Block a user