Experimental implementation of AP decoding for JT65 - configured for testing only. Not usable on the air.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8219 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Steven Franke 2017-11-04 17:03:56 +00:00
parent d78f2dda18
commit 487cebf09c
13 changed files with 74 additions and 42 deletions

View File

@ -41,7 +41,8 @@ extern struct dec_data {
int nsubmode;
bool nagain;
int ndepth;
bool lapon;
bool lft8apon;
bool ljt65apon;
int napwid;
int ntxmode;
int nmode;

View File

@ -1,5 +1,6 @@
subroutine decode65a(dd,npts,newdat,nqd,f0,nflip,mode65,ntrials, &
naggressive,ndepth,ntol,mycall,hiscall,hisgrid,nQSOProgress,nexp_decode, &
naggressive,ndepth,ntol,mycall,hiscall,hisgrid,nQSOProgress, &
ljt65apon, nexp_decode, &
bVHF,sync2,a,dt,nft,nspecial,qual,nhist,nsmo,decoded)
! Apply AFC corrections to a candidate JT65 signal, then decode it.
@ -15,7 +16,7 @@ subroutine decode65a(dd,npts,newdat,nqd,f0,nflip,mode65,ntrials, &
complex c5a(512)
real s2(66,126)
real a(5)
logical bVHF,first
logical bVHF,first,ljt65apon
character decoded*22,decoded_best*22
character mycall*12,hiscall*12,hisgrid*6
character*27 cr
@ -125,7 +126,8 @@ subroutine decode65a(dd,npts,newdat,nqd,f0,nflip,mode65,ntrials, &
nadd=ismo !### ??? ###
call decode65b(s2,nflip,nadd,mode65,ntrials,naggressive,ndepth, &
mycall,hiscall,hisgrid,nQSOProgress,nexp_decode,nqd,nft,qual, &
mycall,hiscall,hisgrid,nQSOProgress,ljt65apon,nexp_decode, &
nqd,nft,qual, &
nhist,decoded)
if(nft.eq.1) then

View File

@ -1,11 +1,12 @@
subroutine decode65b(s2,nflip,nadd,mode65,ntrials,naggressive,ndepth, &
mycall,hiscall,hisgrid,nQSOProgress,nexp_decode,nqd,nft,qual, &
mycall,hiscall,hisgrid,nQSOProgress,ljt65apon,nexp_decode,nqd, &
nft,qual, &
nhist,decoded)
use jt65_mod
real s2(66,126)
real s3(64,63)
logical ltext
logical ltext,ljt65apon
character decoded*22
character mycall*12,hiscall*12,hisgrid*6
save
@ -20,7 +21,8 @@ subroutine decode65b(s2,nflip,nadd,mode65,ntrials,naggressive,ndepth, &
enddo
call extract(s3,nadd,mode65,ntrials,naggressive,ndepth,nflip,mycall, &
hiscall,hisgrid,nQSOProgress,nexp_decode,ncount,nhist,decoded, &
hiscall,hisgrid,nQSOProgress,ljt65apon,nexp_decode,ncount, &
nhist,decoded, &
ltext,nft,qual)
! Suppress "birdie messages" and other garbage decodes:

View File

@ -76,7 +76,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
call my_ft8%decode(ft8_decoded,id2,params%nQSOProgress,params%nfqso, &
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
params%nexp_decode,params%ndepth,logical(params%nagain), &
logical(params%lapon),params%napwid,params%mycall, &
logical(params%lft8apon),params%napwid,params%mycall, &
params%mygrid,params%hiscall,params%hisgrid)
call timer('decft8 ',1)
n15min=minval(n15fox(1:nfox))
@ -177,7 +177,8 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
logical(params%nagain),params%n2pass,logical(params%nrobust), &
ntrials,params%naggressive,params%ndepth,params%emedelay, &
logical(params%nclearave),params%mycall,params%hiscall, &
params%hisgrid,params%nexp_decode,params%nQSOProgress)
params%hisgrid,params%nexp_decode,params%nQSOProgress, &
logical(params%ljt65apon))
call timer('jt65a ',1)
else if(params%nmode.eq.9 .or. (params%nmode.eq.(65+9) .and. params%ntxmode.eq.9)) then
@ -202,7 +203,8 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
logical(params%nagain),params%n2pass,logical(params%nrobust), &
ntrials,params%naggressive,params%ndepth,params%emedelay, &
logical(params%nclearave),params%mycall,params%hiscall, &
params%hisgrid,params%nexp_decode,params%nQSOProgress)
params%hisgrid,params%nexp_decode,params%nQSOProgress, &
logical(params%ljt65apon))
call timer('jt65a ',1)
else
call timer('decjt9 ',0)

