diff --git a/commons.h b/commons.h
index 5d23bea1a..31e8c68e8 100644
--- a/commons.h
+++ b/commons.h
@@ -1,15 +1,16 @@
#ifndef COMMONS_H
#define COMMONS_H
-#define NSMAX 22000
+#define NSMAX 1365
+#define NTMAX 120
extern "C" {
extern struct {
float ss[184*NSMAX]; //This is "common/jt9com/..." in fortran
float savg[NSMAX];
- float c0[2*1800*1500];
- short int d2[1800*12000];
+ float c0[2*NTMAX*1500];
+ short int d2[NTMAX*12000];
int nutc; //UTC as integer, HHMM
int ndiskdat; //1 ==> data read from *.wav file
int ntrperiod; //TR period (seconds)
diff --git a/lib/decoder.f90 b/lib/decoder.f90
index 30b17cca8..35e7e8f55 100644
--- a/lib/decoder.f90
+++ b/lib/decoder.f90
@@ -2,9 +2,10 @@ subroutine decoder(ss,c0,nstandalone)
! Decoder for JT9.
- parameter (NMAX=1800*12000) !Total sample intervals per 30 minutes
- parameter (NDMAX=1800*1500) !Sample intervals at 1500 Hz rate
- parameter (NSMAX=22000) !Max length of saved spectra
+ parameter (NTMAX=120)
+ parameter (NMAX=NTMAX*12000) !Total sample intervals per 30 minutes
+ parameter (NDMAX=NTMAX*1500) !Sample intervals at 1500 Hz rate
+ parameter (NSMAX=1365) !Max length of saved spectra
real ss(184,NSMAX)
character*22 msg
character*80 fmt
diff --git a/lib/jt9.f90 b/lib/jt9.f90
index 2d53680c9..4ce710819 100644
--- a/lib/jt9.f90
+++ b/lib/jt9.f90
@@ -3,16 +3,17 @@ program jt9
! 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.
- character*80 arg,infile
- parameter (NMAX=1800*12000) !Total sample intervals per 30 minutes
- parameter (NDMAX=1800*1500) !Sample intervals at 1500 Hz rate
- parameter (NSMAX=22000) !Max length of saved spectra
+ parameter (NTMAX=120)
+ parameter (NMAX=NTMAX*12000) !Total sample intervals per 30 minutes
+ parameter (NDMAX=NTMAX*1500) !Sample intervals at 1500 Hz rate
+ parameter (NSMAX=1365) !Max length of saved spectra
integer*4 ihdr(11)
real*4 s(NSMAX)
real*4 ccfred(NSMAX)
logical*1 lstrong(0:1023)
integer*2 id2
complex c0
+ character*80 arg,infile
common/jt9com/ss(184,NSMAX),savg(NSMAX),c0(NDMAX),id2(NMAX),nutc,ndiskdat, &
ntr,mousefqso,newdat,nfa,nfb,ntol,kin,nzhsym,nsynced,ndecoded
common/tracer/limtrace,lu
diff --git a/lib/jt9a.F90 b/lib/jt9a.F90
index c31be3b8e..b9d8882aa 100644
--- a/lib/jt9a.F90
+++ b/lib/jt9a.F90
@@ -53,22 +53,25 @@ subroutine jt9a
end subroutine jt9a
subroutine jt9b(jt9com,nbytes)
+ parameter (NTMAX=120)
+ parameter (NSMAX=1365)
integer*1 jt9com(0:nbytes-1)
kss=0
- ksavg=kss + 4*184*22000
- kc0=ksavg + 4*22000
- kid2=kc0 + 2*4*1800*1500
- knutc=kid2 + 2*1800*12000
+ ksavg=kss + 4*184*NSMAX
+ kc0=ksavg + 4*NSMAX
+ kid2=kc0 + 2*4*NTMAX*1500
+ knutc=kid2 + 2*NTMAX*12000
call jt9c(jt9com(kss),jt9com(ksavg),jt9com(kc0),jt9com(kid2),jt9com(knutc))
return
end subroutine jt9b
subroutine jt9c(ss,savg,c0,id2,nparams0)
- parameter (NSMAX=22000)
+ parameter (NTMAX=120)
+ parameter (NSMAX=1365)
integer*1 detach_jt9
real*4 ss(184*NSMAX),savg(NSMAX)
- complex c0(1800*1500)
- integer*2 id2(1800*12000)
+ complex c0(NTMAX*1500)
+ integer*2 id2(NTMAX*12000)
integer nparams0(21),nparams(21)
character*20 datetime
diff --git a/lib/jt9code.f90 b/lib/jt9code.f90
index b8d9490ff..8201f6d13 100644
--- a/lib/jt9code.f90
+++ b/lib/jt9code.f90
@@ -2,14 +2,11 @@ program jt9code
! Generate simulated data for testing of WSJT-X
- parameter (NMAX=1800*12000)
character msg*22,msg0*22,decoded*22
-
- integer*4 i4tone(85) !Channel symbols (values 0-8)
+ integer*4 i4tone(85) !Channel symbols (values 0-8)
integer*1 i1
equivalence (i1,i4)
include 'jt9sync.f90'
- common/acom/dat(NMAX),iwave(NMAX)
nargs=iargc()
if(nargs.ne.1) then
diff --git a/lib/jt9sim.f90 b/lib/jt9sim.f90
index c1bf1171a..7321a0726 100644
--- a/lib/jt9sim.f90
+++ b/lib/jt9sim.f90
@@ -2,7 +2,8 @@ program jt9sim
! Generate simulated data for testing of WSJT-X
- parameter (NMAX=1800*12000)
+ parameter (NTMAX=120)
+ parameter (NMAX=NTMAX*12000)
integer ihdr(11)
integer*2 iwave !Generated waveform (no noise)
real*8 f0,f,dt,twopi,phi,dphi,baud,fspan,fsample,freq
diff --git a/lib/jt9test.f90 b/lib/jt9test.f90
index 5aacc0f16..3651593b2 100644
--- a/lib/jt9test.f90
+++ b/lib/jt9test.f90
@@ -5,10 +5,10 @@ program jt9test
! NB: For unknown reason, ***MUST*** be compiled by g95 with -O0 !!!
- character*80 arg,infile
- parameter (NMAX=1800*12000) !Total sample intervals per 30 minutes
- parameter (NDMAX=1800*1500) !Sample intervals at 1500 Hz rate
- parameter (NSMAX=22000) !Max length of saved spectra
+ parameter (NTMAX=120)
+ parameter (NMAX=NTMAX*12000) !Total sample intervals per 30 minutes
+ parameter (NDMAX=NTMAX*1500) !Sample intervals at 1500 Hz rate
+ parameter (NSMAX=1365) !Max length of saved spectra
integer*4 ihdr(11)
real*4 s(NSMAX)
real*4 ccfred(NSMAX)
@@ -16,6 +16,7 @@ program jt9test
integer*1 i1SoftSymbols(207)
character*22 msg
character*33 line
+ character*80 arg,infile
integer*2 id2
complex c0
complex c1(0:2700000)
diff --git a/lib/redsync.f90 b/lib/redsync.f90
index 1021669e2..68a5e5dc0 100644
--- a/lib/redsync.f90
+++ b/lib/redsync.f90
@@ -4,7 +4,7 @@ subroutine redsync(ss,ntrperiod,ihsym,iz,red)
! NB: red() is used for real-time display only. A better ccfred() is
! computed during the decode procedure.
- Parameter (NSMAX=22000)
+ Parameter (NSMAX=1365)
real*4 ss(184,NSMAX)
real*4 red(NSMAX)
include 'jt9sync.f90'
diff --git a/lib/softsym.f90 b/lib/softsym.f90
index c89671e3a..a17186774 100644
--- a/lib/softsym.f90
+++ b/lib/softsym.f90
@@ -35,5 +35,5 @@ subroutine softsym(c0,npts8,nsps8,newdat,fpk,syncpk,snrdb,xdt,freq,drift, &
! Remove interleaving
call interleave9(i1SoftSymbolsScrambled,-1,i1SoftSymbols)
-999 return
+ return
end subroutine softsym
diff --git a/lib/symspec.f90 b/lib/symspec.f90
index ae265009d..d88ecd931 100644
--- a/lib/symspec.f90
+++ b/lib/symspec.f90
@@ -1,5 +1,5 @@
subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
- df3,ihsym,nzap,slimit,lstrong,npts8)
+ df3,ihsym,npts8)
! Input:
! k pointer to the most recent new data
@@ -14,13 +14,11 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
! s() spectrum for waterfall display
! red() first cut at JT9 sync amplitude
! ihsym index number of this half-symbol (1-184)
-! nzap number of samples zero'ed by noise blanker
-! slimit NB scale adjustment
-! lstrong true if strong signal at this freq
- parameter (NMAX=1800*12000) !Total sample intervals per 30 minutes
- parameter (NDMAX=1800*1500) !Sample intervals at 1500 Hz rate
- parameter (NSMAX=22000) !Max length of saved spectra
+ parameter (NTMAX=120)
+ parameter (NMAX=NTMAX*12000) !Total sample intervals per 30 minutes
+ parameter (NDMAX=NTMAX*1500) !Sample intervals at 1500 Hz rate
+ parameter (NSMAX=1365) !Max length of saved spectra
parameter (NFFT1=1024)
parameter (NFFT2=1024,NFFT2A=NFFT2/8)
parameter (MAXFFT3=32768)
@@ -30,7 +28,6 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
real*4 ssum(NSMAX)
real*4 red(NSMAX)
complex cx(0:MAXFFT3-1)
- logical*1 lstrong(0:1023) !Should be (0:512)
integer*2 id2
complex c0
common/jt9com/ss(184,NSMAX),savg(NSMAX),c0(NDMAX),id2(NMAX),nutc,ndiskdat, &
@@ -80,10 +77,6 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
endif
endif
k0=k
-
- nzap=0
- px=0.
-
kstep1=NFFT1
fac=2.0/NFFT1
nblks=(k-k1)/kstep1
@@ -143,7 +136,7 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
call pctile(ssum,iz,npct,xmed1)
fac1=fac00/max(xmed1,0.006*ihsym)
savg(1:iz)=fac1*ssum(1:iz)
- savg(iz+1:iz+20)=savg(iz)
+! savg(iz+1:iz+20)=savg(iz)
call redsync(ss,ntrperiod,ihsym,iz,red)
return
diff --git a/lib/symspec2.f90 b/lib/symspec2.f90
index 9a29128af..bfe6c7fa7 100644
--- a/lib/symspec2.f90
+++ b/lib/symspec2.f90
@@ -38,8 +38,6 @@ subroutine symspec2(c5,nz3,nsps8,nspsd,fsample,freq,drift,snrdb,schk, &
! write(30) freq,drift,ss2
! call flush(30)
call chkss2(ss2,freq,drift,schk)
- freq0=freq
- drift0=drift
if(schk.lt.2.0) go to 900
!###
ss=0.
diff --git a/lib/sync9.f90 b/lib/sync9.f90
index 8890e3143..8953587a6 100644
--- a/lib/sync9.f90
+++ b/lib/sync9.f90
@@ -1,6 +1,6 @@
subroutine sync9(ss,nzhsym,lag1,lag2,ia,ib,ccfred,red2,ipkbest)
- parameter (NSMAX=22000) !Max length of saved spectra
+ parameter (NSMAX=1365) !Max length of saved spectra
real ss(184,NSMAX)
real ss1(184)
real ccfred(NSMAX)
diff --git a/mainwindow.cpp b/mainwindow.cpp
index e0e4a380b..ae8f4ad95 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -566,7 +566,7 @@ void MainWindow::dataSink(int k)
if(m_NB) nb=1;
trmin=m_TRperiod/60;
symspec_(&k, &trmin, &m_nsps, &m_inGain, &nb, &m_NBslider, &px, s, red,
- &df3, &ihsym, &nzap, &slimit, lstrong, &npts8);
+ &df3, &ihsym, &npts8);
if(ihsym <=0) return;
QString t;
m_pctZap=nzap*100.0/m_nsps;
@@ -574,7 +574,7 @@ void MainWindow::dataSink(int k)
lab2->setText(t);
ui->xThermo->setValue((double)px); //Update thermometer
if(m_monitoring || m_diskData) {
- g_pWideGraph->dataSink2(s,red,df3,ihsym,m_diskData,lstrong);
+ g_pWideGraph->dataSink2(s,red,df3,ihsym,m_diskData);
}
if(ihsym == m_hsymStop) {
@@ -1244,7 +1244,7 @@ void MainWindow::decode() //decode()
char *from = (char*) jt9com_.ss;
int size=sizeof(jt9com_);
if(jt9com_.newdat==0) {
- int noffset = 4*184*22000 + 4*22000 + 4*2*1800*1500 + 2*1800*12000;
+ int noffset = 4*184*NSMAX + 4*NSMAX + 4*2*NTMAX*1500 + 2*NTMAX*12000;
to += noffset;
from += noffset;
size -= noffset;
diff --git a/mainwindow.h b/mainwindow.h
index febcd6c5a..2680262db 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -360,8 +360,7 @@ extern "C" {
//----------------------------------------------------- C and Fortran routines
void symspec_(int* k, int* ntrperiod, int* nsps, int* ingain, int* nb,
int* m_NBslider, float* px, float s[], float red[],
- float* df3, int* nhsym, int* nzap, float* slimit,
- uchar lstrong[], int* npts8);
+ float* df3, int* nhsym, int* npts8);
void genjt9_(char* msg, int* ichk, char* msgsent, int itone[],
int* itext, int len1, int len2);
diff --git a/mainwindow.ui b/mainwindow.ui
index f08f3914e..417f17b9b 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -2636,6 +2636,9 @@ p, li { white-space: pre-wrap; }
true
+
+ false
+
JT9-5
@@ -2644,6 +2647,9 @@ p, li { white-space: pre-wrap; }
true
+
+ false
+
JT9-10
@@ -2652,6 +2658,9 @@ p, li { white-space: pre-wrap; }
true
+
+ false
+
JT9-30
diff --git a/plotter.cpp b/plotter.cpp
index e8568c1cf..77e7248c3 100644
--- a/plotter.cpp
+++ b/plotter.cpp
@@ -102,17 +102,10 @@ void CPlotter::draw(float swide[], float red[], int i0) //draw()
QPoint LineBuf[MAX_SCREENSIZE];
j=0;
- bool strong0=false;
- bool strong=false;
int iz=XfromFreq(2000.0);
for(int i=0; iiz) swide[i]=0;
- strong=false;
- if(swide[i]<0) {
- strong=true;
- swide[i]=-swide[i];
- }
y=0.0;
if(swide[i]>0.0) y = 10.0*log10(swide[i]);
int y1 = 5.0*gain*y + 10*m_plotZero;
@@ -132,13 +125,7 @@ void CPlotter::draw(float swide[], float red[], int i0) //draw()
y2=gain*6.0*log10(sum/m_binsPerPixel) - 10.0;
}
if(m_bJT9Sync) y2=3.0*gain*red[i] - 15;
- if(strong != strong0 or i==m_w-1) {
- painter2D.drawPolyline(LineBuf,j);
- j=0;
- strong0=strong;
- if(strong0) painter2D.setPen(Qt::red);
- if(!strong0) painter2D.setPen(Qt::green);
- }
+ if(i==m_w-2) painter2D.drawPolyline(LineBuf,j);
LineBuf[j].setX(i);
LineBuf[j].setY(m_h-(y2+0.8*m_h));
j++;
diff --git a/soundin.cpp b/soundin.cpp
index 552407c64..3cfd9860e 100644
--- a/soundin.cpp
+++ b/soundin.cpp
@@ -2,15 +2,16 @@
#include
#define FRAMES_PER_BUFFER 1024
-#define NSMAX 22000
+#define NSMAX 1365
+#define NTMAX 120
extern "C" {
#include
extern struct {
float ss[184*NSMAX]; //This is "common/jt9com/..." in fortran
float savg[NSMAX];
- float c0[2*1800*1500];
- short int d2[1800*12000];
+ float c0[2*NTMAX*1500];
+ short int d2[NTMAX*12000];
int nutc; //UTC as integer, HHMM
int ndiskdat; //1 ==> data read from *.wav file
int ntrperiod; //TR period (seconds)
diff --git a/widegraph.cpp b/widegraph.cpp
index 98a55cb34..ce47517b4 100644
--- a/widegraph.cpp
+++ b/widegraph.cpp
@@ -2,8 +2,6 @@
#include "ui_widegraph.h"
#include "commons.h"
-#define NSMAX 22000
-
WideGraph::WideGraph(QWidget *parent) :
QDialog(parent),
ui(new Ui::WideGraph)
@@ -81,7 +79,7 @@ void WideGraph::saveSettings()
}
void WideGraph::dataSink2(float s[], float red[], float df3, int ihsym,
- int ndiskdata, uchar lstrong[])
+ int ndiskdata)
{
static float splot[NSMAX];
static float swide[2048];
diff --git a/widegraph.h b/widegraph.h
index 195c3c3ca..872ba07c9 100644
--- a/widegraph.h
+++ b/widegraph.h
@@ -15,7 +15,7 @@ public:
~WideGraph();
void dataSink2(float s[], float red[], float df3, int ihsym,
- int ndiskdata, uchar lstrong[]);
+ int ndiskdata);
void setQSOfreq(int n);
int QSOfreq();
int nSpan();