Pass naggressive to fast_decode(). Display <...> messages only if naggressive>0.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6463 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-02-03 20:23:52 +00:00
parent be26c48f91
commit 95a3c00eda
6 changed files with 15 additions and 46 deletions

View File

@ -4,7 +4,7 @@ subroutine fast9(id2,narg,line)
parameter (NMAX=30*12000,NSAVE=500)
integer*2 id2(0:NMAX)
integer narg(0:13)
integer narg(0:14)
integer*1 i1SoftSymbols(207)
integer*1 i1save(207,NSAVE)
integer indx(NSAVE)

View File

@ -2,7 +2,7 @@ subroutine fast_decode(id2,narg,line)
parameter (NMAX=30*12000)
integer*2 id2(NMAX)
integer narg(0:13)
integer narg(0:14)
real dat(30*12000)
complex cdat(262145),cdat2(262145)
real psavg(450)

View File

@ -2,7 +2,7 @@ program jtmsk
parameter (NMAX=359424)
integer*2 id2(NMAX)
integer narg(0:13)
integer narg(0:14)
character*6 mycall,hiscall
character*22 msg,arg*8
character*80 line(100)

View File

@ -12,7 +12,7 @@ subroutine jtmsk_decode(id2,narg,line)
complex c(NFFTMAX) !Complex (analytic) data
complex cdat(24000) !Short segments, up to 2 s
complex cdat2(24000)
integer narg(0:13) !Arguments passed from calling pgm
integer narg(0:14) !Arguments passed from calling pgm
character*22 msg,msg0 !Decoded message
character*80 line(100) !Decodes passed back to caller
@ -29,6 +29,7 @@ subroutine jtmsk_decode(id2,narg,line)
nrxfreq=narg(10) !Target Rx audio frequency (Hz)
ntol=narg(11) !Search range, +/- ntol (Hz)
nhashcalls=narg(12)
naggressive=narg(14)
nsnr0=-99
nline=0
line(1:100)(1:1)=char(0)
@ -67,19 +68,18 @@ subroutine jtmsk_decode(id2,narg,line)
fpk=idf1 + nrxfreq
call tweak1(cdat2,iz,1500.0-fpk,cdat)
call syncmsk(cdat,iz,jpk,ipk,idf,rmax,snr,metric,msg)
freq=fpk+idf
if(metric.eq.-9999) cycle !No output if no significant sync
t0=(ia+jpk)/12000.0
nsnr=nint(yellow(n)-2.0)
if(msg.eq.' ') then
call jtmsk_short(cdat,iz,narg,tbest,idfpk,msg)
endif
if(msg.ne.' ') then
if(msg(1:1).eq.' ') call jtmsk_short(cdat,iz,narg,tbest,idfpk,msg)
if(index(msg,'<').eq.1 .and. naggressive.eq.0 .and. &
narg(13).ne.narg(12)) msg=' '
if(msg(1:1).ne.' ') then
if(msg.ne.msg0) then
nline=nline+1
nsnr0=-99
endif
freq=fpk+idf
t0=(ia+jpk)/12000.0
nsnr=nint(yellow(n)-4.0)
if(nsnr.gt.nsnr0 .and. nline.gt.0) then
call rectify_msk(cdat2(jpk:jpk+NSPM-1),msg,freq2)
write(line(nline),1020) nutc,nsnr,t0,nint(freq2),msg
@ -94,21 +94,6 @@ subroutine jtmsk_decode(id2,narg,line)
enddo
900 continue
nline=1
if(nline.eq.0) then
msg=' '
call jtmsk_short(c,npts,narg,tbest,idfpk,msg)
!### Needs work!
if(msg.ne.' ') then
nline=nline+1
j=nint(12000.0*tbest/512.0)
nsnr=nint(3*(yellow(j)-2.0))
write(line(nline),1020) nutc,nsnr,tbest,nrxfreq+idfpk,msg
endif
!###
endif
if(line(1)(1:6).eq.' ') line(1)(1:1)=char(0)
return

View File

@ -17,7 +17,7 @@ subroutine jtmsk_short(cdat,npts,narg,tbest,idfpk,decoded)
integer itone(234) !Message bits
integer jgood(NSAVE)
integer indx(NSAVE)
integer narg(0:13)
integer narg(0:14)
logical first
data rpt /'26 ','27 ','28 ','R26','R27','R28','RRR','73 '/
data first/.true./,nrxfreq0/-1/,ttot/0.0/
@ -63,7 +63,6 @@ subroutine jtmsk_short(cdat,npts,narg,tbest,idfpk,decoded)
maxdecodes=999
r1max=0.
! call timer('r1 ',0)
do j=0,npts-210 !Find the B11 sync vectors
z1=0.
ss=0.
@ -78,7 +77,6 @@ subroutine jtmsk_short(cdat,npts,narg,tbest,idfpk,decoded)
jpk=j
endif
enddo
! call timer('r1 ',1)
k=0
do j=1,npts-211
@ -96,7 +94,6 @@ subroutine jtmsk_short(cdat,npts,narg,tbest,idfpk,decoded)
ibest2=-1
idfbest=0
u1best=0.
! call timer('kk ',0)
do kk=1,min(kmax,10)
k=indx(kmax+1-kk)
j=jgood(k)
@ -136,16 +133,11 @@ subroutine jtmsk_short(cdat,npts,narg,tbest,idfpk,decoded)
t2=t
n=0
if(imsg.eq.2296 .or. imsg.eq.2302) n=1
! write(51,3101) t,kk,nrxfreq+idf,ibest,n, &
! r1(j),u1,u2,u2/u1,r1(j)/r2max,idf
! flush(51)
endif
enddo
enddo
r1_r2=r1(j)/r2max
! write(*,3101) t2,kk,nrxfreq+idfpk,ibest,0, &
! r1(j),u1,u2,u2/u1,r1(j)/r2max,idfpk
if(u1.ge.0.71 .and. u2/u1.lt.0.91 .and. r1_r2.lt.1.3) then
if(u1.gt.u1best) then
irpt=iand(ibest,7)
@ -163,16 +155,7 @@ subroutine jtmsk_short(cdat,npts,narg,tbest,idfpk,decoded)
if(ihash.eq.narg(12) .and. iand(ibest2,7).eq.0) nn=1
endif
endif
! if(r1best.gt.0.0) write(*,3101) tbest,kk,nrxfreq+idfbest,ibest,nn, &
! r1best,u1best,u2best,u2best/u1best,r1_r2best,idfbest
enddo
! call timer('kk ',1)
! if(r1best.gt.0.0) then
! write(*,3101) tbest,kk,nrxfreq+idfbest,ibest,nn,r1best,u1best,u2best, &
! u2best/u1best,r1_r2best,idfbest
!3101 format(f6.2,4i5,5f8.2,i6)
! endif
return
end subroutine jtmsk_short

View File

@ -116,7 +116,7 @@ float fast_s[44992]; //44992=64*703
float fast_s2[44992];
int fast_jh;
int fast_jh2;
int narg[14];
int narg[15];
QVector<QColor> g_ColorTbl;
namespace
@ -1884,6 +1884,7 @@ void MainWindow::decode() //decode()
m_calls="<" + m_config.my_callsign() + " " + hisCall + ">";
hash_calls_(m_calls.toLatin1().data(), &narg[12], m_calls.length());
narg[13]=-1;
narg[14]=m_config.aggressive();
memcpy(d2b,dec_data.d2,2*360000);
*future3 = QtConcurrent::run(fast_decode_,&d2b[0],&narg[0],&m_msg[0][0],80);
watcher3->setFuture(*future3);