View File

@ -1,5 +1,6 @@
subroutine extract(s3,nadd,mode65,ntrials,naggressive,ndepth,nflip, &
mycall_12,hiscall_12,hisgrid,nQSOProgress,nexp_decode,ncount, &
mycall_12,hiscall_12,hisgrid,nQSOProgress,ljt65apon, &
nexp_decode,ncount, &
nhist,decoded,ltext,nft,qual)
! Input:
@ -27,23 +28,30 @@ subroutine extract(s3,nadd,mode65,ntrials,naggressive,ndepth,nflip, &
integer dat4(12)
integer mrsym(63),mr2sym(63),mrprob(63),mr2prob(63)
integer correct(63),tmp(63)
logical ltext
logical ltext,ljt65apon
common/chansyms65/correct
save
if(mode65.eq.-99) stop !Silence compiler warning
mycall=mycall_12(1:6)
hiscall=hiscall_12(1:6)
apmessage=mycall//" "//hiscall//" RRR"
call packmsg(apmessage,apsymbols,itype,.false.)
write(*,*) nQSOProgress
write(*,*) apmessage,itype
write(*,'(12i3)') apsymbols
if(itype.eq.1) then
apsymbols(10:12)=-1
else
apsymbols=-1
endif
apsymbols=-1
if(ljt65apon) then
apmessage=mycall//" "//hiscall//" RRR"
call packmsg(apmessage,apsymbols,itype,.false.)
if(itype.ne.1) then
write(*,*) "Error - problem with apsymbols"
apsymbols=-1
endif
if(nQSOProgress.eq.0) then ! Look for MyCall ??? ??? using APS4
apsymbols(5:12)=-1
elseif(nQSOProgress.ge.1.and.nQSOProgress.le.2) then ! Look for MyCall DxCall ???
apsymbols(10:12)=-1
elseif(nQSOProgress.ge.3) then
continue
endif
endif
qual=0.
nbirdie=20
npct=50

View File

@ -33,7 +33,7 @@ module ft8_decode
contains
subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, &
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lapon,napwid,mycall12, &
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lft8apon,napwid,mycall12, &
mygrid6,hiscall12,hisgrid6)
! use wavhdr
use timer_module, only: timer
@ -46,7 +46,7 @@ contains
real sbase(NH1)
real candidate(3,200)
real dd(15*12000)
logical, intent(in) :: lapon,nagain
logical, intent(in) :: lft8apon,nagain
logical newdat,lsubtract,ldupe,bcontest
character*12 mycall12, hiscall12
character*6 mygrid6,hisgrid6
@ -105,7 +105,7 @@ contains
xbase=10.0**(0.1*(sbase(nint(f1/3.125))-40.0))
nsnr0=min(99,nint(10.0*log10(sync) - 25.5)) !### empirical ###
call timer('ft8b ',0)
call ft8b(dd,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,napwid, &
call ft8b(dd,newdat,nQSOProgress,nfqso,nftx,ndepth,lft8apon,napwid, &
lsubtract,nagain,iaptype,mygrid6,bcontest,sync,f1,xdt,xbase, &
apsym,nharderrors,dmin,nbadcrc,iappass,iera,message,xsnr)
nsnr=nint(xsnr)

View File

@ -9,7 +9,7 @@ program jt65
use readwav
character c,mode
logical :: display_help=.false.,nrobust=.false.,single_decode=.false.
logical :: display_help=.false.,nrobust=.false.,single_decode=.false., ljt65apon=.false.
type(wav_header) :: wav
integer*2 id2(NZMAX)
real*4 dd(NZMAX)
@ -126,7 +126,7 @@ program jt65
dd(npts+1:)=0.
call test(dd,nutc,nfa,nfb,nfqso,ntol,nsubmode, &
n2pass,nrobust,ntrials,naggressive,ndepth, &
mycall,hiscall,hisgrid,nexp_decode,nQSOProgress)
mycall,hiscall,hisgrid,nexp_decode,nQSOProgress,ljt65apon)
! if(nft.gt.0) exit
enddo

