Correct UTC on waterfall for slow modes.

Tweak some GUI widget placements.
Send stderr to file wsjtx.log.
Fix formatting of std message with "R -7", etc., to "R-7".
Introduce calls to "timer".
Remove console.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2727 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-11-14 15:30:21 +00:00
parent 34986b0076
commit 1a3fc1d963
11 changed files with 64 additions and 25 deletions

View File

@ -15,10 +15,21 @@ subroutine decoder(ntrSeconds,ndepth,nRxLog,c00)
common/jt9com/ss0(184,NSMAX),savg(NSMAX),id2(NMAX),nutc0,ndiskdat, &
ntr,nfqso,newdat,npts80,nfb,ntol,kin,nsynced,ndecoded
common/jt9comB/ss(184,NSMAX),c0
common/tracer/limtrace,lu
logical first
data first/.true./
save
if(first) then
limtrace=0
lu=12
open(12,file='timer.out',status='unknown')
open(14,file='wsjtx_rx.log',status='unknown',position='append')
first=.false.
endif
call timer('decoder ',0)
if(newdat.ne.0) then
ss=ss0
c0=c00
@ -38,7 +49,7 @@ subroutine decoder(ntrSeconds,ndepth,nRxLog,c00)
if(ntrMinutes.eq.1) then
nsps=6912
df3=1500.0/2048.0
fmt='(i4.4,i4,i5,f6.1,f8.0,f6.2,3x,a22)'
fmt='(i4.4,i4,i5,f6.1,f8.0,f6.1,3x,a22)'
else if(ntrMinutes.eq.2) then
nsps=15360
df3=1500.0/2048.0
@ -61,14 +72,12 @@ subroutine decoder(ntrSeconds,ndepth,nRxLog,c00)
kstep=nsps/2
tstep=kstep/12000.0
call timer('sync9 ',0)
call sync9(ss,tstep,df3,ntol,nfqso,ccfred,ia,ib,ipk) ! Get sync, approx freq
call timer('sync9 ',1)
open(13,file='decoded.txt',status='unknown')
rewind 13
if(first) then
open(14,file='wsjtx_rx.log',status='unknown',position='append')
first=.false.
endif
if(iand(nRxLog,2).ne.0) rewind 14
if(iand(nRxLog,1).ne.0) then
! Write date and time to lu 14
@ -80,8 +89,13 @@ subroutine decoder(ntrSeconds,ndepth,nRxLog,c00)
do i=ia,ib
f=(i-1)*df3
if((i.eq.ipk .or. ccfred(i).ge.3.0) .and. f.gt.fgood+10.0*df8) then
call timer('spec9 ',0)
call spec9(c0,npts8,nsps,f,fpk,xdt,snr,i1SoftSymbols)
call timer('spec9 ',1)
call timer('decode9 ',0)
call decode9(i1SoftSymbols,limit,nlim,msg)
call timer('decode9 ',1)
sync=ccfred(i) - 2.0
if(sync.lt.0.0) sync=0.0
nsync=sync
@ -115,5 +129,8 @@ subroutine decoder(ntrSeconds,ndepth,nRxLog,c00)
call flush(14)
close(13)
call timer('decoder ',1)
call timer('decoder ',101)
return
end subroutine decoder

View File

@ -15,15 +15,14 @@ subroutine peakdt9(c0,npts8,nsps8,istart,foffset,idtpk)
i0=istart + 0.0625*nsps8*idt
sum=0.
do j=1,16
i1=(ii(j)-1)*nsps8 + i0
i1=max(0,(ii(j)-1)*nsps8 + i0)
i2=min(npts8-1,i1+nsps8-1)
phi=0.
zsum=0.
do i=i1,i1+nsps8-1
do i=i1,i2
if(i.lt.0 .or. i.gt.npts8-1) cycle
phi=phi + dphi
if(i.ge.0 .and. i.le.npts8-1) then
zsum=zsum + c0(i)*cmplx(cos(phi),-sin(phi))
endif
zsum=zsum + c0(i)*cmplx(cos(phi),-sin(phi))
enddo
sum=sum + real(zsum)**2 + aimag(zsum)**2
enddo

View File

