mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-04-05 19:08:38 -04:00
Intermediate commit: work in progress.
This commit is contained in:
parent
cb7395b504
commit
d62cdbaf2b
@ -8,7 +8,8 @@ extern qint16 id[2*60*96000];
|
||||
|
||||
void getfile(QString fname, bool xpol, int dbDgrd)
|
||||
{
|
||||
int npts=2*56*96000;
|
||||
// int npts=2*56*96000;
|
||||
int npts=2*60*96000;
|
||||
if(xpol) npts=2*npts;
|
||||
|
||||
// Degrade S/N by dbDgrd dB -- for tests only!!
|
||||
@ -23,7 +24,6 @@ void getfile(QString fname, bool xpol, int dbDgrd)
|
||||
|
||||
if(fp != NULL) {
|
||||
auto n = fread(&datcom_.fcenter,sizeof(datcom_.fcenter),1,fp);
|
||||
// qDebug() << "aa0" << sizeof(datcom_.fcenter) << n << datcom_.fcenter;
|
||||
n = fread(id,2,npts,fp);
|
||||
Q_UNUSED (n);
|
||||
int j=0;
|
||||
@ -32,22 +32,20 @@ void getfile(QString fname, bool xpol, int dbDgrd)
|
||||
for(int i=0; i<npts; i+=2) {
|
||||
datcom_.d4[j++]=fac*((float)id[i] + dgrd*gran());
|
||||
datcom_.d4[j++]=fac*((float)id[i+1] + dgrd*gran());
|
||||
// if(!xpol) j+=2; //Skip over d4(3,x) and d4(4,x)
|
||||
}
|
||||
} else {
|
||||
for(int i=0; i<npts; i+=2) {
|
||||
datcom_.d4[j++]=(float)id[i];
|
||||
datcom_.d4[j++]=(float)id[i+1];
|
||||
// if(!xpol) j+=2; //Skip over d4(3,x) and d4(4,x)
|
||||
}
|
||||
}
|
||||
qDebug() << "cc" << j << j/(2.0*96000.0);
|
||||
fclose(fp);
|
||||
|
||||
datcom_.ndiskdat=1;
|
||||
int nfreq=(int)datcom_.fcenter;
|
||||
if(nfreq!=144 and nfreq != 432 and nfreq != 1296) datcom_.fcenter=1296.080;
|
||||
int i0=fname.indexOf(".tf2");
|
||||
if(i0<0) i0=fname.indexOf(".iq");
|
||||
int i0=fname.indexOf(".iq");
|
||||
datcom_.nutc=0;
|
||||
if(i0>0) {
|
||||
datcom_.nutc=100*fname.mid(i0-4,2).toInt() + fname.mid(i0-2,2).toInt();
|
||||
|
@ -29,7 +29,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Override programs executable basename as application name.
|
||||
a.setApplicationName ("QMAP");
|
||||
a.setApplicationVersion ("0.2");
|
||||
a.setApplicationVersion ("0.3");
|
||||
// switch off as we share an Info.plist file with WSJT-X
|
||||
a.setAttribute (Qt::AA_DontUseNativeMenuBar);
|
||||
MainWindow w;
|
||||
|
@ -403,9 +403,10 @@ void MainWindow::dataSink(int k)
|
||||
|
||||
if(ihsym < m_hsymStop) m_decode_called=false;
|
||||
|
||||
// qDebug() << "aa" << m_hsymStop << ihsym << m_decode_called << k << ntrz;
|
||||
if(ihsym >= m_hsymStop and !m_decode_called) { //Decode at t=56 s (for Q65 and data from disk)
|
||||
m_decode_called=true;
|
||||
datcom_.newdat=1;
|
||||
qDebug() << "bb" << m_hsymStop << ihsym << m_decode_called << k << ntrz; datcom_.newdat=1;
|
||||
datcom_.nagain=0;
|
||||
datcom_.nhsym=ihsym;
|
||||
QDateTime t = QDateTime::currentDateTimeUtc();
|
||||
|
@ -113,7 +113,8 @@ private:
|
||||
qint32 m_modeQ65;
|
||||
qint32 m_dB;
|
||||
qint32 m_fetched=0;
|
||||
qint32 m_hsymStop=371;
|
||||
// qint32 m_hsymStop=371;
|
||||
qint32 m_hsymStop=373; //390*0.15 = 58.5 s
|
||||
qint32 m_nTransmitted=0;
|
||||
qint32 m_nDoubleClicked=0;
|
||||
|
||||
|
@ -210,10 +210,8 @@ void SoundInThread::inputUDP()
|
||||
int nsam=-1;
|
||||
recvpkt_(&nsam, &b.iblk, &b.nrx, &k, b.d8, b.d8);
|
||||
datcom_.fcenter=b.cfreq + m_fAdd;
|
||||
// qDebug() << "bb" << b.cfreq << m_fAdd << datcom_.fcenter;
|
||||
}
|
||||
|
||||
m_hsym=(k-2048)*11025.0/(2048.0*m_rate);
|
||||
m_hsym=(k-2048)/14400; //14400 = 0.15 * 96000
|
||||
if(m_hsym != nhsym0) {
|
||||
if(!m_dataSinkBusy) {
|
||||
m_dataSinkBusy=true;
|
||||
|
Loading…
Reference in New Issue
Block a user