View File

@ -37,7 +37,8 @@ contains
subroutine decode(this,callback,dd0,npts,newdat,nutc,nf1,nf2,nfqso, &
ntol,nsubmode,minsync,nagain,n2pass,nrobust,ntrials,naggressive, &
ndepth,emedelay,clearave,mycall,hiscall,hisgrid,nexp_decode,nQSOProgress)
ndepth,emedelay,clearave,mycall,hiscall,hisgrid,nexp_decode, &
nQSOProgress,ljt65apon)
! Process dd0() data to find and decode JT65 signals.
@ -51,8 +52,8 @@ contains
real, intent(in) :: dd0(NZMAX),emedelay
integer, intent(in) :: npts, nutc, nf1, nf2, nfqso, ntol &
, nsubmode, minsync, n2pass, ntrials, naggressive, ndepth &
, nexp_decode
logical, intent(in) :: newdat, nagain, nrobust, clearave
, nexp_decode, nQSOProgress
logical, intent(in) :: newdat, nagain, nrobust, clearave, ljt65apon
character(len=12), intent(in) :: mycall, hiscall
character(len=6), intent(in) :: hisgrid
@ -226,7 +227,7 @@ contains
nspecial=0
call decode65a(dd,npts,first_time,nqd,freq,nflip,mode65,nvec, &
naggressive,ndepth,ntol,mycall,hiscall,hisgrid,nQSOProgress, &
nexp_decode,bVHF,sync2,a,dtx,nft,nspecial,qual, &
ljt65apon,nexp_decode,bVHF,sync2,a,dtx,nft,nspecial,qual, &
nhist,nsmo,decoded)
if(nspecial.eq.2) decoded='RO'
if(nspecial.eq.3) decoded='RRR'

View File

@ -11,7 +11,8 @@ module jt65_test
contains
subroutine test (dd,nutc,nflow,nfhigh,nfqso,ntol,nsubmode,n2pass,nrobust &
,ntrials,naggressive,ndepth,mycall,hiscall,hisgrid,nexp_decode,nQSOProgress)
,ntrials,naggressive,ndepth,mycall,hiscall,hisgrid,nexp_decode, &
nQSOProgress,ljt65apon)
use timer_module, only: timer
use jt65_decode
implicit none
@ -20,7 +21,7 @@ contains
real, intent(in) :: dd(NZMAX)
integer, intent(in) :: nutc, nflow, nfhigh, nfqso, ntol, nsubmode, n2pass &
, ntrials, naggressive, ndepth, nexp_decode, nQSOProgress
logical, intent(in) :: nrobust
logical, intent(in) :: nrobust,ljt65apon
character(len=12), intent(in) :: mycall, hiscall
character(len=6), intent(in) :: hisgrid
type(jt65_decoder) :: my_decoder
@ -34,7 +35,7 @@ contains
nrobust=nrobust,ntrials=ntrials,naggressive=naggressive, &
ndepth=ndepth,emedelay=0.0,clearave=nclearave,mycall=mycall, &
hiscall=hiscall,hisgrid=hisgrid,nexp_decode=nexp_decode, &
nQSOProgress=nQSOProgress)
nQSOProgress=nQSOProgress,ljt65apon=ljt65apon)
call timer('jt65a ',1)
end subroutine test

View File

@ -260,7 +260,8 @@ program jt9
shared_data%params%kin=64800
shared_data%params%nzhsym=181
shared_data%params%ndepth=ndepth
shared_data%params%lapon=.true.
shared_data%params%lft8apon=.true.
shared_data%params%ljt65apon=.true.
shared_data%params%napwid=75
shared_data%params%dttol=3.

View File

@ -23,7 +23,8 @@
integer(c_int) :: nsubmode
logical(c_bool) :: nagain
integer(c_int) :: ndepth
logical(c_bool) :: lapon
logical(c_bool) :: lft8apon
logical(c_bool) :: ljt65apon
integer(c_int) :: napwid
integer(c_int) :: ntxmode
integer(c_int) :: nmode

View File

