mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-20 20:48:42 -05:00
Save and restore fQSO.
Decode mjultiple signals inside the "Tol" green bar, rather than just the one producing highest value of sync. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2701 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
4829eeb76e
commit
aadb7e4bbf
@ -9,6 +9,7 @@ subroutine decoder(ntrSeconds,nRxLog,c0)
|
|||||||
parameter (NDMAX=1800*1500) !Sample intervals at 1500 Hz rate
|
parameter (NDMAX=1800*1500) !Sample intervals at 1500 Hz rate
|
||||||
parameter (NSMAX=22000) !Max length of saved spectra
|
parameter (NSMAX=22000) !Max length of saved spectra
|
||||||
character*22 msg
|
character*22 msg
|
||||||
|
character*33 line
|
||||||
real*4 ccfred(NSMAX)
|
real*4 ccfred(NSMAX)
|
||||||
integer*1 i1SoftSymbols(207)
|
integer*1 i1SoftSymbols(207)
|
||||||
integer*2 id2
|
integer*2 id2
|
||||||
@ -46,19 +47,10 @@ subroutine decoder(ntrSeconds,nRxLog,c0)
|
|||||||
tstep=kstep/12000.0
|
tstep=kstep/12000.0
|
||||||
|
|
||||||
! Get sync, approx freq
|
! Get sync, approx freq
|
||||||
call sync9(ss,tstep,df3,ntol,nfqso,sync,snr,fpk0,ccfred)
|
call sync9(ss,tstep,df3,ntol,nfqso,ccfred,ia,ib,ipk)
|
||||||
call spec9(c0,npts8,nsps,fpk0,fpk,xdt,i1SoftSymbols)
|
|
||||||
call decode9(i1SoftSymbols,msg)
|
|
||||||
|
|
||||||
nsync=sync
|
|
||||||
nsnr=nint(snr)
|
|
||||||
width=0.0
|
|
||||||
open(13,file='decoded.txt',status='unknown')
|
open(13,file='decoded.txt',status='unknown')
|
||||||
rewind 13
|
rewind 13
|
||||||
write(13,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
|
|
||||||
1010 format(i4.4,i4,i5,f6.1,f8.2,f6.2,3x,a22)
|
|
||||||
call flush(13)
|
|
||||||
close(13)
|
|
||||||
if(first) then
|
if(first) then
|
||||||
open(14,file='wsjtx_rx.log',status='unknown',position='append')
|
open(14,file='wsjtx_rx.log',status='unknown',position='append')
|
||||||
first=.false.
|
first=.false.
|
||||||
@ -67,8 +59,48 @@ subroutine decoder(ntrSeconds,nRxLog,c0)
|
|||||||
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
|
||||||
endif
|
endif
|
||||||
write(14,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
|
|
||||||
|
fgood=0.
|
||||||
|
df8=1500.0/(nsps/8)
|
||||||
|
sbest=0.
|
||||||
|
do i=ia,ib
|
||||||
|
f=(i-1)*df3
|
||||||
|
if((i.eq.ipk .or. ccfred(i).ge.10.0) .and. f.gt.fgood+10.0*df8) then
|
||||||
|
call spec9(c0,npts8,nsps,f,fpk,xdt,i1SoftSymbols)
|
||||||
|
call decode9(i1SoftSymbols,msg)
|
||||||
|
call pctile(ccfred(ia),ib-ia+1,50,xmed)
|
||||||
|
|
||||||
|
snr=10.0*log10(ccfred(i)/xmed) - 10.0*log10(2500.0/df3) + 2.0
|
||||||
|
sync=ccfred(i)/xmed - 2.0
|
||||||
|
if(sync.lt.0.0) sync=0.0
|
||||||
|
nsync=sync
|
||||||
|
if(nsync.gt.10) nsync=10
|
||||||
|
nsnr=nint(snr)
|
||||||
|
width=0.0
|
||||||
|
|
||||||
|
if(ccfred(i).gt.sbest .and. fgood.eq.0.0) then
|
||||||
|
sbest=ccfred(i)
|
||||||
|
write(line,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width
|
||||||
|
endif
|
||||||
|
|
||||||
|
if(msg.ne.' ') then
|
||||||
|
write(13,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
|
||||||
|
1010 format(i4.4,i4,i5,f6.1,f8.2,f6.2,3x,a22)
|
||||||
|
write(14,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
|
||||||
|
fgood=f
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
|
||||||
|
if(fgood.eq.0.0) then
|
||||||
|
write(13,1020) line
|
||||||
|
write(14,1020) line
|
||||||
|
1020 format(a33)
|
||||||
|
endif
|
||||||
|
|
||||||
|
call flush(13)
|
||||||
call flush(14)
|
call flush(14)
|
||||||
|
close(13)
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine decoder
|
end subroutine decoder
|
||||||
|
@ -135,13 +135,15 @@ subroutine symspec(k,ntrperiod,nsps,nb,nbslider,pxdb,s,red, &
|
|||||||
|
|
||||||
999 continue
|
999 continue
|
||||||
|
|
||||||
! call pctile(s,iz,50,xmed0)
|
call pctile(s,iz,50,xmed0)
|
||||||
ave0=sum(s(1:iz))/iz
|
fac0=1.0/max(xmed0,0.006)
|
||||||
fac0=1.0/max(ave0,0.006)
|
! ave0=sum(s(1:iz))/iz
|
||||||
|
! fac0=1.0/max(ave0,0.006)
|
||||||
s(1:iz)=fac0*s(1:iz)
|
s(1:iz)=fac0*s(1:iz)
|
||||||
! call pctile(ssum,iz,50,xmed1)
|
call pctile(ssum,iz,50,xmed1)
|
||||||
ave1=sum(ssum(1:iz))/iz
|
fac1=1.0/max(xmed1,0.006*ihsym)
|
||||||
fac1=1.0/max(ave1,0.006*ihsym)
|
! ave1=sum(ssum(1:iz))/iz
|
||||||
|
! fac1=1.0/max(ave1,0.006*ihsym)
|
||||||
savg(1:iz)=fac1*ssum(1:iz)
|
savg(1:iz)=fac1*ssum(1:iz)
|
||||||
call redsync(ss,ntrperiod,ihsym,iz,red)
|
call redsync(ss,ntrperiod,ihsym,iz,red)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine sync9(ss,tstep,df3,ntol,nfqso,sync,snr,fpk,ccfred)
|
subroutine sync9(ss,tstep,df3,ntol,nfqso,ccfred,ia,ib,ipkbest)
|
||||||
|
|
||||||
parameter (NSMAX=22000) !Max length of saved spectra
|
parameter (NSMAX=22000) !Max length of saved spectra
|
||||||
real ss(184,NSMAX)
|
real ss(184,NSMAX)
|
||||||
@ -27,7 +27,8 @@ subroutine sync9(ss,tstep,df3,ntol,nfqso,sync,snr,fpk,ccfred)
|
|||||||
sum=0.
|
sum=0.
|
||||||
do j=1,16
|
do j=1,16
|
||||||
k=ii2(j) + lag
|
k=ii2(j) + lag
|
||||||
if(k.ge.1) sum=sum + ss(k,i)
|
! if(k.ge.1) sum=sum + ss(k,i)
|
||||||
|
if(k.ge.1) sum=sum + ss(k,i) - 0.5*(ss(k+2,i)+ss(k+4,i))
|
||||||
enddo
|
enddo
|
||||||
if(sum.gt.smax) then
|
if(sum.gt.smax) then
|
||||||
smax=sum
|
smax=sum
|
||||||
@ -43,27 +44,5 @@ subroutine sync9(ss,tstep,df3,ntol,nfqso,sync,snr,fpk,ccfred)
|
|||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
sum=0.
|
|
||||||
nsum=0
|
|
||||||
do i=ia,ib
|
|
||||||
if(abs(i-ipkbest).ge.4) 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) + 2.0
|
|
||||||
sync=sbest/ave - 1.0
|
|
||||||
if(sync.lt.0.0) sync=0.0
|
|
||||||
if(sync.gt.10.0) sync=10.0
|
|
||||||
fpk=(ipkbest-1)*df3
|
|
||||||
|
|
||||||
! rewind 71
|
|
||||||
! do j=1,184
|
|
||||||
! write(71,3001) j,ss(j,ipkbest)
|
|
||||||
!3001 format(i5,f12.6)
|
|
||||||
! enddo
|
|
||||||
! call flush(71)
|
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine sync9
|
end subroutine sync9
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//--------------------------------------------------------------- MainWindow
|
//---------------------------------------------------------------- MainWindow
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
#include "devsetup.h"
|
#include "devsetup.h"
|
||||||
|
@ -323,10 +323,10 @@ void CPlotter::MakeFrequencyStrs() //MakeFrequencyStrs
|
|||||||
|
|
||||||
int CPlotter::XfromFreq(float f) //XfromFreq()
|
int CPlotter::XfromFreq(float f) //XfromFreq()
|
||||||
{
|
{
|
||||||
float w = m_WaterfallPixmap.width();
|
// float w = m_WaterfallPixmap.width();
|
||||||
int x = (int) w * (f - m_StartFreq)/m_fSpan;
|
int x = (int) m_w * (f - m_StartFreq)/m_fSpan;
|
||||||
if(x<0 ) return 0;
|
if(x<0 ) return 0;
|
||||||
if(x>(int)w) return m_WaterfallPixmap.width();
|
if(x>m_w) return m_w;
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -397,7 +397,7 @@ int CPlotter::binsPerPixel() // get nbpp
|
|||||||
void CPlotter::setFQSO(int x, bool bf) //setFQSO()
|
void CPlotter::setFQSO(int x, bool bf) //setFQSO()
|
||||||
{
|
{
|
||||||
if(bf) {
|
if(bf) {
|
||||||
m_fQSO=x; // x is freq in kHz
|
m_fQSO=x; // x is freq in Hz
|
||||||
m_xClick=XfromFreq(m_fQSO);
|
m_xClick=XfromFreq(m_fQSO);
|
||||||
} else {
|
} else {
|
||||||
if(x<0) x=0; // x is pixel number
|
if(x<0) x=0; // x is pixel number
|
||||||
|
@ -38,6 +38,7 @@ public:
|
|||||||
qint32 m_DF;
|
qint32 m_DF;
|
||||||
qint32 m_tol;
|
qint32 m_tol;
|
||||||
qint32 m_fCal;
|
qint32 m_fCal;
|
||||||
|
qint32 m_w;
|
||||||
|
|
||||||
void draw(float sw[], float red[], int i0); //Update the waterfall
|
void draw(float sw[], float red[], int i0); //Update the waterfall
|
||||||
void SetRunningState(bool running);
|
void SetRunningState(bool running);
|
||||||
@ -112,7 +113,6 @@ private:
|
|||||||
qint32 m_freqPerDiv;
|
qint32 m_freqPerDiv;
|
||||||
qint32 m_nsps;
|
qint32 m_nsps;
|
||||||
qint32 m_Percent2DScreen;
|
qint32 m_Percent2DScreen;
|
||||||
qint32 m_w;
|
|
||||||
qint32 m_h;
|
qint32 m_h;
|
||||||
qint32 m_h1;
|
qint32 m_h1;
|
||||||
qint32 m_h2;
|
qint32 m_h2;
|
||||||
|
@ -32,6 +32,7 @@ WideGraph::WideGraph(QWidget *parent) :
|
|||||||
ui->gainSpinBox->setValue(ui->widePlot->getPlotGain());
|
ui->gainSpinBox->setValue(ui->widePlot->getPlotGain());
|
||||||
int n = settings.value("FreqSpan",1).toInt();
|
int n = settings.value("FreqSpan",1).toInt();
|
||||||
int w = settings.value("PlotWidth",1000).toInt();
|
int w = settings.value("PlotWidth",1000).toInt();
|
||||||
|
ui->widePlot->m_w=w;
|
||||||
ui->freqSpanSpinBox->setValue(n);
|
ui->freqSpanSpinBox->setValue(n);
|
||||||
ui->widePlot->setNSpan(n);
|
ui->widePlot->setNSpan(n);
|
||||||
// int nbpp = n * 32768.0/(w*96.0) + 0.5;
|
// int nbpp = n * 32768.0/(w*96.0) + 0.5;
|
||||||
@ -48,10 +49,11 @@ WideGraph::WideGraph(QWidget *parent) :
|
|||||||
ui->rbJT9Sync->setChecked(ui->widePlot->m_bJT9Sync);
|
ui->rbJT9Sync->setChecked(ui->widePlot->m_bJT9Sync);
|
||||||
int nbpp=settings.value("BinsPerPixel",1).toInt();
|
int nbpp=settings.value("BinsPerPixel",1).toInt();
|
||||||
ui->widePlot->setBinsPerPixel(nbpp);
|
ui->widePlot->setBinsPerPixel(nbpp);
|
||||||
|
m_qsoFreq=settings.value("QSOfreq",1010).toInt();
|
||||||
|
ui->widePlot->setFQSO(m_qsoFreq,true);
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
WideGraph::~WideGraph()
|
WideGraph::~WideGraph()
|
||||||
{
|
{
|
||||||
saveSettings();
|
saveSettings();
|
||||||
@ -76,6 +78,7 @@ void WideGraph::saveSettings()
|
|||||||
settings.setValue("Cumulative",ui->widePlot->m_bCumulative);
|
settings.setValue("Cumulative",ui->widePlot->m_bCumulative);
|
||||||
settings.setValue("JT9Sync",ui->widePlot->m_bJT9Sync);
|
settings.setValue("JT9Sync",ui->widePlot->m_bJT9Sync);
|
||||||
settings.setValue("BinsPerPixel",ui->widePlot->binsPerPixel());
|
settings.setValue("BinsPerPixel",ui->widePlot->binsPerPixel());
|
||||||
|
settings.setValue("QSOfreq",ui->widePlot->fQSO());
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[Setup]
|
[Setup]
|
||||||
AppName=wsjtx
|
AppName=wsjtx
|
||||||
AppVerName=wsjtx Version 0.1 r2692
|
AppVerName=wsjtx Version 0.1 r2695
|
||||||
AppCopyright=Copyright (C) 2001-2012 by Joe Taylor, K1JT
|
AppCopyright=Copyright (C) 2001-2012 by Joe Taylor, K1JT
|
||||||
DefaultDirName=c:\wsjtx
|
DefaultDirName=c:\wsjtx
|
||||||
DefaultGroupName=wsjtx
|
DefaultGroupName=wsjtx
|
||||||
|
Loading…
Reference in New Issue
Block a user