@ -35,13 +35,19 @@ subroutine spec9(c0,npts8,nsps,fpk0,fpk,xdt,snrdb,i1SoftSymbols)
foffset=fpk0
istart=1520
call timer('peakdt9 ',0)
call peakdt9(c1,npts8,nsps8,istart,foffset,idt)
call timer('peakdt9 ',1)
istart=istart + 0.0625*nsps8*idt
xdt=istart/1500.0 - 1.0
call timer('peakdf9 ',0)
call peakdf9(c1,npts8,nsps8,istart,foffset,idf)
call timer('peakdf9 ',1)
fpk=fpk0 + idf*0.1*1500.0/nsps8
foffset=foffset + idf*0.1*1500.0/nsps8
twopi=8.0*atan(1.0)
dphi=twopi*foffset/1500.0
nfft=nsps8

View File

@ -27,6 +27,7 @@ MainWindow::MainWindow(QWidget *parent) :
{
ui->setupUi(this);
freopen("wsjtx.log","w",stderr);
on_EraseButton_clicked();
ui->labUTC->setStyleSheet( \
"QLabel { background-color : black; color : yellow; }");
@ -1151,6 +1152,7 @@ void MainWindow::doubleClickOnCall(QString hiscall, bool ctrl)
m_txFirst=(nmod!=0);
ui->txFirstCheckBox->setChecked(m_txFirst);
QString rpt=t2.mid(10,3);
if(rpt.indexOf(" ")==0) rpt=rpt.mid(1,2);
if(ctrl) {
int i4=t.mid(i2,20).indexOf(" ");
QString hisgrid=t.mid(i2,20).mid(i4+1,4);

View File

@ -66,7 +66,7 @@
</size>
</property>
<property name="title">
<string> UTC Sync dB DT Freq Drift</string>
<string> UTC Sync dB DT Freq Drift</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
@ -292,7 +292,7 @@ p, li { white-space: pre-wrap; }
<property name="maximumSize">
<size>
<width>16777215</width>
<height>190</height>
<height>170</height>
</size>
</property>
<property name="minimum">
@ -510,6 +510,22 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>

View File

@ -162,6 +162,7 @@ void CPlotter::UTCstr()
imin=ms/60000;
ihr=imin/60;
imin=imin % 60;
imin=imin - (imin % (m_TRperiod/60));
}
if(isec<30) isec=0;
if(isec>=30) isec=30;
@ -551,9 +552,10 @@ double CPlotter::fGreen()
return m_fGreen;
}
void CPlotter::setNsps(int n) //setNSpan()
void CPlotter::setNsps(int ntrperiod, int nsps) //setNSpan()
{
m_nsps=n;
m_TRperiod=ntrperiod;
m_nsps=nsps;
m_fftBinWidth=1500.0/2048.0;
if(m_nsps==15360) m_fftBinWidth=1500.0/2048.0;
if(m_nsps==40960) m_fftBinWidth=1500.0/6144.0;

View File

@ -61,11 +61,10 @@ public:
int autoZero();
void setPalette(QString palette);
void setFsample(int n);
void setNsps(int n);
void setNsps(int ntrperiod, int nsps);
double fGreen();
void SetPercent2DScreen(int percent){m_Percent2DScreen=percent;}
signals:
void freezeDecode0(int n);
void freezeDecode1(int n);
@ -115,6 +114,7 @@ private:
qint32 m_h1;
qint32 m_h2;
qint32 m_tol;
qint32 m_TRperiod;
private slots:
void mousePressEvent(QMouseEvent *event);

View File

@ -47,10 +47,4 @@ private:
qint32 m_nsps;
bool m_monitoring;
};
extern "C" {
void recvpkt_(int* nsam, quint16* iblk, qint8* nrx, int* k, double s1[],
double s2[], double s3[]);
}
#endif // SOUNDIN_H

View File

@ -259,7 +259,7 @@ void WideGraph::setPeriod(int ntrperiod, int nsps)
{
m_TRperiod=ntrperiod;
m_nsps=nsps;
ui->widePlot->setNsps(nsps);
ui->widePlot->setNsps(ntrperiod, nsps);
}
void WideGraph::on_rbCurrent_clicked()

View File

@ -322,6 +322,9 @@
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>USB Dial Freq (kHz)</string>
</property>
@ -330,7 +333,7 @@
<item>
<widget class="QLineEdit" name="fDialLineEdit">
<property name="enabled">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">

View File

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