mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-15 16:42:12 -05:00
1. subtractft8: on the last call to sqf, don't need to do the long FFT.
2. mainwindow.cpp: based on the time when <DecodeFinished> is received, calculate mswait to try to place the killFile time at 0.75*m_TRperiod.
This commit is contained in:
parent
f367b6d6b9
commit
f2266c3c54
@ -1,4 +1,4 @@
|
|||||||
subroutine subtractft8(dd0,itone,f0,dt,ldt)
|
subroutine subtractft8(dd0,itone,f0,dt,lrefinedt)
|
||||||
|
|
||||||
! Subtract an ft8 signal
|
! Subtract an ft8 signal
|
||||||
!
|
!
|
||||||
@ -15,7 +15,7 @@ subroutine subtractft8(dd0,itone,f0,dt,ldt)
|
|||||||
complex cx(0:NFFT/2)
|
complex cx(0:NFFT/2)
|
||||||
complex cref,camp,cfilt,cw,z
|
complex cref,camp,cfilt,cw,z
|
||||||
integer itone(79)
|
integer itone(79)
|
||||||
logical first,ldt
|
logical first,lrefinedt,ldt
|
||||||
data first/.true./
|
data first/.true./
|
||||||
common/heap8/cref(NFRAME),camp(NMAX),cfilt(NMAX),cw(NMAX)
|
common/heap8/cref(NFRAME),camp(NMAX),cfilt(NMAX),cw(NMAX)
|
||||||
equivalence (x,cx)
|
equivalence (x,cx)
|
||||||
@ -40,25 +40,16 @@ subroutine subtractft8(dd0,itone,f0,dt,ldt)
|
|||||||
! Generate complex reference waveform cref
|
! Generate complex reference waveform cref
|
||||||
call gen_ft8wave(itone,79,1920,2.0,12000.0,f0,cref,xjunk,1,NFRAME)
|
call gen_ft8wave(itone,79,1920,2.0,12000.0,f0,cref,xjunk,1,NFRAME)
|
||||||
|
|
||||||
|
ldt=lrefinedt
|
||||||
if(ldt) then !Are we refining DT ?
|
if(ldt) then !Are we refining DT ?
|
||||||
! sqa=sqf(-300)
|
sqa=sqf(-90)
|
||||||
! sqb=sqf(300)
|
sqb=sqf(+90)
|
||||||
! sq0=sqf(0) !Do the subtraction with idt=0
|
sq0=sqf(0)
|
||||||
! call peakup(sqa,sq0,sqb,dx)
|
|
||||||
! if(abs(dx).gt.1.0) return !No acceptable minimum: do not subtract
|
|
||||||
! i1=nint(300.0*dx) !First approximation of best idt
|
|
||||||
i1=0
|
|
||||||
! sqa=sqf(i1-60)
|
|
||||||
! sqb=sqf(i1+60)
|
|
||||||
sqa=sqf(i1-90)
|
|
||||||
sqb=sqf(i1+90)
|
|
||||||
sq0=sqf(i1)
|
|
||||||
call peakup(sqa,sq0,sqb,dx)
|
call peakup(sqa,sq0,sqb,dx)
|
||||||
if(abs(dx).gt.1.0) return !No acceptable minimum: do not subtract
|
if(abs(dx).gt.1.0) return !No acceptable minimum: do not subtract
|
||||||
! i2=nint(60.0*dx) + i1 !Best estimate of idt
|
|
||||||
i2=nint(90.0*dx) + i1 !Best estimate of idt
|
i2=nint(90.0*dx) + i1 !Best estimate of idt
|
||||||
|
ldt=.false.
|
||||||
sq0=sqf(i2) !Do the subtraction with idt=i2
|
sq0=sqf(i2) !Do the subtraction with idt=i2
|
||||||
!write(*,*) 'subtract - i2= ',i2,dt
|
|
||||||
else
|
else
|
||||||
sq0=sqf(0) !Do the subtraction with idt=0
|
sq0=sqf(0) !Do the subtraction with idt=0
|
||||||
endif
|
endif
|
||||||
|
@ -3074,8 +3074,15 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
// qDebug() << "bb" << QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz") << line_read;
|
// qDebug() << "bb" << QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz") << line_read;
|
||||||
if(m_mode=="QRA64") m_wideGraph->drawRed(0,0);
|
if(m_mode=="QRA64") m_wideGraph->drawRed(0,0);
|
||||||
m_bDecoded = line_read.mid(20).trimmed().toInt() > 0;
|
m_bDecoded = line_read.mid(20).trimmed().toInt() > 0;
|
||||||
int mswait=750.0*m_TRperiod;
|
auto tnow = QDateTime::currentDateTimeUtc ();
|
||||||
if(!m_diskData) killFileTimer.start(mswait); //Kill in 3/4 period
|
double tdone = fmod(double(tnow.time().second()),m_TRperiod);
|
||||||
|
int mswait;
|
||||||
|
if( tdone < 0.5*m_TRperiod ) {
|
||||||
|
mswait = 1000.0 * ( 0.75 * m_TRperiod - tdone );
|
||||||
|
} else {
|
||||||
|
mswait = 1000.0 * ( 1.75 * m_TRperiod - tdone );
|
||||||
|
}
|
||||||
|
if(!m_diskData) killFileTimer.start(mswait); //Kill at 3/4 period
|
||||||
decodeDone ();
|
decodeDone ();
|
||||||
m_startAnother=m_loopall;
|
m_startAnother=m_loopall;
|
||||||
if(m_bNoMoreFiles) {
|
if(m_bNoMoreFiles) {
|
||||||
|
Loading…
Reference in New Issue
Block a user