Progress on symspecx and timf2x, etc.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2597 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-09-25 20:26:12 +00:00
parent ad7f10843e
commit 92a6975fc1
10 changed files with 1409 additions and 1098 deletions

View File

@ -11,6 +11,7 @@ extern struct {
float savg[32768];
double fcenter; //USB dial freq (kHz)
int nutc; //UTC as integer, HHMM
int ntrperiod; //TR period (seconds)
int mousedf; //User-selected DF
int mousefqso; //User-selected QSO freq (kHz)
int nagain; //1 ==> decode only at fQSO +/- Tol
@ -22,7 +23,6 @@ extern struct {
int ntol; //+/- decoding range around fQSO (Hz)
int map65RxLog; //Flags to control log files
int nfsample; //Input sample rate
int ntrperiod;
int nsave; //Number of s3(64,63) spectra saved
int kin;
int kline;

View File

@ -6,7 +6,7 @@
#include "commons.h"
void getfile(QString fname, bool xpol, int dbDgrd);
void savetf2(QString fname, bool xpol);
void savetf2(QString fname);
float gran();
#endif // GETFILE_H

17
libm65/interleave8.f90 Normal file
View File

@ -0,0 +1,17 @@
subroutine interleave8(idat,jdat)
integer idat(66),jdat(66)
integer ii(66),jj(66)
data ii/ &
64,32,16,48, 8,40,24,56, 4,36,20,52,12,44,28,60, 2,66,34,18, &
50,10,42,26,58, 6,38,22,54,14,46,30,62, 1,65,33,17,49, 9,41, &
25,57, 5,37,21,53,13,45,29,61, 3,35,19,51,11,43,27,59, 7,39, &
23,55,15,47,31,63/
data jj/ &
34,17,51, 9,43,26,59, 5,39,22,55,13,47,30,63, 3,37,20,53,11, &
45,28,61, 7,41,24,57,15,49,32,65, 2,36,19,52,10,44,27,60, 6, &
40,23,56,14,48,31,64, 4,38,21,54,12,46,29,62, 8,42,25,58,16, &
50,33,66, 1,35,18/
return
end subroutine interleave8

120
libm65/symspecx.f90 Normal file
View File

@ -0,0 +1,120 @@
subroutine symspecx(k,ndiskdat,nb,nbslider,ntrperiod,pxdb,sdis,nkhz, &
ihsym,nzap,slimit,lstrong)
! k pointer to the most recent new data
! ndiskdat 0/1 to indicate if data from disk
! nb 0/1 status of noise blanker (off/on)
! pxdb power (0-60 dB)
! sdis spectrum for waterfall display
! nkhz integer kHz portion of center frequency, e.g., 125 for 144.125
! ihsym index number of this half-symbol (1-322)
! nzap number of samples zero'ed by noise blanker
parameter (NSMAX=1800*12000) !Total sample intervals per 30 minutes
parameter (MAXFFT=32768) !Max length of FFTs
parameter (NDMAX=1800*375)
integer*2 id2
real*8 ts,hsym
real*8 fcenter
common/jt8com/id2(NSMAX),ss(184,MAXFFT),savg(MAXFFT),fcenter,nutc,junk(20), &
cdat(NDMAX)
real*4 sdis(MAXFFT),w(MAXFFT)
complex cx(MAXFFT)
complex cx00(MAXFFT)
real x0(0:2047)
complex cx0(0:1023),cx1(0:1023)
logical*1 lstrong(0:1023)
equivalence (x0,cx0)
data rms/999.0/,k0/99999999/,ntrperiod0/0/
save
if(k.gt.NSMAX) go to 999
if(k.lt.nfft) then
ihsym=0
go to 999 !Wait for enough samples to start
endif
if(ntrperiod.ne.ntrperiod0) then
nfft=960
if(ntrperiod.eq.120) nfft=2048
if(ntrperiod.eq.300) nfft=5376
if(ntrperiod.eq.600) nfft=10752
if(ntrperiod.eq.1800) nfft=32768
nsps=8*nfft
hsym=0.5d0*nsps
pi=4.0*atan(1.0)
do i=1,nfft
w(i)=(sin(i*pi/nfft))**2 !Window
enddo
endif
if(k.lt.k0) then
ts=1.d0 - hsym
savg=0.
ihsym=0
k1=0
if(ndiskdat.eq.0) id2(k+1)=0. !### Should not be needed ??? ###
endif
k0=k
nzap=0
sigmas=1.5*(10.0**(0.01*nbslider)) + 0.7
peaklimit=sigmas*max(10.0,rms)
faclim=3.0
px=0.
nwindow=2
nfft2=1024
kstep=nfft2
if(nwindow.ne.0) kstep=nfft2/2
nblks=(k-k1)/kstep
do nblk=1,nblks
j=k1+1
do i=0,nfft2-1
x0(i)=id2(j+i)
enddo
call timf2x(k,nfft2,ntrperiod,nwindow,nb,peaklimit,faclim,cx0,cx1, &
slimit,lstrong,px,nzap)
do i=0,kstep-1
cdat(j+i)=cx1(i)
enddo
k1=k1+kstep
enddo
npts=nfft !Samples used in each half-symbol FFT
ts=ts+hsym
ja=ts !Index of first sample
jb=ja+npts-1 !Last sample
i=0
fac=0.0002
do j=ja,jb !Copy data into cx, cy
i=i+1
cx(i)=fac*cdat(j)
enddo
if(nzap/178.lt.50 .and. (ndiskdat.eq.0 .or. ihsym.lt.280)) then
nsum=nblks*kstep - nzap
if(nsum.le.0) nsum=1
rms=sqrt(0.5*px/nsum)
endif
pxdb=0.
if(rms.gt.1.0) pxdb=20.0*log10(rms)
if(pxdb.gt.60.0) pxdb=60.0
cx00=cx
ihsym=ihsym+1
cx=w*cx00 !Apply window for 2nd forward FFT
call four2a(cx,nfft,1,1,1) !Second forward FFT (X)
n=min(184,ihsym)
do i=1,nfft
sx=real(cx(i))**2 + aimag(cx(i))**2
ss(n,i)=sx
sdis(i)=sx
savg(i)=savg(i) + sx
enddo
nkhz=nint(1000.d0*(fcenter-int(fcenter)))
if(fcenter.eq.0.d0) nkhz=125
999 return
end subroutine symspecx

150
libm65/timf2x.f90 Normal file
View File

@ -0,0 +1,150 @@
subroutine timf2x(k,nfft,ntrperiod,nwindow,nb,peaklimit,faclim,cx0,cx1, &
slimit,lstrong,px,nzap)
! Sequential processing of time-domain I/Q data, using Linrad-like
! "first FFT" and "first backward FFT".
! cx0 - complex input data
! nfft - length of FFTs
! nwindow - 0 for no window, 2 for sin^2 window
! cx1 - output data
! Non-windowed processing means no overlap, so kstep=nfft.
! Sin^2 window has 50% overlap, kstep=nfft/2.
! Frequencies with strong signals are identified and separated. Back
! transforms are done separately for weak and strong signals, so that
! noise blanking can be applied to the weak-signal portion. Strong and
! weak signals are finally re-combined in the time domain.
parameter (MAXFFT=32768,MAXNH=MAXFFT/2)
parameter (MAXSIGS=100)
complex cx0(0:nfft-1),cx1(0:nfft-1)
complex cx(0:MAXFFT-1),cxt(0:MAXFFT-1)
complex cxs(0:MAXFFT-1),covxs(0:MAXNH-1) !Strong X signals
complex cxw(0:MAXFFT-1),covxw(0:MAXNH-1) !Weak X signals
complex cxw2(0:8191)
complex cxs2(0:8191)
real*4 w(0:MAXFFT-1)
real*4 s(0:MAXFFT-1)
logical*1 lstrong(0:MAXFFT-1),lprev
integer ia(MAXSIGS),ib(MAXSIGS)
logical first
data first/.true./
data k0/99999999/
save
if(first) then
pi=4.0*atan(1.0)
do i=0,nfft-1
w(i)=(sin(i*pi/nfft))**2
enddo
s=0.
nh=nfft/2
nfft2=nfft/4
if(ntrperiod.ge.300) nfft2=nfft/32
nh2=nfft2/2
kstep=nfft
if(nwindow.eq.2) kstep=nh
fac=1.0/nfft
slimit=1.e30
first=.false.
endif
if(k.lt.k0) then
covxs=0.
covxw=0.
endif
k0=k
cx(0:nfft-1)=cx0
if(nwindow.eq.2) cx(0:nfft-1)=w(0:nfft-1)*cx(0:nfft-1)
call four2a(cx,nfft,1,-1,0) !First forward FFT, r2c
cxt(0:nfft-1)=cx(0:nfft-1)
! Identify frequencies with strong signals, copy frequency-domain
! data into array cs (strong) or cw (weak).
do i=0,nfft-1
s(i)=real(cxt(i))**2 + aimag(cxt(i))**2
enddo
ave=sum(s(0:nfft-1))/nfft
lstrong(0:nfft-1)=s(0:nfft-1).gt.10.0*ave
nsigs=0
lprev=.false.
iwid=1
ib=-99
do i=0,nfft-1
if(lstrong(i) .and. (.not.lprev)) then
if(nsigs.lt.MAXSIGS) nsigs=nsigs+1
ia(nsigs)=i-iwid
if(ia(nsigs).lt.0) ia(nsigs)=0
endif
if(.not.lstrong(i) .and. lprev) then
ib(nsigs)=i-1+iwid
if(ib(nsigs).gt.nfft-1) ib(nsigs)=nfft-1
endif
lprev=lstrong(i)
enddo
if(nsigs.gt.0) then
do i=1,nsigs
ja=ia(i)
jb=ib(i)
if(ja.lt.0 .or. ja.gt.nfft-1 .or. jb.lt.0 .or. jb.gt.nfft-1) then
cycle
endif
if(jb.eq.-99) jb=ja + min(2*iwid,nfft-1)
lstrong(ja:jb)=.true.
enddo
endif
do i=0,nfft-1
if(lstrong(i)) then
cxs(i)=fac*cxt(i)
cxw(i)=0.
else
cxs(i)=0.
cxw(i)=fac*cxt(i)
endif
enddo
df=12000.0/nfft
i0=nint(1500.0/df)
cxw2(0:nh2)=cxw(i0:i0+nh2)
cxw2(nfft2-nh2:nfft2-1)=cxw(i0-nh2:i0-1)
cxs2(0:nh2)=cxs(i0:i0+nh2)
cxs2(nfft2-nh2:nfft2-1)=cxs(i0-nh2:i0-1)
call four2a(cxw2,nfft2,1,1,1) !Transform weak and strong X
call four2a(cxs2,nfft2,1,1,1) !back to time domain, separately
if(nwindow.eq.2) then
cxw2(0:nh2-1)=cxw2(0:nh2-1)+covxw(0:nh2-1) !Add prev segment's 2nd half
covxw(0:nh2-1)=cxw2(nh2:nfft2-1) !Save 2nd half
cxs2(0:nh2-1)=cxs2(0:nh2-1)+covxs(0:nh2-1) !Ditto for strong signals
covxs(0:nh2-1)=cxs2(nh2:nfft2-1)
endif
! Apply noise blanking to weak data
if(nb.ne.0) then
do i=0,kstep-1
peak=abs(cxw(i))
if(peak.gt.peaklimit) then
cxw2(i)=0.
nzap=nzap+1
endif
enddo
endif
! Compute power levels from weak data only
px=0.
do i=0,kstep-1
px=px + real(cxw2(i))**2 + aimag(cxw2(i))**2
enddo
cx1(0:kstep-1)=cxw2(0:kstep-1) + cxs2(0:kstep-1) !Weak + strong
return
end subroutine timf2x

View File

@ -287,22 +287,8 @@ void MainWindow::readSettings()
m_myGrid=settings.value("MyGrid","").toString();
m_idInt=settings.value("IDint",0).toInt();
m_pttPort=settings.value("PTTport",0).toInt();
m_xpol=settings.value("Xpol",false).toBool();
ui->actionFind_Delta_Phi->setEnabled(m_xpol);
m_xpolx=settings.value("XpolX",false).toBool();
m_saveDir=settings.value("SaveDir",m_appDir + "/save").toString();
m_azelDir=settings.value("AzElDir",m_appDir).toString();
m_dxccPfx=settings.value("DXCCpfx","").toString();
m_timeout=settings.value("Timeout",20).toInt();
m_IQamp=settings.value("IQamp",1.0000).toDouble();
m_IQphase=settings.value("IQphase",0.0).toDouble();
m_applyIQcal=settings.value("ApplyIQcal",0).toInt();
ui->actionApply_IQ_Calibration->setChecked(m_applyIQcal!=0);
m_dPhi=settings.value("dPhi",0).toInt();
m_fCal=settings.value("Fcal",0).toInt();
m_fAdd=settings.value("FAdd",0).toDouble();
m_network = settings.value("NetworkInput",true).toBool();
m_fs96000 = settings.value("FSam96000",true).toBool();
m_nDevIn = settings.value("SoundInIndex", 0).toInt();
m_paInDevice = settings.value("paInDevice",0).toInt();
m_nDevOut = settings.value("SoundOutIndex", 0).toInt();
@ -318,19 +304,14 @@ void MainWindow::readSettings()
m_mode=settings.value("Mode","JT8-1").toString();
ui->actionNone->setChecked(settings.value("SaveNone",true).toBool());
ui->actionSave_all->setChecked(settings.value("SaveAll",false).toBool());
m_NB=settings.value("NB",false).toBool();
ui->NBcheckBox->setChecked(m_NB);
m_NBslider=settings.value("NBslider",40).toInt();
ui->NBslider->setValue(m_NBslider);
m_saveAll=ui->actionSave_all->isChecked();
m_ndepth=settings.value("NDepth",0).toInt();
m_onlyEME=settings.value("NEME",false).toBool();
ui->actionOnly_EME_calls->setChecked(m_onlyEME);
m_kb8rq=settings.value("KB8RQ",false).toBool();
ui->actionF4_sets_Tx6->setChecked(m_kb8rq);
m_gainx=settings.value("GainX",1.0).toFloat();
m_gainy=settings.value("GainY",1.0).toFloat();
m_phasex=settings.value("PhaseX",0.0).toFloat();
m_phasey=settings.value("PhaseY",0.0).toFloat();
m_mult570=settings.value("Mult570",2).toInt();
m_cal570=settings.value("Cal570",0.0).toDouble();
m_colors=settings.value("Colors","000066ff0000ffff00969696646464").toString();
settings.endGroup();
if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() &&
@ -346,19 +327,22 @@ void MainWindow::readSettings()
//-------------------------------------------------------------- dataSink()
void MainWindow::dataSink(int k)
{
static float s[NFFT],splot[NFFT];
static int n=0;
static int ihsym=0;
static int nzap=0;
static int ntr0=0;
static int nkhz;
static int nfsample=96000;
static int nxpol=0;
static float fgreen;
static int ndiskdat;
static int nwrite=0;
static int k0=99999999;
static float px=0.0;
static float pxsmo,spk0,f0;
static float sqave=0.0;
static float green[704];
static int ig=0;
static int nb;
static int nadj=0;
static float px=0.0,py=0.0;
static uchar lstrong[1024];
static float slimit;
if(k < k0) {
nwrite=0;
ig=0;
}
if(m_diskData) {
ndiskdat=1;
@ -367,64 +351,71 @@ void MainWindow::dataSink(int k)
ndiskdat=0;
jt8com_.ndiskdat=0;
}
float d,sq=0;
for(int i=0; i<2048; i++) {
d=jt8com_.d2[k-2048+i];
sq += d*d;
}
px=10.0*log10(sq/2048.0) - 23.0;
sqave=0.95*sqave + 0.05*sq;
float pxave=10.0*log10(sqave/2048.0) - 23.0;
specjtms_(&k,&px,&pxsmo,&spk0,&f0);
// Get power, spectrum, nkhz, and ihsym
nb=0;
if(m_NB) nb=1;
symspecx_(&k, &ndiskdat, &nb, &m_NBslider, &m_TRperiod,
&px, s, &nkhz, &ihsym, &nzap, &slimit, lstrong);
// qDebug() << "A" << k << k/12000 << m_TRperiod << ihsym << px;
QString t;
if(spk0 > 2.0) {
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
int isec=ms/1000;
int imin=ms/60000;
int ihr=imin/60;
imin=imin % 60;
isec=isec % 60;
if(isec<30) isec=0;
if(isec>30) isec=30;
int nutc=10000*ihr + 100*imin + isec;
t.sprintf("%6.6d %4.1f %4.1f %4d",nutc,(k-2048.0)/48000.0,
spk0,int(f0));
ui->decodedTextBrowser->append(t);
}
t.sprintf(" Rx noise: %5.1f ",pxave);
lab2->setText(t);
ui->xThermo->setValue((double)px); //Update the Thermo
/*
m_pctZap=nzap/178.3;
t.sprintf(" Rx noise: %5.1f %5.1f %% ",px,m_pctZap);
lab4->setText(t);
ui->xThermo->setValue((double)px); //Update the thermometer
if(m_monitoring || m_diskData) {
green[ig++]=px;
g_pWideGraph->dataSink2(green,ig-1);
// g_pWideGraph->dataSink2(s,nkhz,ihsym,m_diskData,lstrong);
}
*/
if(nadj == 10) {
if(m_xpol) {
t.sprintf("Amp: %6.4f %6.4f Phase: %6.4f %6.4f",
m_gainx,m_gainy,m_phasex,m_phasey);
} else {
t.sprintf("Amp: %6.4f Phase: %6.4f",m_gainx,m_phasex);
}
ui->decodedTextBrowser->append(t);
m_adjustIQ=0;
}
//Average over specified number of spectra
if (n==0) {
for (int i=0; i<NFFT; i++)
splot[i]=s[i];
} else {
for (int i=0; i<NFFT; i++)
splot[i] += s[i];
}
n++;
if (n>=m_waterfallAvg) {
for (int i=0; i<NFFT; i++) {
splot[i] /= n; //Normalize the average
}
// Time according to this computer
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
int n300 = (ms/100) % 300;
if(n300 >= 295 and nwrite==0) {
nwrite=1;
if(m_saveAll) {
QDateTime t = QDateTime::currentDateTimeUtc();
m_dateTime=t.toString("yyyy-MMM-dd hh:mm");
QString fname=m_saveDir + "/" + m_hisCall + "_" +
t.date().toString("yyMMdd") + "_" +
t.time().toString("hhmmss") + ".wav";
int i0=fname.indexOf(".wav");
if(fname.mid(i0-2,2)=="29") fname=fname.mid(0,i0-2)+"00.wav";
if(fname.mid(i0-2,2)=="59") fname=fname.mid(0,i0-2)+"30.wav";
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
int ntr = (ms/1000) % m_TRperiod;
if((m_diskData && ihsym <= m_waterfallAvg) || (!m_diskData && ntr<ntr0)) {
for (int i=0; i<NFFT; i++) {
splot[i] = 1.e30;
}
}
ntr0=ntr;
n=0;
}
if(ihsym == 184) {
jt8com_.newdat=1;
jt8com_.nagain=0;
QDateTime t = QDateTime::currentDateTimeUtc();
m_dateTime=t.toString("yyyy-MMM-dd hh:mm");
decode(); //Start the decoder
if(m_saveAll and !m_diskData) {
QString fname=m_saveDir + "/" + t.date().toString("yyMMdd") + "_" +
t.time().toString("hhmm") + ".wav";
*future2 = QtConcurrent::run(savewav, fname);
watcher2->setFuture(*future2);
}
}
k0=k;
soundInThread.m_dataSinkBusy=false;
}
@ -632,13 +623,11 @@ void MainWindow::createStatusBar() //createStatusBar
lab4->setFrameStyle(QFrame::Panel | QFrame::Sunken);
statusBar()->addWidget(lab4);
/*
lab5 = new QLabel("");
lab5->setAlignment(Qt::AlignHCenter);
lab5->setMinimumSize(QSize(50,10));
lab5->setFrameStyle(QFrame::Panel | QFrame::Sunken);
statusBar()->addWidget(lab5);
*/
}
void MainWindow::on_tolSpinBox_valueChanged(int i) //tolSpinBox
@ -955,7 +944,7 @@ void MainWindow::guiUpdate()
ba2msg(ba,message);
ba2msg(ba,msgsent);
int len1=28;
genmsk_(message,iwave,&nwave,len1);
// genjt8_(message,iwave,&nwave,len1);
if(m_restart) {
QFile f("wsjtx_tx.log");
f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append);
@ -1336,7 +1325,7 @@ void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
int i1=t.indexOf(" OOO");
QByteArray s=t.toUpper().toLocal8Bit();
ba2msg(s,message);
gen65_(message,&mode65,&samfac,&nsendingsh,msgsent,iwave,&mwave,len1,len1);
// gen65_(message,&mode65,&samfac,&nsendingsh,msgsent,iwave,&mwave,len1,len1);
nsendingsh=0;
QPalette p(tx->palette());
if(nsendingsh==1) {
@ -1467,8 +1456,8 @@ void MainWindow::on_actionJT8_1_triggered()
soundInThread.setPeriod(m_TRperiod);
soundOutThread.setPeriod(m_TRperiod);
g_pWideGraph->setPeriod(m_TRperiod);
lab4->setStyleSheet("QLabel{background-color: #ff6ec7}");
lab4->setText(m_mode);
lab5->setStyleSheet("QLabel{background-color: #ff6ec7}");
lab5->setText(m_mode);
ui->actionJT8_1->setChecked(true);
}
@ -1479,8 +1468,8 @@ void MainWindow::on_actionJT8_2_triggered()
soundInThread.setPeriod(m_TRperiod);
soundOutThread.setPeriod(m_TRperiod);
g_pWideGraph->setPeriod(m_TRperiod);
lab4->setStyleSheet("QLabel{background-color: #ffff00}");
lab4->setText(m_mode);
lab5->setStyleSheet("QLabel{background-color: #ffff00}");
lab5->setText(m_mode);
ui->actionJT8_2->setChecked(true);
}
@ -1491,8 +1480,8 @@ void MainWindow::on_actionJT8_5_triggered()
soundInThread.setPeriod(m_TRperiod);
soundOutThread.setPeriod(m_TRperiod);
g_pWideGraph->setPeriod(m_TRperiod);
lab4->setStyleSheet("QLabel{background-color: #ffa500}");
lab4->setText(m_mode);
lab5->setStyleSheet("QLabel{background-color: #ffa500}");
lab5->setText(m_mode);
ui->actionJT8_5->setChecked(true);
}
@ -1503,8 +1492,8 @@ void MainWindow::on_actionJT8_10_triggered()
soundInThread.setPeriod(m_TRperiod);
soundOutThread.setPeriod(m_TRperiod);
g_pWideGraph->setPeriod(m_TRperiod);
lab4->setStyleSheet("QLabel{background-color: #7fff00}");
lab4->setText(m_mode);
lab5->setStyleSheet("QLabel{background-color: #7fff00}");
lab5->setText(m_mode);
ui->actionJT8_10->setChecked(true);
}
@ -1515,7 +1504,18 @@ void MainWindow::on_actionJT8_30_triggered()
soundInThread.setPeriod(m_TRperiod);
soundOutThread.setPeriod(m_TRperiod);
g_pWideGraph->setPeriod(m_TRperiod);
lab4->setStyleSheet("QLabel{background-color: #97ffff}");
lab4->setText(m_mode);
lab5->setStyleSheet("QLabel{background-color: #97ffff}");
lab5->setText(m_mode);
ui->actionJT8_30->setChecked(true);
}
void MainWindow::on_NBcheckBox_toggled(bool checked)
{
m_NB=checked;
ui->NBslider->setEnabled(m_NB);
}
void MainWindow::on_NBslider_valueChanged(int n)
{
m_NBslider=n;
}

