mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-22 05:28:34 -05:00
Fix a time delay introduced in refspectrum.f90.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7778 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
55513b356a
commit
939dcc9532
@ -1,11 +1,11 @@
|
|||||||
subroutine refspectrum(id2,bclear,brefspec,buseref,fname)
|
subroutine refspectrum(id2,id2b,kk,bclear,brefspec,buseref,fname)
|
||||||
|
|
||||||
! Input:
|
! Input:
|
||||||
! id2 i*2 Raw 16-bit integer data, 12000 Hz sample rate
|
! id2 i*2 Raw 16-bit integer data, 12000 Hz sample rate
|
||||||
! brefspec logical True when accumulating a reference spectrum
|
! brefspec logical True when accumulating a reference spectrum
|
||||||
|
|
||||||
parameter (NFFT=6912,NH=NFFT/2,NPOLYLOW=400,NPOLYHIGH=2600)
|
parameter (NFFT=6912,NH=NFFT/2,NPOLYLOW=400,NPOLYHIGH=2600)
|
||||||
integer*2 id2(NFFT)
|
integer*2 id2(NFFT),id2b(120*12000)
|
||||||
logical*1 bclear,brefspec,buseref,blastuse
|
logical*1 bclear,brefspec,buseref,blastuse
|
||||||
|
|
||||||
real x0(0:NH-1) !Input samples
|
real x0(0:NH-1) !Input samples
|
||||||
@ -146,9 +146,11 @@ subroutine refspectrum(id2,bclear,brefspec,buseref,fname)
|
|||||||
cx=fil*cx
|
cx=fil*cx
|
||||||
call four2a(cx,NFFT,1,1,-1) !c2r FFT (back to time domain)
|
call four2a(cx,NFFT,1,1,-1) !c2r FFT (back to time domain)
|
||||||
x1=x1s + x(0:NH-1) !Add previous segment's 2nd half
|
x1=x1s + x(0:NH-1) !Add previous segment's 2nd half
|
||||||
id2(1:NH)=nint(x1)
|
! id2(1:NH)=nint(x1)
|
||||||
|
if(kk.ge.6912) id2b(kk-6192+1:kk-6192+NH)=nint(x1)
|
||||||
x1s=x(NH:NFFT-1) !Save the new 2nd half
|
x1s=x(NH:NFFT-1) !Save the new 2nd half
|
||||||
endif
|
endif
|
||||||
blastuse=buseref
|
blastuse=buseref
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine refspectrum
|
end subroutine refspectrum
|
||||||
|
@ -124,8 +124,8 @@ extern "C" {
|
|||||||
|
|
||||||
void wav12_(short d2[], short d1[], int* nbytes, short* nbitsam2);
|
void wav12_(short d2[], short d1[], int* nbytes, short* nbitsam2);
|
||||||
|
|
||||||
void refspectrum_(short int d2[], bool* bclearrefspec, bool* brefspec,
|
void refspectrum_(short int d2[], short int d2b[], int* k, bool* bclearrefspec,
|
||||||
bool* buseref, const char* c_fname, int len);
|
bool* brefspec, bool* buseref, const char* c_fname, int len);
|
||||||
|
|
||||||
void freqcal_(short d2[], int* k, int* nkhz,int* noffset, int* ntol,
|
void freqcal_(short d2[], int* k, int* nkhz,int* noffset, int* ntol,
|
||||||
char line[], int len);
|
char line[], int len);
|
||||||
@ -1148,7 +1148,7 @@ void MainWindow::dataSink(qint64 frames)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_bUseRef=m_wideGraph->useRef();
|
m_bUseRef=m_wideGraph->useRef();
|
||||||
refspectrum_(&dec_data.d2[k-m_nsps/2],&m_bClearRefSpec,&m_bRefSpec,
|
refspectrum_(&dec_data.d2[k-m_nsps/2],&dec_data.d2[0],&k,&m_bClearRefSpec,&m_bRefSpec,
|
||||||
&m_bUseRef,c_fname,len);
|
&m_bUseRef,c_fname,len);
|
||||||
m_bClearRefSpec=false;
|
m_bClearRefSpec=false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user