diff options
| author | Iain R. Learmonth <irl@debian.org> | 2015-10-18 18:51:00 +0100 |
|---|---|---|
| committer | Iain R. Learmonth <irl@debian.org> | 2015-10-18 18:51:00 +0100 |
| commit | d63dd8d081a6fcd0715cd13f26df59fb831769d2 (patch) | |
| tree | b9c1f6245147a310aac3762630bad389bbb57335 /lib/jt65a.f90 | |
| parent | c720a3d55c5ec832c29cb7ce50b6fb4b70c55b11 (diff) | |
Imported Upstream version 1.5.0upstream/1.5.0
Diffstat (limited to 'lib/jt65a.f90')
| -rw-r--r-- | lib/jt65a.f90 | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/lib/jt65a.f90 b/lib/jt65a.f90 index 0c061eda..a1578fa9 100644 --- a/lib/jt65a.f90 +++ b/lib/jt65a.f90 @@ -1,18 +1,26 @@ -subroutine jt65a(dd,npts,newdat,nutc,nfa,nfqso,ntol,nagain,ndecoded)
+subroutine jt65a(dd0,npts,newdat,nutc,nf1,nf2,nfqso,ntol,nagain,ndecoded)
! Process dd() data to find and decode JT65 signals.
parameter (NSZ=3413)
parameter (NZMAX=60*12000)
parameter (NFFT=8192)
+ real dd0(NZMAX)
real dd(NZMAX)
real*4 ss(322,NSZ)
real*4 savg(NSZ)
logical done(NSZ)
real a(5)
character decoded*22
+ common/decstats/num65,numbm,numkv,num9,numfano
save
+ dd=0.
+ tskip=2.0
+ nskip=12000*tskip
+ dd(1+nskip:npts+nskip)=dd0(1:npts)
+ npts=npts+nskip
+
if(newdat.ne.0) then
call timer('symsp65 ',0)
call symspec65(dd,npts,ss,nhsym,savg) !Get normalized symbol spectra
@@ -30,8 +38,8 @@ subroutine jt65a(dd,npts,newdat,nutc,nfa,nfqso,ntol,nagain,ndecoded) fa=nfqso - ntol
fb=nfqso + ntol
else !Wideband decode at all freqs
- fa=200
- fb=nfa
+ fa=nf1
+ fb=nf2
endif
ia=max(51,nint(fa/df))
ib=min(NSZ-51,nint(fb/df))
@@ -53,7 +61,7 @@ subroutine jt65a(dd,npts,newdat,nutc,nfa,nfqso,ntol,nagain,ndecoded) nflip=nint(flipk)
call timer('decod65a',0)
- call decode65a(dd,npts,newdat,freq,nflip,mode65,sync2,a,dt, &
+ call decode65a(dd,npts,newdat,nqd,freq,nflip,mode65,sync2,a,dt, &
nbmkv,nhist,decoded)
call timer('decod65a',1)
@@ -68,11 +76,23 @@ subroutine jt65a(dd,npts,newdat,nutc,nfa,nfqso,ntol,nagain,ndecoded) nsnr=nint(s2db)
if(nsnr.lt.-30) nsnr=-30
if(nsnr.gt.-1) nsnr=-1
+ dt=dt-tskip
+ if(nbmkv.eq.1) numbm=numbm+1
+ if(nbmkv.eq.2) numkv=numkv+1
+
+! Serialize writes - see also decjt9.f90
+
+ !$omp critical(decode_results)
+
write(*,1010) nutc,nsnr,dt,nfreq,decoded
1010 format(i4.4,i4,f5.1,i5,1x,'#',1x,a22)
write(13,1012) nutc,nint(sync1),nsnr,dt,float(nfreq),ndrift, &
decoded,nbmkv
1012 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a22,' JT65',i4)
+ call flush(6)
+ call flush(13)
+ !$omp end critical(decode_results)
+
freq0=freq+a(1)
i2=min(NSZ,i+15) !### ??? ###
done(i:i2)=.true.
|
