mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
1. De-activate submodes JT9-5, JT9-10, and JT9-30. (This makes the shared
memory region smaller by some 150 MB.) 2. Some code cleanup (removing unused lstrong, etc.)... git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3283 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
6646005f20
commit
9890731f4f
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
17
lib/jt9a.F90
17
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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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'
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -2636,6 +2636,9 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>JT9-5</string>
|
||||
</property>
|
||||
@ -2644,6 +2647,9 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>JT9-10</string>
|
||||
</property>
|
||||
@ -2652,6 +2658,9 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>JT9-30</string>
|
||||
</property>
|
||||
|
15
plotter.cpp
15
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; i<m_w; i++) {
|
||||
if(i>iz) 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++;
|
||||
|
@ -2,15 +2,16 @@
|
||||
#include <stdexcept>
|
||||
|
||||
#define FRAMES_PER_BUFFER 1024
|
||||
#define NSMAX 22000
|
||||
#define NSMAX 1365
|
||||
#define NTMAX 120
|
||||
|
||||
extern "C" {
|
||||
#include <portaudio.h>
|
||||
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)
|
||||
|
@ -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];
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user