mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-20 19:19:02 -04:00
WIP to enable saving, opening, and processing Echo-mode .wav files.
This commit is contained in:
parent
d70f637632
commit
3fb362ac28
@ -509,6 +509,7 @@ set (wsjt_FSRCS
|
||||
lib/refspectrum.f90
|
||||
lib/savec2.f90
|
||||
lib/save_dxbase.f90
|
||||
lib/save_echo_params.f90
|
||||
lib/sec0.f90
|
||||
lib/sec_midn.f90
|
||||
lib/setup65.f90
|
||||
|
@ -79,13 +79,14 @@ contains
|
||||
ih,im,is,AzSun8,ElSun8, &
|
||||
ih,im,is,AzAux,ElAux, &
|
||||
nfreq,doppler,dfdt,doppler00,dfdt0,c1
|
||||
if (azel_extra_lines.ge.1) write(15, 1020, err=10) poloffset8,xnr8,Dgrd8
|
||||
if (azel_extra_lines.ge.1) write(15, 1020, err=10) poloffset8, &
|
||||
xnr8,Dgrd8,width1,width2
|
||||
1010 format( &
|
||||
i2.2,':',i2.2,':',i2.2,',',f5.1,',',f5.1,',Moon'/ &
|
||||
i2.2,':',i2.2,':',i2.2,',',f5.1,',',f5.1,',Sun'/ &
|
||||
i2.2,':',i2.2,':',i2.2,',',f5.1,',',f5.1,',Source'/ &
|
||||
i5,',',f8.1,',',f8.2,',',f8.1,',',f8.2,',Doppler, ',a1)
|
||||
1020 format(f8.1,','f8.1,',',f8.1,',Pol')
|
||||
1020 format(f8.1,',',f8.1,',',f8.1,',',f8.1,',',f8.1,',Pol')
|
||||
10 close(15)
|
||||
go to 999
|
||||
|
||||
|
27
lib/save_echo_params.f90
Normal file
27
lib/save_echo_params.f90
Normal file
@ -0,0 +1,27 @@
|
||||
subroutine save_echo_params(nDop,nfrit,f1,fspread,id2,idir)
|
||||
|
||||
integer*2 id2(10)
|
||||
integer*2 id2a(10)
|
||||
real*8 fspread,fspread0
|
||||
equivalence (nDop0,id2a(1))
|
||||
equivalence (nfrit0,id2a(3))
|
||||
equivalence (f10,id2a(5))
|
||||
equivalence (fspread0,id2a(7))
|
||||
|
||||
if(idir.gt.0) then
|
||||
nDop0=nDop
|
||||
nfrit0=nfrit
|
||||
f10=f1
|
||||
fspread0=fspread
|
||||
id2=id2a
|
||||
else
|
||||
id2a=id2
|
||||
id2(1:10)=0
|
||||
nDop=nDop0
|
||||
nfrit=nfrit0
|
||||
f1=f10
|
||||
fspread=fspread0
|
||||
endif
|
||||
|
||||
return
|
||||
end subroutine save_echo_params
|
@ -153,6 +153,8 @@ extern "C" {
|
||||
|
||||
int savec2_(char const * fname, int* TR_seconds, double* dial_freq, fortran_charlen_t);
|
||||
|
||||
void save_echo_params_(int* ndop, int* nfrit, float* f1, double* fspread, short id2[], int* idir);
|
||||
|
||||
void avecho_( short id2[], int* dop, int* nfrit, int* nauto, int* nqual, float* f1,
|
||||
float* level, float* sigdb, float* snr, float* dfreq,
|
||||
float* width);
|
||||
@ -1600,7 +1602,11 @@ void MainWindow::dataSink(qint64 frames)
|
||||
float width=0.0;
|
||||
echocom_.nclearave=m_nclearave;
|
||||
int nDop=m_fAudioShift;
|
||||
// qDebug() << "bb" << m_s6 << f1 << nfrit << nDop;
|
||||
if(m_diskData) {
|
||||
int idir=-1;
|
||||
save_echo_params_(&nDop,&nfrit,&f1,&m_fSpread,dec_data.d2,&idir);
|
||||
}
|
||||
qDebug() << "bb" << m_s6 << f1 << nfrit << nDop;
|
||||
avecho_(dec_data.d2,&nDop,&nfrit,&nauto,&nqual,&f1,&xlevel,&sigdb,
|
||||
&dBerr,&dfreq,&width);
|
||||
QString t;
|
||||
@ -1609,13 +1615,17 @@ void MainWindow::dataSink(qint64 frames)
|
||||
t=QDateTime::currentDateTimeUtc().toString("hh:mm:ss ") + t;
|
||||
if (ui) ui->decodedTextBrowser->appendText(t);
|
||||
if(m_echoGraph->isVisible()) m_echoGraph->plotSpec();
|
||||
if(m_saveAll) {
|
||||
int idir=1;
|
||||
save_echo_params_(&nDop,&nfrit,&f1,&m_fSpread,dec_data.d2,&idir);
|
||||
}
|
||||
m_nclearave=0;
|
||||
//Don't restart Monitor after an Echo transmission
|
||||
if(m_bEchoTxed and !m_auto) {
|
||||
monitor(false);
|
||||
m_bEchoTxed=false;
|
||||
}
|
||||
return;
|
||||
// return;
|
||||
}
|
||||
if(m_mode=="FreqCal") {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user