@ -1026,7 +1026,8 @@ void MainWindow::writeSettings()
m_settings->setValue ("CQTxfreq", ui->sbCQTxFreq->value ());
m_settings->setValue("pwrBandTxMemory",m_pwrBandTxMemory);
m_settings->setValue("pwrBandTuneMemory",m_pwrBandTuneMemory);
m_settings->setValue ("FT8AP", ui->actionEnable_AP->isChecked ());
m_settings->setValue ("FT8AP", ui->actionEnable_AP_FT8->isChecked ());
m_settings->setValue ("JT65AP", ui->actionEnable_AP_JT65->isChecked ());
{
QList<QVariant> coeffs; // suitable for QSettings
for (auto const& coeff : m_phaseEqCoefficients)
@ -1106,7 +1107,8 @@ void MainWindow::readSettings()
m_holdTxFreq=m_settings->value("HoldTxFreq",false).toBool();
m_pwrBandTxMemory=m_settings->value("pwrBandTxMemory").toHash();
m_pwrBandTuneMemory=m_settings->value("pwrBandTuneMemory").toHash();
ui->actionEnable_AP->setChecked (m_settings->value ("FT8AP", false).toBool());
ui->actionEnable_AP_FT8->setChecked (m_settings->value ("FT8AP", false).toBool());
ui->actionEnable_AP_JT65->setChecked (m_settings->value ("JT65AP", false).toBool());
{
auto const& coeffs = m_settings->value ("PhaseEqualizationCoefficients"
, QList<QVariant> {0., 0., 0., 0., 0.}).toList ();
@ -2568,6 +2570,7 @@ void MainWindow::decode() //decode()
if(m_modeTx=="JT65") dec_data.params.ntxmode=65;
dec_data.params.nmode=9;
if(m_mode=="JT65") dec_data.params.nmode=65;
if(m_mode=="JT65") dec_data.params.ljt65apon = ui->actionEnable_AP_JT65->isVisible () && ui->actionEnable_AP_JT65->isChecked ();
if(m_mode=="QRA64") dec_data.params.nmode=164;
if(m_mode=="QRA64") dec_data.params.ntxmode=164;
if(m_mode=="JT9+JT65") dec_data.params.nmode=9+65; // = 74
@ -2576,7 +2579,7 @@ void MainWindow::decode() //decode()
dec_data.params.ntxmode=4;
}
if(m_mode=="FT8") dec_data.params.nmode=8;
if(m_mode=="FT8") dec_data.params.lapon = ui->actionEnable_AP->isVisible () && ui->actionEnable_AP->isChecked ();
if(m_mode=="FT8") dec_data.params.lft8apon = ui->actionEnable_AP_FT8->isVisible () && ui->actionEnable_AP_FT8->isChecked ();
if(m_mode=="FT8") dec_data.params.napwid=50;
dec_data.params.ntrperiod=m_TRperiod;
dec_data.params.nsubmode=m_nSubMode;
@ -4764,7 +4767,8 @@ void MainWindow::displayWidgets(int n)
j=j>>1;
}
ui->cbFirst->setVisible ("FT8" == m_mode);
ui->actionEnable_AP->setVisible ("FT8" == m_mode);
ui->actionEnable_AP_FT8->setVisible ("FT8" == m_mode);
ui->actionEnable_AP_JT65->setVisible ("JT65" == m_mode);
ui->cbVHFcontest->setVisible(m_mode=="FT8" or m_mode=="MSK144");
ui->measure_check_box->setChecked (false);
ui->measure_check_box->setVisible ("FreqCal" == m_mode);

View File

@ -2356,7 +2356,8 @@ QPushButton[state=&quot;ok&quot;] {
<addaction name="separator"/>
<addaction name="actionInclude_averaging"/>
<addaction name="actionInclude_correlation"/>
<addaction name="actionEnable_AP"/>
<addaction name="actionEnable_AP_FT8"/>
<addaction name="actionEnable_AP_JT65"/>
<addaction name="actionEnable_AP_DXcall"/>
</widget>
<widget class="QMenu" name="menuSave">
@ -2959,7 +2960,15 @@ QPushButton[state=&quot;ok&quot;] {
<string>FT8</string>
</property>
</action>
<action name="actionEnable_AP">
<action name="actionEnable_AP_FT8">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Enable AP</string>
</property>
</action>
<action name="actionEnable_AP_JT65">
<property name="checkable">
<bool>true</bool>
</property>