Fix some problems with message averaging, etc., in JT65 with VHF features enabled. Needs further testing!

This commit is contained in:
Joe Taylor 2020-04-08 16:56:28 -04:00
parent 9d2b2b1a56
commit 0390791090
3 changed files with 40 additions and 24 deletions

View File

@ -426,7 +426,7 @@ contains
endif
nap=ishft(ft,-2)
if(nap.ne.0) then
write(cflags(1:3),'(a1,i1)') 'a',nap
write(cflags(1:3),'(a1,2i1)') 'a',nap,nsum
endif
endif
csync='# '

View File

@ -210,13 +210,13 @@ contains
nsave=0
endif
if(bVHF) then
! if(bVHF) then
! Be sure to search for shorthand message at nfqso +/- ntol
if(ncand.lt.300) ncand=ncand+1
ca(ncand)%sync=5.0
ca(ncand)%dt=2.5
ca(ncand)%freq=nfqso
endif
! if(ncand.lt.300) ncand=ncand+1
! ca(ncand)%sync=5.0
! ca(ncand)%dt=2.5
! ca(ncand)%freq=nfqso
! endif
do icand=1,ncand
sync1=ca(icand)%sync
dtx=ca(icand)%dt
@ -242,12 +242,12 @@ contains
if(sync1.lt.float(minsync) .and. &
decoded.eq.' ') nflip=0
if(nft.ne.0) nsum=1
nhard_min=param(1)
nrtt1000=param(4)
ntotal_min=param(5)
nsmo=param(9)
nfreq=nint(freq+a(1))
ndrift=nint(2.0*a(2))
if(bVHF) then
@ -262,9 +262,9 @@ contains
if(nsnr.lt.-30) nsnr=-30
if(nsnr.gt.-1) nsnr=-1
nftt=0
!********* DOES THIS STILL WORK WHEN NFT INCLUDES # OF AP SYMBOLS USED??
if(nft.ne.1 .and. iand(ndepth,16).eq.16 .and. (.not.prtavg)) then
if(nft.ne.1 .and. iand(ndepth,16).eq.16 .and. &
sync1.ge.float(minsync) .and. (.not.prtavg)) then
! Single-sequence FT decode failed, so try for an average FT decode.
if(nutc.ne.nutc0 .or. abs(nfreq-nfreq0).gt.ntol) then
! This is a new minute or a new frequency, so call avg65.
@ -279,7 +279,8 @@ contains
nsmo=param(9)
nqave=int(qave)
if (associated(this%callback) .and. nsum.ge.2) then
if (associated(this%callback) .and.nftt.ge.1 .and. nsum.ge.2) then
! Display a decoded message obtained by averaging 2 or more transmissions
call this%callback(sync1,nsnr,dtx-1.0,nfreq,ndrift, &
nflip,width,avemsg,nftt,nqave,nsmo,nsum,minsync)
prtavg=.true.
@ -288,14 +289,15 @@ contains
endif
endif
if(nftt.eq.1) then
! nft=1
decoded=avemsg
go to 5
endif
if(nftt.eq.0) go to 5
! if(nftt.eq.1) then
!! nft=1
! decoded=avemsg
! go to 5
! endif
n=naggressive
rtt=0.001*nrtt1000
if(nft.lt.2 .and. minsync.ge.0 .and. nspecial.eq.0) then
if(nft.lt.2 .and. minsync.ge.0 .and. nspecial.eq.0 .and. .not.bVHF) then
if(nhard_min.gt.50) cycle
if(nhard_min.gt.h0(n)) cycle
if(ntotal_min.gt.d0(n)) cycle
@ -305,7 +307,8 @@ contains
5 continue
if(decoded.eq.decoded0 .and. abs(freq-freq0).lt. 3.0 .and. &
minsync.ge.0) cycle !Don't display dupes
if(decoded.ne.' ' .or. minsync.lt.0) then
! if(decoded.ne.' ' .or. minsync.lt.0) then
if(decoded.ne.' ' .or. bVHF) then
if(nsubtract.eq.1) then
call timer('subtr65 ',0)
call subtract65(dd,npts,freq,dtx)
@ -319,7 +322,7 @@ contains
exit
endif
enddo
if(ndupe.ne.1 .and. sync1.ge.float(minsync)) then
if(ndupe.ne.1 .and. ((sync1.ge.float(minsync)) .or. bVHF)) then
if(ipass.eq.1) n65a=n65a + 1
if(ipass.eq.2) n65b=n65b + 1
if(ndecoded.lt.50) ndecoded=ndecoded+1
@ -329,7 +332,7 @@ contains
dec(ndecoded)%decoded=decoded
nqual=min(int(qual),9999)
if (associated(this%callback)) then
if(associated(this%callback)) then
call this%callback(sync1,nsnr,dtx-1.0,nfreq,ndrift, &
nflip,width,decoded,nft,nqual,nsmo,1,minsync)
end if
@ -377,12 +380,13 @@ contains
iutc=-1
nfsave=0
dtdiff=0.2
first=.false.
s3save=0.
s1save=0.
nsave=1 !### ???
! Silence compiler warnings
if(nagain .and. ndeepave.eq.-99 .and. neme.eq.-99) stop
first=.false.
! print*,'Clear avg',nutc
endif
do i=1,64
@ -398,7 +402,8 @@ contains
nflipsave(nsave)=nflip
s1save(-255:256,1:126,nsave)=s1
s3save(1:64,1:63,nsave)=s3a
! print*,'nsave:',nsave
10 syncsum=0.
dtsum=0.
nfsum=0

View File

@ -3139,6 +3139,16 @@ void MainWindow::readFromStdout() //readFromStdout
}
if(navg>1 or line_read.indexOf("f*")>0) bAvgMsg=true;
}
if(m_mode=="JT65") {
if(n<0) n=line_read.indexOf("a");
if(n>0) {
int i=line_read.mid(n+1,2).toInt();
// int nap=i/10;
navg=0;
if(i>10) navg=i%10;
if(navg >= 2) bAvgMsg=true;
}
}
}
write_all("Rx",line_read.trimmed());
if (m_config.insert_blank () && m_blankLine && SpecOp::FOX != m_config.special_op_id()) {
@ -3225,7 +3235,8 @@ void MainWindow::readFromStdout() //readFromStdout
if(SpecOp::FOX!=m_config.special_op_id() and (for_us or (abs(audioFreq - m_wideGraph->rxFreq()) <= 10))) bDisplayRight=true;
}
} else {
if(abs(audioFreq - m_wideGraph->rxFreq()) <= 10) bDisplayRight=true;
if((abs(audioFreq - m_wideGraph->rxFreq()) <= 10) and
!m_config.enable_VHF_features()) bDisplayRight=true;
}
if (bDisplayRight) {