mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 20:58:55 -05:00
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:
parent
95dd3a6803
commit
05322bb4f2
@ -15,10 +15,21 @@ subroutine decoder(ntrSeconds,ndepth,nRxLog,c00)
|
|||||||
common/jt9com/ss0(184,NSMAX),savg(NSMAX),id2(NMAX),nutc0,ndiskdat, &
|
common/jt9com/ss0(184,NSMAX),savg(NSMAX),id2(NMAX),nutc0,ndiskdat, &
|
||||||
ntr,nfqso,newdat,npts80,nfb,ntol,kin,nsynced,ndecoded
|
ntr,nfqso,newdat,npts80,nfb,ntol,kin,nsynced,ndecoded
|
||||||
common/jt9comB/ss(184,NSMAX),c0
|
common/jt9comB/ss(184,NSMAX),c0
|
||||||
|
common/tracer/limtrace,lu
|
||||||
logical first
|
logical first
|
||||||
data first/.true./
|
data first/.true./
|
||||||
save
|
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
|
if(newdat.ne.0) then
|
||||||
ss=ss0
|
ss=ss0
|
||||||
c0=c00
|
c0=c00
|
||||||
@ -38,7 +49,7 @@ subroutine decoder(ntrSeconds,ndepth,nRxLog,c00)
|
|||||||
if(ntrMinutes.eq.1) then
|
if(ntrMinutes.eq.1) then
|
||||||
nsps=6912
|
nsps=6912
|
||||||
df3=1500.0/2048.0
|
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
|
else if(ntrMinutes.eq.2) then
|
||||||
nsps=15360
|
nsps=15360
|
||||||
df3=1500.0/2048.0
|
df3=1500.0/2048.0
|
||||||
@ -61,14 +72,12 @@ subroutine decoder(ntrSeconds,ndepth,nRxLog,c00)
|
|||||||
kstep=nsps/2
|
kstep=nsps/2
|
||||||
tstep=kstep/12000.0
|
tstep=kstep/12000.0
|
||||||
|
|
||||||
|
call timer('sync9 ',0)
|
||||||
call sync9(ss,tstep,df3,ntol,nfqso,ccfred,ia,ib,ipk) ! Get sync, approx freq
|
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')
|
open(13,file='decoded.txt',status='unknown')
|
||||||
rewind 13
|
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,2).ne.0) rewind 14
|
||||||
if(iand(nRxLog,1).ne.0) then
|
if(iand(nRxLog,1).ne.0) then
|
||||||
! Write date and time to lu 14
|
! Write date and time to lu 14
|
||||||
@ -80,8 +89,13 @@ subroutine decoder(ntrSeconds,ndepth,nRxLog,c00)
|
|||||||
do i=ia,ib
|
do i=ia,ib
|
||||||
f=(i-1)*df3
|
f=(i-1)*df3
|
||||||
if((i.eq.ipk .or. ccfred(i).ge.3.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 timer('spec9 ',0)
|
||||||
call spec9(c0,npts8,nsps,f,fpk,xdt,snr,i1SoftSymbols)
|
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 decode9(i1SoftSymbols,limit,nlim,msg)
|
||||||
|
call timer('decode9 ',1)
|
||||||
sync=ccfred(i) - 2.0
|
sync=ccfred(i) - 2.0
|
||||||
if(sync.lt.0.0) sync=0.0
|
if(sync.lt.0.0) sync=0.0
|
||||||
nsync=sync
|
nsync=sync
|
||||||
@ -115,5 +129,8 @@ subroutine decoder(ntrSeconds,ndepth,nRxLog,c00)
|
|||||||
call flush(14)
|
call flush(14)
|
||||||
close(13)
|
close(13)
|
||||||
|
|
||||||
|
call timer('decoder ',1)
|
||||||
|
call timer('decoder ',101)
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine decoder
|
end subroutine decoder
|
||||||
|
@ -15,15 +15,14 @@ subroutine peakdt9(c0,npts8,nsps8,istart,foffset,idtpk)
|
|||||||
i0=istart + 0.0625*nsps8*idt
|
i0=istart + 0.0625*nsps8*idt
|
||||||
sum=0.
|
sum=0.
|
||||||
do j=1,16
|
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.
|
phi=0.
|
||||||
zsum=0.
|
zsum=0.
|
||||||
do i=i1,i1+nsps8-1
|
do i=i1,i2
|
||||||
if(i.lt.0 .or. i.gt.npts8-1) cycle
|
if(i.lt.0 .or. i.gt.npts8-1) cycle
|
||||||
phi=phi + dphi
|
phi=phi + dphi
|
||||||
if(i.ge.0 .and. i.le.npts8-1) then
|
|
||||||
zsum=zsum + c0(i)*cmplx(cos(phi),-sin(phi))
|
zsum=zsum + c0(i)*cmplx(cos(phi),-sin(phi))
|
||||||
endif
|
|
||||||
enddo
|
enddo
|
||||||
sum=sum + real(zsum)**2 + aimag(zsum)**2
|
sum=sum + real(zsum)**2 + aimag(zsum)**2
|
||||||
enddo
|
enddo
|
||||||
|
@ -35,13 +35,19 @@ subroutine spec9(c0,npts8,nsps,fpk0,fpk,xdt,snrdb,i1SoftSymbols)
|
|||||||
foffset=fpk0
|
foffset=fpk0
|
||||||
istart=1520
|
istart=1520
|
||||||
|
|
||||||
|
call timer('peakdt9 ',0)
|
||||||
call peakdt9(c1,npts8,nsps8,istart,foffset,idt)
|
call peakdt9(c1,npts8,nsps8,istart,foffset,idt)
|
||||||
|
call timer('peakdt9 ',1)
|
||||||
istart=istart + 0.0625*nsps8*idt
|
istart=istart + 0.0625*nsps8*idt
|
||||||
xdt=istart/1500.0 - 1.0
|
xdt=istart/1500.0 - 1.0
|
||||||
|
|
||||||
|
call timer('peakdf9 ',0)
|
||||||
call peakdf9(c1,npts8,nsps8,istart,foffset,idf)
|
call peakdf9(c1,npts8,nsps8,istart,foffset,idf)
|
||||||
|
call timer('peakdf9 ',1)
|
||||||
|
|
||||||
fpk=fpk0 + idf*0.1*1500.0/nsps8
|
fpk=fpk0 + idf*0.1*1500.0/nsps8
|
||||||
foffset=foffset + idf*0.1*1500.0/nsps8
|
foffset=foffset + idf*0.1*1500.0/nsps8
|
||||||
|
|
||||||
twopi=8.0*atan(1.0)
|
twopi=8.0*atan(1.0)
|
||||||
dphi=twopi*foffset/1500.0
|
dphi=twopi*foffset/1500.0
|
||||||
nfft=nsps8
|
nfft=nsps8
|
||||||
|
@ -27,6 +27,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
freopen("wsjtx.log","w",stderr);
|
||||||
on_EraseButton_clicked();
|
on_EraseButton_clicked();
|
||||||
ui->labUTC->setStyleSheet( \
|
ui->labUTC->setStyleSheet( \
|
||||||
"QLabel { background-color : black; color : yellow; }");
|
"QLabel { background-color : black; color : yellow; }");
|
||||||
@ -1151,6 +1152,7 @@ void MainWindow::doubleClickOnCall(QString hiscall, bool ctrl)
|
|||||||
m_txFirst=(nmod!=0);
|
m_txFirst=(nmod!=0);
|
||||||
ui->txFirstCheckBox->setChecked(m_txFirst);
|
ui->txFirstCheckBox->setChecked(m_txFirst);
|
||||||
QString rpt=t2.mid(10,3);
|
QString rpt=t2.mid(10,3);
|
||||||
|
if(rpt.indexOf(" ")==0) rpt=rpt.mid(1,2);
|
||||||
if(ctrl) {
|
if(ctrl) {
|
||||||
int i4=t.mid(i2,20).indexOf(" ");
|
int i4=t.mid(i2,20).indexOf(" ");
|
||||||
QString hisgrid=t.mid(i2,20).mid(i4+1,4);
|
QString hisgrid=t.mid(i2,20).mid(i4+1,4);
|
||||||
|
@ -292,7 +292,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>190</height>
|
<height>170</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
@ -510,6 +510,22 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -162,6 +162,7 @@ void CPlotter::UTCstr()
|
|||||||
imin=ms/60000;
|
imin=ms/60000;
|
||||||
ihr=imin/60;
|
ihr=imin/60;
|
||||||
imin=imin % 60;
|
imin=imin % 60;
|
||||||
|
imin=imin - (imin % (m_TRperiod/60));
|
||||||
}
|
}
|
||||||
if(isec<30) isec=0;
|
if(isec<30) isec=0;
|
||||||
if(isec>=30) isec=30;
|
if(isec>=30) isec=30;
|
||||||
@ -551,9 +552,10 @@ double CPlotter::fGreen()
|
|||||||
return m_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;
|
m_fftBinWidth=1500.0/2048.0;
|
||||||
if(m_nsps==15360) 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;
|
if(m_nsps==40960) m_fftBinWidth=1500.0/6144.0;
|
||||||
|
@ -61,11 +61,10 @@ public:
|
|||||||
int autoZero();
|
int autoZero();
|
||||||
void setPalette(QString palette);
|
void setPalette(QString palette);
|
||||||
void setFsample(int n);
|
void setFsample(int n);
|
||||||
void setNsps(int n);
|
void setNsps(int ntrperiod, int nsps);
|
||||||
double fGreen();
|
double fGreen();
|
||||||
void SetPercent2DScreen(int percent){m_Percent2DScreen=percent;}
|
void SetPercent2DScreen(int percent){m_Percent2DScreen=percent;}
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void freezeDecode0(int n);
|
void freezeDecode0(int n);
|
||||||
void freezeDecode1(int n);
|
void freezeDecode1(int n);
|
||||||
@ -115,6 +114,7 @@ private:
|
|||||||
qint32 m_h1;
|
qint32 m_h1;
|
||||||
qint32 m_h2;
|
qint32 m_h2;
|
||||||
qint32 m_tol;
|
qint32 m_tol;
|
||||||
|
qint32 m_TRperiod;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void mousePressEvent(QMouseEvent *event);
|
void mousePressEvent(QMouseEvent *event);
|
||||||
|
@ -47,10 +47,4 @@ private:
|
|||||||
qint32 m_nsps;
|
qint32 m_nsps;
|
||||||
bool m_monitoring;
|
bool m_monitoring;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
void recvpkt_(int* nsam, quint16* iblk, qint8* nrx, int* k, double s1[],
|
|
||||||
double s2[], double s3[]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // SOUNDIN_H
|
#endif // SOUNDIN_H
|
||||||
|
@ -259,7 +259,7 @@ void WideGraph::setPeriod(int ntrperiod, int nsps)
|
|||||||
{
|
{
|
||||||
m_TRperiod=ntrperiod;
|
m_TRperiod=ntrperiod;
|
||||||
m_nsps=nsps;
|
m_nsps=nsps;
|
||||||
ui->widePlot->setNsps(nsps);
|
ui->widePlot->setNsps(ntrperiod, nsps);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WideGraph::on_rbCurrent_clicked()
|
void WideGraph::on_rbCurrent_clicked()
|
||||||
|
@ -322,6 +322,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>USB Dial Freq (kHz)</string>
|
<string>USB Dial Freq (kHz)</string>
|
||||||
</property>
|
</property>
|
||||||
@ -330,7 +333,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="fDialLineEdit">
|
<widget class="QLineEdit" name="fDialLineEdit">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
Loading…
Reference in New Issue
Block a user