diff --git a/WSJT-X_Quick_Start_Guide.docx b/WSJT-X_Quick_Start_Guide.docx
index 0f5864ee1..029fc6c05 100644
Binary files a/WSJT-X_Quick_Start_Guide.docx and b/WSJT-X_Quick_Start_Guide.docx differ
diff --git a/lib/decode9.f90 b/lib/decode9.f90
index cd3f502e6..f8688f59f 100644
--- a/lib/decode9.f90
+++ b/lib/decode9.f90
@@ -1,4 +1,4 @@
-subroutine decode9(i1SoftSymbols,msg)
+subroutine decode9(i1SoftSymbols,limit,nlim,msg)
! Decoder for JT9
! Input: i1SoftSymbols(207) - Single-bit soft symbols
@@ -11,11 +11,46 @@ subroutine decode9(i1SoftSymbols,msg)
integer*1 i1SoftSymbols(207)
integer*1 i1DecodedBits(72)
+ real*4 xx0(0:255)
+
integer*1 i1
logical first
integer*4 mettab(0:255,0:1)
equivalence (i1,i4)
data first/.true./
+ data xx0/ &
+ 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+ 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+ 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+ 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+ 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+ 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+ 0.988, 1.000, 0.991, 0.993, 1.000, 0.995, 1.000, 0.991, &
+ 1.000, 0.991, 0.992, 0.991, 0.990, 0.990, 0.992, 0.996, &
+ 0.990, 0.994, 0.993, 0.991, 0.992, 0.989, 0.991, 0.987, &
+ 0.985, 0.989, 0.984, 0.983, 0.979, 0.977, 0.971, 0.975, &
+ 0.974, 0.970, 0.970, 0.970, 0.967, 0.962, 0.960, 0.957, &
+ 0.956, 0.953, 0.942, 0.946, 0.937, 0.933, 0.929, 0.920, &
+ 0.917, 0.911, 0.903, 0.895, 0.884, 0.877, 0.869, 0.858, &
+ 0.846, 0.834, 0.821, 0.806, 0.790, 0.775, 0.755, 0.737, &
+ 0.713, 0.691, 0.667, 0.640, 0.612, 0.581, 0.548, 0.510, &
+ 0.472, 0.425, 0.378, 0.328, 0.274, 0.212, 0.146, 0.075, &
+ 0.000,-0.079,-0.163,-0.249,-0.338,-0.425,-0.514,-0.606, &
+ -0.706,-0.796,-0.895,-0.987,-1.084,-1.181,-1.280,-1.376, &
+ -1.473,-1.587,-1.678,-1.790,-1.882,-1.992,-2.096,-2.201, &
+ -2.301,-2.411,-2.531,-2.608,-2.690,-2.829,-2.939,-3.058, &
+ -3.164,-3.212,-3.377,-3.463,-3.550,-3.768,-3.677,-3.975, &
+ -4.062,-4.098,-4.186,-4.261,-4.472,-4.621,-4.623,-4.608, &
+ -4.822,-4.870,-4.652,-4.954,-5.108,-5.377,-5.544,-5.995, &
+ -5.632,-5.826,-6.304,-6.002,-6.559,-6.369,-6.658,-7.016, &
+ -6.184,-7.332,-6.534,-6.152,-6.113,-6.288,-6.426,-6.313, &
+ -9.966,-6.371,-9.966,-7.055,-9.966,-6.629,-6.313,-9.966, &
+ -5.858,-9.966,-9.966,-9.966,-9.966,-9.966,-9.966,-9.966, &
+ -9.966,-9.966,-9.966,-9.966,-9.966,-9.966,-9.966,-9.966, &
+ -9.966,-9.966,-9.966,-9.966,-9.966,-9.966,-9.966,-9.966, &
+ -9.966,-9.966,-9.966,-9.966,-9.966,-9.966,-9.966,-9.966, &
+ -9.966,-9.966,-9.966,-9.966,-9.966,-9.966,-9.966,-9.966, &
+ -9.966,-9.966,-9.966,-9.966,-9.966,-9.966,-9.966,-9.966/
save
if(first) then
@@ -23,23 +58,21 @@ subroutine decode9(i1SoftSymbols,msg)
! bias=0.37 !To be optimized, in decoder program
bias=0.0 !Seems better, in jt9.exe ???
scale=10 ! ... ditto ...
- open(19,file='met8.21',status='old')
do i=0,255
- read(19,*) x00,x0,x1
- mettab(i,0)=nint(scale*(x0-bias))
- mettab(i,1)=nint(scale*(x1-bias)) !### Check range, etc. ###
+ mettab(i,0)=nint(scale*(xx0(i)-bias))
+ if(i.ge.1) mettab(256-i,1)=mettab(i,0)
enddo
- close(19)
+ close(19)
first=.false.
endif
msg=' '
nbits=72
ndelta=17
- limit=100000
call fano232(i1SoftSymbols,nbits+31,mettab,ndelta,limit,i1DecodedBytes, &
ncycles,metric,ierr)
+ nlim=ncycles/nbits
if(ncycles.lt.(nbits*limit)) then
nbytes=(nbits+7)/8
do i=1,nbytes
diff --git a/lib/decoder.f90 b/lib/decoder.f90
index 281a536e4..293fcaea0 100644
--- a/lib/decoder.f90
+++ b/lib/decoder.f90
@@ -1,4 +1,4 @@
-subroutine decoder(ntrSeconds,nRxLog,c0)
+subroutine decoder(ntrSeconds,ndepth,nRxLog,c0)
! Decoder for JT9. Can run stand-alone, reading data from *.wav files;
! or as the back end of wsjt-x, with data placed in a shared memory region.
@@ -24,6 +24,9 @@ subroutine decoder(ntrSeconds,nRxLog,c0)
newdat=1
nsynced=0
ndecoded=0
+ limit=1000
+ if(ndepth.ge.2) limit=20000
+ if(ndepth.ge.3) limit=100000
nsps=0
if(ntrMinutes.eq.1) then
@@ -67,9 +70,9 @@ subroutine decoder(ntrSeconds,nRxLog,c0)
sbest=0.
do i=ia,ib
f=(i-1)*df3
- if((i.eq.ipk .or. ccfred(i).ge.10.0) .and. f.gt.fgood+10.0*df8) then
+ if((i.eq.ipk .or. ccfred(i).ge.3.0) .and. f.gt.fgood+10.0*df8) then
call spec9(c0,npts8,nsps,f,fpk,xdt,i1SoftSymbols)
- call decode9(i1SoftSymbols,msg)
+ call decode9(i1SoftSymbols,limit,nlim,msg)
snr=10.0*log10(ccfred(i)) - 10.0*log10(2500.0/df3) + 2.0
sync=ccfred(i) - 2.0
if(sync.lt.0.0) sync=0.0
diff --git a/lib/pctile.f90 b/lib/pctile.f90
index 13e193648..a8ae161aa 100644
--- a/lib/pctile.f90
+++ b/lib/pctile.f90
@@ -3,7 +3,22 @@ subroutine pctile(x,npts,npct,xmedian)
real x(npts)
integer hist(0:1000)
+ if(npts.le.0) then
+ xmedian=1.0
+ go to 900
+ endif
+
ave=sum(x)/npts
+ s=0.
+ ns=0
+ do i=1,npts
+ if(x(i).lt.3.0*ave) then
+ s=s+x(i)
+ ns=ns+1
+ endif
+ enddo
+ ave=s/ns
+
hist=0
do i=1,npts
j=nint(100.0*x(i)/ave)
@@ -20,6 +35,8 @@ subroutine pctile(x,npts,npct,xmedian)
enddo
xmedian=j*ave/100.0
+ if(j.lt.10) xmedian=1.0
+900 continue
return
end subroutine pctile
diff --git a/lib/sync9.f90 b/lib/sync9.f90
index b7ee19497..f5c855c03 100644
--- a/lib/sync9.f90
+++ b/lib/sync9.f90
@@ -45,6 +45,7 @@ subroutine sync9(ss,tstep,df3,ntol,nfqso,ccfred,ia,ib,ipkbest)
enddo
call pctile(ccfred(ia),ib-ia+1,50,xmed)
+ if(xmed.le.1.0) xmed=1.0
ccfred=ccfred/xmed
return
diff --git a/mainwindow.cpp b/mainwindow.cpp
index d0682f5bc..614b2fc44 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -1,4 +1,4 @@
-//-------------------------------------------------------------- MainWindow
+//--------------------------------------------------------------- MainWindow
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "devsetup.h"
@@ -55,9 +55,9 @@ MainWindow::MainWindow(QWidget *parent) :
ui->actionSave_all->setActionGroup(saveGroup);
QActionGroup* DepthGroup = new QActionGroup(this);
- ui->actionNo_Deep_Search->setActionGroup(DepthGroup);
- ui->actionNormal_Deep_Search->setActionGroup(DepthGroup);
- ui->actionAggressive_Deep_Search->setActionGroup(DepthGroup);
+ ui->actionQuickDecode->setActionGroup(DepthGroup);
+ ui->actionMediumDecode->setActionGroup(DepthGroup);
+ ui->actionDeepestDecode->setActionGroup(DepthGroup);
QButtonGroup* txMsgButtonGroup = new QButtonGroup;
txMsgButtonGroup->addButton(ui->txrb1,1);
@@ -113,6 +113,7 @@ MainWindow::MainWindow(QWidget *parent) :
m_NB=false;
m_mode="JT9-1";
m_TRperiod=60;
+ decodeBusy(false);
ui->xThermo->setFillBrush(Qt::green);
@@ -193,10 +194,6 @@ MainWindow::~MainWindow()
soundOutThread.quitExecution=true;
soundOutThread.wait(3000);
}
- if(!m_decoderBusy) {
- QFile lockFile(m_appDir + "/.lock");
- lockFile.remove();
- }
delete ui;
}
@@ -307,9 +304,9 @@ void MainWindow::readSettings()
on_actionLinrad_triggered();
ui->actionLinrad->setChecked(true);
}
- if(m_ndepth==0) ui->actionNo_Deep_Search->setChecked(true);
- if(m_ndepth==1) ui->actionNormal_Deep_Search->setChecked(true);
- if(m_ndepth==2) ui->actionAggressive_Deep_Search->setChecked(true);
+ if(m_ndepth==1) ui->actionQuickDecode->setChecked(true);
+ if(m_ndepth==2) ui->actionMediumDecode->setChecked(true);
+ if(m_ndepth==3) ui->actionDeepestDecode->setChecked(true);
}
//-------------------------------------------------------------- dataSink()
@@ -780,21 +777,6 @@ void MainWindow::on_actionNo_shorthands_if_Tx1_triggered()
stub();
}
-void MainWindow::on_actionNo_Deep_Search_triggered() //No Deep Search
-{
- m_ndepth=0;
-}
-
-void MainWindow::on_actionNormal_Deep_Search_triggered() //Normal DS
-{
- m_ndepth=1;
-}
-
-void MainWindow::on_actionAggressive_Deep_Search_triggered() //Aggressive DS
-{
- m_ndepth=2;
-}
-
void MainWindow::on_actionNone_triggered() //Save None
{
m_saveSynced=false;
@@ -880,7 +862,8 @@ void MainWindow::decode() //decode()
jt9com_.ntol=m_tol;
if(jt9com_.nutc < m_nutc0) m_RxLog |= 1; //Date and Time to wsjtx_rx.log
m_nutc0=jt9com_.nutc;
- *future3 = QtConcurrent::run(decoder_, &m_TRperiod, &m_RxLog, &c0[0]);
+ *future3 = QtConcurrent::run(decoder_, &m_TRperiod, &m_ndepth,
+ &m_RxLog, &c0[0]);
watcher3->setFuture(*future3);
}
@@ -1560,3 +1543,21 @@ void MainWindow::on_pbTxFreq_clicked()
m_txFreq=ntx;
ui->TxFreqSpinBox->setValue(ntx);
}
+
+void MainWindow::on_actionQuickDecode_triggered()
+{
+ m_ndepth=1;
+ ui->actionQuickDecode->setChecked(true);
+}
+
+void MainWindow::on_actionMediumDecode_triggered()
+{
+ m_ndepth=2;
+ ui->actionMediumDecode->setChecked(true);
+}
+
+void MainWindow::on_actionDeepestDecode_triggered()
+{
+ m_ndepth=3;
+ ui->actionDeepestDecode->setChecked(true);
+}
diff --git a/mainwindow.h b/mainwindow.h
index 1748c5fd6..3832792d1 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -68,9 +68,6 @@ private slots:
void on_actionDelete_all_wav_files_in_SaveDir_triggered();
void on_actionF4_sets_Tx6_triggered();
void on_actionNo_shorthands_if_Tx1_triggered();
- void on_actionNo_Deep_Search_triggered();
- void on_actionNormal_Deep_Search_triggered();
- void on_actionAggressive_Deep_Search_triggered();
void on_actionNone_triggered();
void on_actionSave_all_triggered();
void on_actionKeyboard_shortcuts_triggered();
@@ -113,6 +110,12 @@ private slots:
void on_actionSave_decoded_triggered();
+ void on_actionQuickDecode_triggered();
+
+ void on_actionMediumDecode_triggered();
+
+ void on_actionDeepestDecode_triggered();
+
private:
Ui::MainWindow *ui;
qint32 m_nDevIn;
@@ -232,7 +235,7 @@ void symspec_(int* k, int* ntrperiod, int* nsps, int* nb, int* m_NBslider,
void genjt9_(char* msg, char* msgsent, int itone[], int len1, int len2);
-void decoder_(int* ntrperiod, int* mRxLog, float c0[]);
+void decoder_(int* ntrperiod, int* ndepth, int* mRxLog, float c0[]);
}
#endif // MAINWINDOW_H
diff --git a/mainwindow.ui b/mainwindow.ui
index 097e4074f..3b88f6b7b 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -1179,7 +1179,9 @@ p, li { white-space: pre-wrap; }
Decode
-
+
+
+
diff --git a/wsjtx.iss b/wsjtx.iss
index d182f2671..74487988a 100644
--- a/wsjtx.iss
+++ b/wsjtx.iss
@@ -1,6 +1,6 @@
[Setup]
AppName=wsjtx
-AppVerName=wsjtx Version 0.2 r2705
+AppVerName=wsjtx Version 0.2 r2706
AppCopyright=Copyright (C) 2001-2012 by Joe Taylor, K1JT
DefaultDirName=c:\wsjtx
DefaultGroupName=wsjtx
diff --git a/wsjtx.pro b/wsjtx.pro
index 2e502dd54..ebfb845b5 100644
--- a/wsjtx.pro
+++ b/wsjtx.pro
@@ -38,7 +38,7 @@ SOURCES += main.cpp mainwindow.cpp plotter.cpp about.cpp \
displaytext.cpp getdev.cpp
win32 {
-SOURCES += killbyname.cpp
+SOURCES +=
}
HEADERS += mainwindow.h plotter.h soundin.h soundout.h \