summaryrefslogtreecommitdiff
path: root/map65
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2022-08-08 23:08:17 +0200
committerChristoph Berg <myon@debian.org>2022-08-08 23:08:17 +0200
commit43bebfbad6e7ba026bd3d55720c7d9e12a7ef8ef (patch)
treefac973fdc7378510849f4d749cd311176c023ebb /map65
parentd47341d71ff3df889c1180eb7bfb4fc0272eb26b (diff)
New upstream version 2.6.0~rc2+repackupstream/2.6.0_rc2+repack
Diffstat (limited to 'map65')
-rwxr-xr-xmap65/astro.cpp4
-rwxr-xr-xmap65/devsetup.cpp11
-rwxr-xr-xmap65/devsetup.h3
-rwxr-xr-xmap65/devsetup.ui30
-rwxr-xr-xmap65/libm65/wideband_sync.f904
-rwxr-xr-xmap65/mainwindow.cpp12
-rwxr-xr-xmap65/mainwindow.h2
-rwxr-xr-xmap65/soundin.cpp14
-rwxr-xr-xmap65/soundin.h4
9 files changed, 53 insertions, 31 deletions
diff --git a/map65/astro.cpp b/map65/astro.cpp
index b4bf83b6..a91c048b 100755
--- a/map65/astro.cpp
+++ b/map65/astro.cpp
@@ -103,13 +103,13 @@ void Astro::astroUpdate(QDateTime t, QString mygrid, QString hisgrid,
sprintf(cc,"%2.2d:%2.2d:%2.2d,%5.1f,%5.1f,Moon\n"
"%2.2d:%2.2d:%2.2d,%5.1f,%5.1f,Sun\n"
"%2.2d:%2.2d:%2.2d,%5.1f,%5.1f,Source\n"
- "%4d,%6d,Doppler\n"
+ "%4d,%6d,%6d,Doppler\n"
"%3d,%1d,fQSO\n"
"%3d,%1d,fQSO2\n",
nhr,nmin,isec,azmoon,elmoon,
nhr,nmin,isec,azsun,elsun,
nhr,nmin,isec,0.0,0.0,
- nfreq,ndop,
+ nfreq,ndop,ndop00,
fQSO,nsetftx,
ntxFreq,ndiff);
out << cc;
diff --git a/map65/devsetup.cpp b/map65/devsetup.cpp
index 01f373e6..fe9d14a9 100755
--- a/map65/devsetup.cpp
+++ b/map65/devsetup.cpp
@@ -106,8 +106,8 @@ void DevSetup::initDlg()
ui.comboBoxSndOut->setCurrentIndex(m_nDevOut);
ui.sbPort->setValue(m_udpPort);
ui.cbIQswap->setChecked(m_IQswap);
- ui.cb10db->setChecked(m_10db);
ui.cbInitIQplus->setChecked(m_initIQplus);
+ ui.sb_dB->setValue(m_dB);
ui.mult570SpinBox->setValue(m_mult570);
ui.mult570TxSpinBox->setValue(m_mult570Tx);
ui.cal570SpinBox->setValue(m_cal570);
@@ -176,8 +176,8 @@ void DevSetup::accept()
m_paOutDevice=m_outDevList[m_nDevOut];
m_udpPort=ui.sbPort->value();
m_IQswap=ui.cbIQswap->isChecked();
- m_10db=ui.cb10db->isChecked();
m_initIQplus=ui.cbInitIQplus->isChecked();
+ m_dB=ui.sb_dB->value();
m_mult570=ui.mult570SpinBox->value();
m_mult570Tx=ui.mult570TxSpinBox->value();
m_cal570=ui.cal570SpinBox->value();
@@ -195,7 +195,7 @@ void DevSetup::on_soundCardRadioButton_toggled(bool checked)
ui.label_Port->setEnabled(!checked);
ui.sbPort->setEnabled(!checked);
ui.cbIQswap->setEnabled(checked);
- ui.cb10db->setEnabled(checked);
+ ui.sb_dB->setEnabled(checked);
}
void DevSetup::on_cbXpol_stateChanged(int n)
@@ -217,6 +217,11 @@ void DevSetup::on_mult570SpinBox_valueChanged(int mult)
m_mult570=mult;
}
+void DevSetup::on_sb_dB_valueChanged(int n)
+{
+ m_dB=n;
+}
+
void DevSetup::updateColorLabels()
{
QString t;
diff --git a/map65/devsetup.h b/map65/devsetup.h
index 148f76c4..c32a83e9 100755
--- a/map65/devsetup.h
+++ b/map65/devsetup.h
@@ -27,6 +27,7 @@ public:
qint32 m_astroFont;
qint32 m_mult570;
qint32 m_mult570Tx;
+ qint32 m_dB;
double m_fAdd;
double m_cal570;
@@ -39,7 +40,6 @@ public:
bool m_IQswap;
bool m_restartSoundIn;
bool m_restartSoundOut;
- bool m_10db;
bool m_initIQplus;
bool m_bIQxt;
@@ -81,6 +81,7 @@ private slots:
void on_mult570TxSpinBox_valueChanged(int arg1);
void on_rbIQXT_toggled(bool checked);
void on_sbTxOffset_valueChanged(double f);
+ void on_sb_dB_valueChanged(int n);
private:
int r,g,b,r0,g0,b0,r1,g1,b1,r2,g2,b2,r3,g3,b3;
diff --git a/map65/devsetup.ui b/map65/devsetup.ui
index 81ae68e6..48f2a0b2 100755
--- a/map65/devsetup.ui
+++ b/map65/devsetup.ui
@@ -698,12 +698,24 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="cb10db">
- <property name="enabled">
- <bool>false</bool>
+ <widget class="QSpinBox" name="sb_dB">
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Adjust to scale digital I/Q data.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
- <property name="text">
- <string>+10 dB</string>
+ <property name="suffix">
+ <string> dB</string>
+ </property>
+ <property name="prefix">
+ <string>Gain </string>
+ </property>
+ <property name="minimum">
+ <number>-50</number>
+ </property>
+ <property name="maximum">
+ <number>10</number>
+ </property>
+ <property name="singleStep">
+ <number>1</number>
</property>
</widget>
</item>
@@ -1772,8 +1784,8 @@
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
- <x>248</x>
- <y>254</y>
+ <x>257</x>
+ <y>380</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
@@ -1788,8 +1800,8 @@
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
- <x>316</x>
- <y>260</y>
+ <x>325</x>
+ <y>380</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
diff --git a/map65/libm65/wideband_sync.f90 b/map65/libm65/wideband_sync.f90
index 875531f7..90689ed1 100755
--- a/map65/libm65/wideband_sync.f90
+++ b/map65/libm65/wideband_sync.f90
@@ -47,6 +47,8 @@ subroutine get_candidates(ss,savg,xpol,jz,nfa,nfb,nts_jt65,nts_q65,cand,ncand)
df3=96000.0/NFFT
ia=nint(1000*nfa/df3) + 1
ib=nint(1000*nfb/df3) + 1
+ if(ia.lt.1) ia=1
+ if(ib.gt.NFFT-1) ib=NFFT-1
iz=ib-ia+1
call indexx(sync(ia:ib)%ccfmax,iz,indx) !Sort by relative snr
@@ -151,6 +153,8 @@ subroutine wb_sync(ss,savg,xpol,jz,nfa,nfb)
df3=96000.0/NFFT
ia=nint(1000*nfa/df3) + 1 !Flat frequency range for WSE converters
ib=nint(1000*nfb/df3) + 1
+ if(ia.lt.1) ia=1
+ if(ib.gt.NFFT-1) ib=NFFT-1
npol=1
if(xpol) npol=4
diff --git a/map65/mainwindow.cpp b/map65/mainwindow.cpp
index 2e7bfa75..54b84b73 100755
--- a/map65/mainwindow.cpp
+++ b/map65/mainwindow.cpp
@@ -372,7 +372,7 @@ void MainWindow::writeSettings()
settings.setValue("SoundOutIndex",m_nDevOut);
settings.setValue("paOutDevice",m_paOutDevice);
settings.setValue("IQswap",m_IQswap);
- settings.setValue("Plus10dB",m_10db);
+ settings.setValue("Scale_dB",m_dB);
settings.setValue("IQxt",m_bIQxt);
settings.setValue("InitIQplus",m_initIQplus);
settings.setValue("UDPport",m_udpPort);
@@ -447,12 +447,12 @@ void MainWindow::readSettings()
m_nDevOut = settings.value("SoundOutIndex", 0).toInt();
m_paOutDevice = settings.value("paOutDevice",0).toInt();
m_IQswap = settings.value("IQswap",false).toBool();
- m_10db = settings.value("Plus10dB",false).toBool();
+ m_dB = settings.value("Scale_dB",0).toInt();
m_initIQplus = settings.value("InitIQplus",false).toBool();
m_bIQxt = settings.value("IQxt",false).toBool();
m_udpPort = settings.value("UDPport",50004).toInt();
soundInThread.setSwapIQ(m_IQswap);
- soundInThread.set10db(m_10db);
+ soundInThread.setScale(m_dB);
soundInThread.setPort(m_udpPort);
ui->actionCuteSDR->setChecked(settings.value(
"PaletteCuteSDR",true).toBool());
@@ -682,7 +682,7 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
dlg.m_nDevOut=m_nDevOut;
dlg.m_udpPort=m_udpPort;
dlg.m_IQswap=m_IQswap;
- dlg.m_10db=m_10db;
+ dlg.m_dB=m_dB;
dlg.m_initIQplus=m_initIQplus;
dlg.m_bIQxt=m_bIQxt;
dlg.m_cal570=m_cal570;
@@ -719,7 +719,7 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
m_paOutDevice=dlg.m_paOutDevice;
m_udpPort=dlg.m_udpPort;
m_IQswap=dlg.m_IQswap;
- m_10db=dlg.m_10db;
+ m_dB=dlg.m_dB;
m_initIQplus=dlg.m_initIQplus;
m_bIQxt=dlg.m_bIQxt;
m_colors=dlg.m_colors;
@@ -732,7 +732,7 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
m_wide_graph_window->m_mult570Tx=m_mult570Tx;
m_wide_graph_window->m_cal570=m_cal570;
soundInThread.setSwapIQ(m_IQswap);
- soundInThread.set10db(m_10db);
+ soundInThread.setScale(m_dB);
if(dlg.m_restartSoundIn) {
soundInThread.quit();
diff --git a/map65/mainwindow.h b/map65/mainwindow.h
index 8b85e761..b90683fc 100755
--- a/map65/mainwindow.h
+++ b/map65/mainwindow.h
@@ -192,6 +192,7 @@ private:
qint32 m_modeJT65;
qint32 m_modeQ65;
qint32 m_RxState;
+ qint32 m_dB;
double m_fAdd;
@@ -220,7 +221,6 @@ private:
bool m_NB;
bool m_fs96000;
bool m_IQswap;
- bool m_10db;
bool m_initIQplus;
bool m_bIQxt;
diff --git a/map65/soundin.cpp b/map65/soundin.cpp
index 0e50f293..46433d4e 100755
--- a/map65/soundin.cpp
+++ b/map65/soundin.cpp
@@ -1,4 +1,5 @@
#include "soundin.h"
+#include <math.h>
#ifdef Q_OS_WIN32
#include <windows.h>
@@ -53,9 +54,9 @@ typedef struct
{
int kin; //Parameters sent to/from the portaudio callback function
int nrx;
+ int dB;
bool bzero;
bool iqswap;
- bool b10db;
} paUserData;
//--------------------------------------------------------------- a2dCallback
@@ -91,8 +92,7 @@ extern "C" int a2dCallback( const void *inputBuffer, void *outputBuffer,
nbytes=udata->nrx*8*framesToProcess; //Bytes per frame
memcpy(d4,inputBuffer,nbytes); //Copy all samples to d4
- fac=32767.0;
- if(udata->b10db) fac=103618.35;
+ fac=32767.0 * pow(10.0,0.05*udata->dB);
if(udata->nrx==2) {
for(i=0; i<4*int(framesToProcess); i++) { //Negate odd-numbered frames
@@ -185,7 +185,7 @@ void SoundInThread::run() //SoundInThread::run()
udata.bzero=false; //Flag to request reset of kin
udata.nrx=m_nrx; //Number of polarizations
udata.iqswap=m_IQswap;
- udata.b10db=m_10db;
+ udata.dB=m_dB;
auto device_info = Pa_GetDeviceInfo (m_nDevIn);
@@ -251,7 +251,7 @@ void SoundInThread::run() //SoundInThread::run()
}
k=udata.kin;
udata.iqswap=m_IQswap;
- udata.b10db=m_10db;
+ udata.dB=m_dB;
if(m_monitoring) {
if(m_bForceCenterFreq) {
datcom_.fcenter=m_dForceCenterFreq;
@@ -281,9 +281,9 @@ void SoundInThread::setSwapIQ(bool b)
m_IQswap=b;
}
-void SoundInThread::set10db(bool b)
+void SoundInThread::setScale(qint32 n)
{
- m_10db=b;
+ m_dB=n;
}
void SoundInThread::setPort(int n) //setPort()
{
diff --git a/map65/soundin.h b/map65/soundin.h
index 369cf1d7..78947338 100755
--- a/map65/soundin.h
+++ b/map65/soundin.h
@@ -30,7 +30,7 @@ public:
}
void setSwapIQ(bool b);
- void set10db(bool b);
+ void setScale(qint32 n);
void setPort(qint32 n);
void setInputDevice(qint32 n);
void setRate(double rate);
@@ -62,7 +62,6 @@ private:
bool m_monitoring;
bool m_bForceCenterFreq;
bool m_IQswap;
- bool m_10db;
double m_dForceCenterFreq;
qint32 m_nrx;
qint32 m_hsym;
@@ -70,6 +69,7 @@ private:
qint32 m_udpPort;
qint32 m_TRperiod;
qint32 m_TRperiod0;
+ qint32 m_dB;
QUdpSocket *udpSocket;
};