diff --git a/lib/decode4.f90 b/lib/decode4.f90 index 33913df06..e0596ed10 100644 --- a/lib/decode4.f90 +++ b/lib/decode4.f90 @@ -93,7 +93,8 @@ subroutine decode4(dat,npts,dtx,nfreq,flip,mode4,ndepth,neme,minw, & endif qual=0. !Now try deep search - if(ndepth.ge.1) then +! if(ndepth.ge.1) then + if(iand(ndepth,32).eq.32) then call deep4(sym(2),neme,flip,mycall,hiscall,hisgrid,deepmsg,qual) if(qual.gt.qbest) then qbest=qual diff --git a/lib/decoder.f90 b/lib/decoder.f90 index 279113e8f..5d475492c 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -221,7 +221,7 @@ contains integer, intent(in) :: nsubmode integer, intent(in) :: naggressive - integer nft,nsmo2,nsum2 + integer nft,nsmo2,nsum2,n character*3 ctail character*36 c data c/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'/ @@ -235,9 +235,10 @@ contains else ctail=' ' if(naggressive.gt.0 .and. ft.gt.0) then - ctail(1:1)='h' + ctail(1:1)='d' if(ft.eq.1) ctail(1:1)='f' - ctail(2:2)=c(nsum+1:nsum+1) + n=max(2,nsum+1) + ctail(2:2)=c(n:n) if(nsubmode.gt.0) ctail(3:3)=c(nsmo+1:nsmo+1) endif write(*,1010) utc,snr,dt,freq,'#',decoded,ctail diff --git a/lib/extract.f90 b/lib/extract.f90 index 6bb8f44b5..d3f4d5463 100644 --- a/lib/extract.f90 +++ b/lib/extract.f90 @@ -90,7 +90,7 @@ subroutine extract(s3,nadd,mode65,ntrials,naggressive,ndepth,mycall_12, & endif if(ntotal.le.nd0 .and. rtt.le.r0) nft=1 - if(nft.eq.0 .and. (ndepth.ge.5 .or. iand(nexp_decode,31).ne.0)) then + if(nft.eq.0 .and. iand(ndepth,32).eq.32) then flip=1.0 qmin=1.0 call timer('hint65 ',0) diff --git a/lib/fer65.f90 b/lib/fer65.f90 index 1b2222bd7..8289167f0 100644 --- a/lib/fer65.f90 +++ b/lib/fer65.f90 @@ -49,7 +49,7 @@ program fer65 ntrials=1000 naggressive=10 nfiles=1 - if(ndepth.eq.4) nfiles=4 + if(iand(ndepth,16).eq.16) nfiles=16 open(20,file='fer65.20',status='unknown') open(21,file='fer65.21',status='unknown') @@ -92,9 +92,9 @@ program fer65 nfreq=0 ndrift=0 nwidth=0 - cmnd='./jt65 -m A -a 10 -c K1ABC -f 1500 -n 1000 -d 5 -s -X 32 000000_????.wav > decoded.txt' + cmnd='./jt65 -m A -a 10 -c K1ABC -f 1500 -n 1000 -d 5 -s -X 32 000000_????.wav > decoded.txt' cmnd(11:11)=submode - write(cmnd(47:47),'(i1)') ndepth + write(cmnd(47:48),'(i2)') ndepth call system(cmnd) open(13,file='fort.13',status='old',err=20) do i=1,nfiles diff --git a/lib/jt4_decode.f90 b/lib/jt4_decode.f90 index 256aad4b9..b2ee5032d 100644 --- a/lib/jt4_decode.f90 +++ b/lib/jt4_decode.f90 @@ -425,7 +425,8 @@ contains qave=0. ! Possibly should pass nadd=nused, also ? - if(ndepth.ge.3) then +! if(ndepth.ge.3) then + if(iand(ndepth,32).eq.32) then flipx=1.0 !Normal flip not relevant for ave msg qbest=0. do k=ich1,ich2 diff --git a/lib/jt65.f90 b/lib/jt65.f90 index d3c51cba5..54e9142d3 100644 --- a/lib/jt65.f90 +++ b/lib/jt65.f90 @@ -42,7 +42,7 @@ program jt65 nlow=200 nhigh=4000 n2pass=2 - ndepth=0 + ndepth=3 do call getopt('a:d:f:hm:n:rc:x:g:X:s',long_options,c,optarg,narglen,nstat,noffset,nremain,.true.) diff --git a/lib/jt65_decode.f90 b/lib/jt65_decode.f90 index d89e73059..7ea3ca00f 100644 --- a/lib/jt65_decode.f90 +++ b/lib/jt65_decode.f90 @@ -211,8 +211,9 @@ contains nsnr=nint(s2db) if(nsnr.lt.-30) nsnr=-30 if(nsnr.gt.-1) nsnr=-1 + nftt=0 - if(nft.ne.1 .and. ndepth.ge.4 .and. (.not.prtavg)) then + if(nft.ne.1 .and. iand(ndepth,16).eq.16 .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. @@ -326,9 +327,9 @@ contains dtdiff=0.2 first=.false. s3b=0. + s3save=0. nsave=1 !### ??? endif - nclearave=0 do i=1,64 if(nutc.eq.iutc(i) .and. abs(nhz-nfsave(i)).le.ntol) go to 10 diff --git a/lib/jt9_decode.f90 b/lib/jt9_decode.f90 index 2704b4364..7d622ffa5 100644 --- a/lib/jt9_decode.f90 +++ b/lib/jt9_decode.f90 @@ -75,11 +75,11 @@ contains ccflim=3.0 red2lim=1.6 schklim=2.2 - if(ndepth.eq.2) then + if(iand(ndepth,7).eq.2) then limit=10000 ccflim=2.7 endif - if(ndepth.ge.3 .or. nqd.eq.1) then + if(iand(ndepth,7).eq.3 .or. nqd.eq.1) then limit=30000 ccflim=2.5 schklim=2.0 diff --git a/mainwindow.cpp b/mainwindow.cpp index 325a54092..0f651cacf 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -330,8 +330,8 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme ui->actionQuickDecode->setActionGroup(DepthGroup); ui->actionMediumDecode->setActionGroup(DepthGroup); ui->actionDeepestDecode->setActionGroup(DepthGroup); - ui->actionInclude_averaging->setActionGroup(DepthGroup); - ui->actionInclude_correlation->setActionGroup(DepthGroup); +// ui->actionInclude_averaging->setActionGroup(DepthGroup); +// ui->actionInclude_correlation->setActionGroup(DepthGroup); connect (ui->download_samples_action, &QAction::triggered, [this, network_manager] () { if (!m_sampleDownloader) @@ -384,10 +384,8 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme ui->bandComboBox->view ()->setMinimumWidth (ui->bandComboBox->view ()->sizeHintForColumn (FrequencyList::frequency_mhz_column)); // Enable live band combo box entry validation and action. - auto band_validator = new LiveFrequencyValidator {ui->bandComboBox - , m_config.bands () - , m_config.frequencies () - , this}; + auto band_validator = new LiveFrequencyValidator {ui->bandComboBox, m_config.bands(), + m_config.frequencies(), this}; ui->bandComboBox->setValidator (band_validator); // Hook up signals. @@ -637,8 +635,7 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme m_config.transceiver_online (true); bool b=m_config.enable_VHF_features() and (m_mode=="JT4" or m_mode=="JT65" or - m_mode=="ISCAT" or m_mode=="JT9" or - m_mode=="JTMSK"); + m_mode=="ISCAT" or m_mode=="JT9" or m_mode=="JTMSK"); VHF_controls_visible(b); if(m_mode=="JT4") on_actionJT4_triggered(); @@ -674,6 +671,8 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme m_hsymStop=173; if(m_config.decode_at_52s()) m_hsymStop=179; } + VHF_features_enabled(m_config.enable_VHF_features()); + progressBar->setMaximum(m_TRperiod); m_modulator->setPeriod(m_TRperiod); // TODO - not thread safe m_dialFreqRxWSPR=0; @@ -837,11 +836,11 @@ void MainWindow::readSettings() m_audioThreadPriority = static_cast (m_settings->value ("Audio/ThreadPriority", QThread::HighPriority).toInt () % 8); m_settings->endGroup (); - if(m_ndepth==1) ui->actionQuickDecode->setChecked(true); - if(m_ndepth==2) ui->actionMediumDecode->setChecked(true); - if(m_ndepth==3) ui->actionDeepestDecode->setChecked(true); - if(m_ndepth==4) ui->actionInclude_averaging->setChecked(true); - if(m_ndepth==5) ui->actionInclude_correlation->setChecked(true); + if((m_ndepth&7)==1) ui->actionQuickDecode->setChecked(true); + if((m_ndepth&7)==2) ui->actionMediumDecode->setChecked(true); + if((m_ndepth&7)==3) ui->actionDeepestDecode->setChecked(true); + ui->actionInclude_averaging->setChecked((m_ndepth&16)>0); + ui->actionInclude_correlation->setChecked((m_ndepth&32)>0); statusChanged(); } @@ -1150,6 +1149,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog displayDialFrequency (); bool b=m_config.enable_VHF_features() and (m_mode=="JT4" or m_mode=="JT65" or m_mode=="ISCAT" or m_mode=="JT9" or m_mode=="JTMSK"); + VHF_features_enabled(b); VHF_controls_visible(b); } @@ -2014,7 +2014,7 @@ void MainWindow::readFromStdout() //readFromStdout } if(m_mode=="JT65") { int n=t.indexOf("f"); - if(n<0) n=t.indexOf("h"); + if(n<0) n=t.indexOf("d"); if(n>0) { navg=t.mid(n+1,1).toInt(); if(navg>1) bAvgMsg=true; @@ -3918,32 +3918,32 @@ void MainWindow::on_RxFreqSpinBox_valueChanged(int n) void MainWindow::on_actionQuickDecode_triggered() { - m_ndepth=1; + m_ndepth=(m_ndepth&48) + 1; ui->actionQuickDecode->setChecked(true); } void MainWindow::on_actionMediumDecode_triggered() { - m_ndepth=2; + m_ndepth=(m_ndepth&48) + 2; ui->actionMediumDecode->setChecked(true); } void MainWindow::on_actionDeepestDecode_triggered() { - m_ndepth=3; + m_ndepth=(m_ndepth&48) + 3; ui->actionDeepestDecode->setChecked(true); } void MainWindow::on_actionInclude_averaging_triggered() { - m_ndepth=4; - ui->actionInclude_averaging->setChecked(true); + m_ndepth=m_ndepth ^ 16; + ui->actionInclude_averaging->setChecked(m_ndepth&16); } void MainWindow::on_actionInclude_correlation_triggered() { - m_ndepth=5; - ui->actionInclude_correlation->setChecked(true); + m_ndepth=m_ndepth ^ 32; + ui->actionInclude_correlation->setChecked(m_ndepth&32); } void MainWindow::on_inGain_valueChanged(int n) diff --git a/mainwindow.ui b/mainwindow.ui index 12d4da251..ffbafdbdd 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -2334,6 +2334,7 @@ QPushButton[state="ok"] { + @@ -2739,7 +2740,7 @@ QPushButton[state="ok"] { true - Include averaging + Enable averaging @@ -2747,7 +2748,7 @@ QPushButton[state="ok"] { true - Include correlation + Enable deep search