mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-03 09:44:24 -05:00
when TRperiod < 30 s, expand the Fast Graph scale so full width is 15 s.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7089 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
42288082b5
commit
b15e3aed04
@ -133,6 +133,10 @@ void FPlotter::setGreenZero(int n)
|
||||
void FPlotter::setTRperiod(int n)
|
||||
{
|
||||
m_TRperiod=n;
|
||||
m_pixPerSecond=12000.0/512.0;
|
||||
if(m_TRperiod<30) m_pixPerSecond=12000.0/256.0;
|
||||
drawScale();
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
@ -229,10 +233,10 @@ void FPlotter::mouseMoveEvent(QMouseEvent *event)
|
||||
t1.sprintf("%5.2f",t);
|
||||
if(m_t1.length()==5) {
|
||||
painter.setPen(Qt::black);
|
||||
painter.drawText (380,90,m_t1);
|
||||
painter.drawText(60,95,m_t1);
|
||||
}
|
||||
painter.setPen(Qt::yellow);
|
||||
painter.drawText (380,90,t1);
|
||||
painter.drawText(60,95,t1);
|
||||
update();
|
||||
m_t1=t1;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine hspec(id2,k,ingain,green,s,jh)
|
||||
subroutine hspec(id2,k,ntrperiod,ingain,green,s,jh)
|
||||
|
||||
! Input:
|
||||
! k pointer to the most recent new data
|
||||
@ -20,6 +20,13 @@ subroutine hspec(id2,k,ingain,green,s,jh)
|
||||
|
||||
gain=10.0**(0.1*ingain)
|
||||
nfft=512
|
||||
nstep=nfft
|
||||
nblks=7
|
||||
if(ntrperiod.lt.30) then
|
||||
nstep=256
|
||||
nblks=14
|
||||
endif
|
||||
|
||||
if(k.gt.30*12000) go to 900
|
||||
if(k.lt.nfft) then
|
||||
jh=0
|
||||
@ -27,20 +34,20 @@ subroutine hspec(id2,k,ingain,green,s,jh)
|
||||
endif
|
||||
|
||||
if(k.lt.k0) then !Start a new data block
|
||||
ja=0
|
||||
ja=-nstep
|
||||
jh=-1
|
||||
rms0=0.0
|
||||
endif
|
||||
|
||||
do iblk=1,7
|
||||
do iblk=1,nblks
|
||||
if(jh.lt.JZ-1) jh=jh+1
|
||||
ja=ja+nstep
|
||||
jb=ja+nfft-1
|
||||
x=id2(ja:jb)
|
||||
sq=dot_product(x,x)
|
||||
rms=sqrt(gain*sq/nfft)
|
||||
green(jh)=0.
|
||||
if(rms.gt.0.0) green(jh)=20.0*log10(0.5*(rms0+rms))
|
||||
rms0=rms
|
||||
if(rms.gt.0.0) green(jh)=20.0*log10(rms)
|
||||
call four2a(x,nfft,1,-1,0) !Real-to-complex FFT
|
||||
df=12000.0/nfft
|
||||
fac=(1.0/nfft)**2
|
||||
@ -50,8 +57,8 @@ subroutine hspec(id2,k,ingain,green,s,jh)
|
||||
aimag(cx(j-1))**2
|
||||
s(i-1,jh)=fac*gain*sx
|
||||
enddo
|
||||
call smo121(s(0,jh),64)
|
||||
if(ja+2*nfft.gt.k) exit
|
||||
ja=ja+nfft
|
||||
enddo
|
||||
k0=k
|
||||
|
||||
|
@ -67,7 +67,8 @@ extern "C" {
|
||||
void symspec_(struct dec_data *, int* k, int* ntrperiod, int* nsps, int* ingain, int* minw,
|
||||
float* px, float s[], float* df3, int* nhsym, int* npts8);
|
||||
|
||||
void hspec_(short int d2[], int* k, int* ingain, float green[], float s[], int* jh);
|
||||
void hspec_(short int d2[], int* k, int* ntrperiod, int* ingain,
|
||||
float green[], float s[], int* jh);
|
||||
|
||||
void gen4_(char* msg, int* ichk, char* msgsent, int itone[],
|
||||
int* itext, int len1, int len2);
|
||||
@ -1259,7 +1260,7 @@ void MainWindow::fastSink(qint64 frames)
|
||||
m_bFastDecodeCalled=false;
|
||||
}
|
||||
|
||||
hspec_(dec_data.d2, &k, &m_inGain, fast_green, fast_s, &fast_jh);
|
||||
hspec_(dec_data.d2, &k, &m_TRperiod, &m_inGain, fast_green, fast_s, &fast_jh);
|
||||
float px = fast_green[fast_jh];
|
||||
QString t;
|
||||
t.sprintf(" Rx noise: %5.1f ",px);
|
||||
@ -5689,6 +5690,8 @@ void MainWindow::setRig ()
|
||||
|
||||
void MainWindow::fastPick(int x0, int x1, int y)
|
||||
{
|
||||
float pixPerSecond=12000.0/512.0;
|
||||
if(m_TRperiod<30) pixPerSecond=12000.0/256.0;
|
||||
if(m_mode!="ISCAT" and m_mode!="MSK144") return;
|
||||
if(!m_decoderBusy) {
|
||||
dec_data.params.newdat=0;
|
||||
@ -5696,8 +5699,8 @@ void MainWindow::fastPick(int x0, int x1, int y)
|
||||
m_blankLine=false; // don't insert the separator again
|
||||
m_nPick=1;
|
||||
if(y > 120) m_nPick=2;
|
||||
m_t0Pick=x0*512.0/12000.0;
|
||||
m_t1Pick=x1*512.0/12000.0;
|
||||
m_t0Pick=x0/pixPerSecond;
|
||||
m_t1Pick=x1/pixPerSecond;
|
||||
decode();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user