View File

@ -113,6 +113,10 @@ private slots:
void on_actionJT8_10_triggered();
void on_NBcheckBox_toggled(bool checked);
void on_NBslider_valueChanged(int value);
private:
Ui::MainWindow *ui;
qint32 m_nDevIn;
@ -243,12 +247,12 @@ extern void getDev(int* numDevices,char hostAPI_DeviceName[][50],
extern "C" {
//----------------------------------------------------- C and Fortran routines
void specjtms_(int* k, float* px, float* pxsmo, float* spk0, float* f0);
void genjtms3_(char* message, short iwave[], int* nwave, int len1);
void genmsk_(char* message, short iwave[], int* nwave, int len1);
void gen65_(char* msg, int* mode65, double* samfac, int* nsendingsh,
char* msgsent, short iwave[], int* nwave, int len1, int len2);
int ptt_(int* nport, int* itx, int* iptt);
void symspecx_(int* k, int* ndiskdat, int* nb, int* m_NBslider,
int* ntrperiod, float* px, float s[], int* nkhz,
int* nhsym, int* nzap, float* slimit, uchar lstrong[]);
void genjt8_(char* msg, char* msgsent, short itone[], int* nsym,
int len1, int len2);
int ptt_(int* nport, int* itx, int* iptt);
}
#endif // MAINWINDOW_H

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@ extern struct {
float savg[32768];
double fcenter; //USB dial freq (kHz)
int nutc; //UTC as integer, HHMM
int ntrperiod; //TR period (seconds)
int mousedf; //User-selected DF
int mousefqso; //User-selected QSO freq (kHz)
int nagain; //1 ==> decode only at fQSO +/- Tol
@ -22,7 +23,6 @@ extern struct {
int ntol; //+/- decoding range around fQSO (Hz)
int map65RxLog; //Flags to control log files
int nfsample; //Input sample rate
int ntrperiod;
int nsave; //Number of s3(64,63) spectra saved
int kin;
int kline;
@ -114,10 +114,10 @@ void SoundInThread::run() //SoundInThread::run()
}
bool qe = quitExecution;
int n30z=99;
int ntr0=99;
int k=0;
int nsec;
int n30;
int ntr;
int nBusy=0;
int nstep0=0;
@ -127,10 +127,10 @@ void SoundInThread::run() //SoundInThread::run()
if (qe) break;
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
nsec = ms/1000; // Time according to this computer
n30 = nsec % 30;
ntr = nsec % m_TRperiod;
// Reset buffer pointer and symbol number at start of minute
if(n30 < n30z or !m_monitoring) {
if(ntr < ntr0 or !m_monitoring) {
nstep0=0;
udata.bzero=true;
}
@ -148,7 +148,7 @@ void SoundInThread::run() //SoundInThread::run()
}
}
msleep(10);
n30z=n30;
ntr0=ntr;
}
Pa_StopStream(inStream);
Pa_CloseStream(inStream);

View File

@ -6,7 +6,7 @@
QT += core gui network
CONFIG += qwt thread
#CONFIG += console
CONFIG += console
TARGET = wsjtx
VERSION = 0.2