More tweaks of decoding process. Add TxFreq button.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2674 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-10-20 20:52:29 +00:00
parent 1fc98e56b8
commit 5a74450d30
8 changed files with 65 additions and 20 deletions

View File

@ -36,7 +36,7 @@ subroutine decode9(i1SoftSymbols,msg)
msg=' '
nbits=72
ndelta=17
limit=10000
limit=100000
call fano232(i1SoftSymbols,nbits+31,mettab,ndelta,limit,i1DecodedBytes, &
ncycles,metric,ierr)

View File

@ -9,7 +9,7 @@ subroutine decoder(ntrSeconds,c0)
parameter (NDMAX=1800*1500) !Sample intervals at 1500 Hz rate
parameter (NSMAX=22000) !Max length of saved spectra
character*22 msg
real*4 red(NSMAX)
real*4 ccfred(NSMAX)
integer*1 i1SoftSymbols(207)
integer*2 id2
complex c0(NDMAX)
@ -44,16 +44,16 @@ subroutine decoder(ntrSeconds,c0)
tstep=kstep/12000.0
! Get sync, approx freq
call sync9(ss,tstep,df3,ntol,nfqso,sync,fpk,red)
print*,'A',nfqso,ntol,fpk
call spec9(c0,npts8,nsps,fpk,xdt,i1SoftSymbols)
call sync9(ss,tstep,df3,ntol,nfqso,sync,snr,fpk0,ccfred)
call spec9(c0,npts8,nsps,fpk0,fpk,xdt,i1SoftSymbols)
call decode9(i1SoftSymbols,msg)
open(13,file='decoded.txt',status='unknown')
rewind 13
! write(*,1010) nutc,sync,xdt,1000.0+fpk,msg
write(13,1010) nutc,sync,xdt,1000.0+fpk,msg
1010 format(i4.4,3f7.1,2x,a22)
nsync=sync
write(13,1010) nutc,nsync,snr,xdt,1000.0+fpk,msg
1010 format(i4.4,i4,f7.1,f6.1,f8.1,3x,a22,e12.3)
call flush(13)
close(13)

View File

@ -1,4 +1,4 @@
subroutine spec9(c0,npts8,nsps,fpk,xdt,i1SoftSymbols)
subroutine spec9(c0,npts8,nsps,fpk0,fpk,xdt,i1SoftSymbols)
parameter (MAXFFT=31500)
complex c0(0:npts8-1)
@ -21,6 +21,12 @@ subroutine spec9(c0,npts8,nsps,fpk,xdt,i1SoftSymbols)
save
! Fix up the data in c0()
sum=0.
do i=0,npts8-1
sum=sum + real(c0(i))**2 + aimag(c0(i))**2
enddo
rms=sqrt(sum/npts8)
fac=1.0/rms
twopi=8.0*atan(1.0)
phi=0.
dphi=twopi*500.0/1500.0
@ -28,15 +34,15 @@ subroutine spec9(c0,npts8,nsps,fpk,xdt,i1SoftSymbols)
phi=phi+dphi
if(phi.gt.twopi) phi=phi-twopi
if(phi.lt.-twopi) phi=phi+twopi
c1(i)=cmplx(aimag(c0(i)),real(c0(i)))*cmplx(cos(phi),sin(phi))
c1(i)=fac*cmplx(aimag(c0(i)),real(c0(i)))*cmplx(cos(phi),sin(phi))
enddo
nsps8=nsps/8
foffset=fpk
foffset=fpk0
istart=1520
call peakdf9(c1,npts8,nsps8,istart,foffset,idf)
fpk=fpk + idf*0.1*1500.0/nsps8
fpk=fpk0 + idf*0.1*1500.0/nsps8
foffset=foffset + idf*0.1*1500.0/nsps8
call peakdt9(c1,npts8,nsps8,istart,foffset,idt)
istart=istart + 0.0625*nsps8*idt

View File

@ -135,11 +135,12 @@ subroutine symspec(k,ntrperiod,nsps,nb,nbslider,pxdb,s,red, &
999 continue
call pctile(s,iz,50,xmed0)
s(1:iz)=s(1:iz)/xmed0
call pctile(ssum,iz,50,xmed1)
savg(1:iz)=ssum(1:iz)/xmed1
! call pctile(s,iz,50,xmed0)
ave0=sum(s(1:iz))/iz
s(1:iz)=s(1:iz)/ave0
! call pctile(ssum,iz,50,xmed1)
ave1=sum(ssum(1:iz))/iz
savg(1:iz)=ssum(1:iz)/ave1
call redsync(ss,ntrperiod,ihsym,iz,red)
return

View File

@ -1,4 +1,4 @@
subroutine sync9(ss,tstep,df3,ntol,nfqso,sync,fpk,ccfred)
subroutine sync9(ss,tstep,df3,ntol,nfqso,sync,snr,fpk,ccfred)
parameter (NSMAX=22000) !Max length of saved spectra
real ss(184,NSMAX)
@ -52,8 +52,20 @@ subroutine sync9(ss,tstep,df3,ntol,nfqso,sync,fpk,ccfred)
ccfred(i)=smax
enddo
sum=0.
nsum=0
do i=ia,ib
if(abs(i-ipkbest).ge.2) then
sum=sum+ccfred(i)
nsum=nsum+1
endif
enddo
ave=sum/nsum
snr=10.0*log10(sbest/ave) - 10.0*log10(2500.0/df3)
sync=sbest/ave - 2.0
if(sync.lt.0.0) sync=0.0
if(sync.gt.10.0) sync=10.0
fpk=(ipkbest-1)*df3
sync=sbest
return
end subroutine sync9

View File

@ -1413,3 +1413,10 @@ void MainWindow::on_TxFreqSpinBox_valueChanged(int n)
m_txFreq=n;
soundOutThread.setTxFreq(n);
}
void MainWindow::on_pbTxFreq_clicked()
{
int ntx=g_pWideGraph->QSOfreq();
m_txFreq=ntx;
ui->TxFreqSpinBox->setValue(ntx);
}

View File

@ -108,6 +108,7 @@ private slots:
void on_NBcheckBox_toggled(bool checked);
void on_NBslider_valueChanged(int value);
void on_TxFreqSpinBox_valueChanged(int arg1);
void on_pbTxFreq_clicked();
private:
Ui::MainWindow *ui;
@ -136,7 +137,6 @@ private:
qint32 m_nsps;
qint32 m_hsymStop;
qint32 m_len1;
qint32 m_fQSO;
bool m_monitoring;
bool m_transmitting;

View File

@ -66,7 +66,7 @@
</size>
</property>
<property name="title">
<string> UTC T dB Freq</string>
<string> UTC Sync dB DT Freq</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
@ -574,6 +574,25 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbTxFreq">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Tx = QSO Freq</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">