1
0
mirror of https://github.com/saitohirga/WSJT-X.git synced 2025-03-21 03:28:59 -04:00

QMAP: make offset adjustable.

This commit is contained in:
Uwe Risse 2023-08-29 13:17:20 +02:00
parent e4dca8e241
commit fea274ed57
6 changed files with 131 additions and 96 deletions

View File

@ -34,6 +34,7 @@ extern struct { //This is "common/datcom/..." in Fortran
int ndop00; //EME Self Doppler
int nsave; //Number of s3(64,63) spectra saved
int max_drift; //Maximum Q65 drift: units symbol_rate/TxT
int offset; //Offset in Hz
int nhsym; //Number of available JT65 half-symbols
char mycall[12];
char mygrid[6];
@ -73,6 +74,7 @@ extern struct { //This is "common/datcom/..." in Fortran
int ndop00; //EME Self Doppler
int nsave; //Number of s3(64,63) spectra saved
int max_drift; //Maximum Q65 drift: units symbol_rate/TxT
int offset; //Offset in Hz
int nhsym; //Number of available JT65 half-symbols
char mycall[12];
char mygrid[6];

View File

@ -11,10 +11,10 @@ subroutine decode0(dd,ss,savg)
character*60 result
common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy, &
nWTransmitting,result(50)
common/npar/fcenter,nutc,fselected,mousedf,mousefqso,nagain, &
common/npar/fcenter,nutc,fselected,mousedf,mousefqso,nagain, &
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, &
ndop00,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime
ndop00,nsave,max_drift,offset,nhsym,mycall,mygrid,hiscall,hisgrid,datetime
data neme0/-99/
save
@ -43,7 +43,7 @@ subroutine decode0(dd,ss,savg)
call timer('qmapa ',0)
call qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, &
mousedf,mousefqso,nagain,nfshift,max_drift, &
mousedf,mousefqso,nagain,nfshift,max_drift,offset, &
nfcal,mycall,hiscall,hisgrid,nfsample,nmode,ndepth, &
datetime,ndop00,fselected)
call timer('qmapa ',1)

View File

@ -1,6 +1,6 @@
subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
mycall0,hiscall0,hisgrid,mode_q65,f0,fqso,nkhz_center, newdat,nagain, &
max_drift,ndepth,datetime,ndop00,idec)
max_drift,offset,ndepth,datetime,ndop00,idec)
! This routine provides an interface between QMAP and the Q65 decoder
! in WSJT-X. All arguments are input data obtained from the QMAP GUI.
@ -111,7 +111,7 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
freq1=freq0 + 0.001d0*(ikhz1-ikhz)
ndecodes=ndecodes+1
frx=0.001*k0*df+nkhz_center-48.0+1.0 - 0.001*nfcal
fsked=frx - 0.001*ndop00/2.0 - 1.5
fsked=frx - 0.001*ndop00/2.0 - 0.001*offset
write(result(ndecodes),1120) nutc,frx,fsked,xdt0,nsnr0,trim(msg0)
1120 format(i4.4,f9.3,f7.1,f7.2,i5,2x,a)
write(12,1130) datetime,trim(result(ndecodes)(5:))

View File

@ -1,5 +1,5 @@
subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, &
mousedf,mousefqso,nagain,nfshift,max_drift,nfcal,mycall, &
mousedf,mousefqso,nagain,nfshift,max_drift,offset,nfcal,mycall, &
hiscall,hisgrid,nfsample,nmode,ndepth,datetime,ndop00,fselected)
! Processes timf2 data received from Linrad to find and decode Q65 signals.
@ -64,7 +64,7 @@ subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, &
call timer('q65b ',0)
call q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
mycall,hiscall,hisgrid,mode_q65,f0,fqso,nkhz_center,newdat, &
nagain2,max_drift,ndepth,datetime,ndop00,idec)
nagain2,max_drift,offset,ndepth,datetime,ndop00,idec)
call timer('q65b ',1)
tsec=sec_midn() - tsec0
if(tsec.gt.30.0) exit !Don't start another decode attempt after t=30 s.

View File

@ -247,6 +247,7 @@ void MainWindow::writeSettings()
settings.setValue("PhaseX",(double)m_phasex);
settings.setValue("PhaseY",(double)m_phasey);
settings.setValue("MaxDrift",ui->sbMaxDrift->value());
settings.setValue("Offset",ui->sbOffset->value());
}
//---------------------------------------------------------- readSettings()
@ -297,6 +298,7 @@ void MainWindow::readSettings()
m_NB=settings.value("NB",false).toBool();
ui->NBcheckBox->setChecked(m_NB);
ui->sbMaxDrift->setValue(settings.value("MaxDrift",0).toInt());
ui->sbOffset->setValue(settings.value("Offset",1500).toInt());
m_NBslider=settings.value("NBslider",40).toInt();
ui->NBslider->setValue(m_NBslider);
m_gainx=settings.value("GainX",1.0).toFloat();
@ -857,6 +859,7 @@ void MainWindow::decode() //decode()
datcom_.nmode=10*m_modeQ65;
datcom_.nsave=m_nsave;
datcom_.max_drift=ui->sbMaxDrift->value();
datcom_.offset=ui->sbOffset->value();
datcom_.ndepth=1;
if(datcom_.nagain==1) datcom_.ndepth=3;

View File

@ -53,46 +53,10 @@
</property>
</widget>
</item>
<item row="1" column="4" colspan="2">
<widget class="QSpinBox" name="sbMaxDrift">
<property name="toolTip">
<string>Maximum drift rate in units of symbol rate per transmissiion.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="prefix">
<string>Max Drift </string>
</property>
<property name="maximum">
<number>50</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="labFreq">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>35</height>
</size>
</property>
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<item row="3" column="3">
<widget class="QCheckBox" name="NBcheckBox">
<property name="text">
<string>1296.080</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<string>NB</string>
</property>
</widget>
</item>
@ -109,14 +73,7 @@
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QCheckBox" name="NBcheckBox">
<property name="text">
<string>NB</string>
</property>
</widget>
</item>
<item row="1" column="1" rowspan="2">
<item row="1" column="1" rowspan="3">
<widget class="QLabel" name="labUTC">
<property name="minimumSize">
<size>
@ -147,47 +104,6 @@
</property>
</widget>
</item>
<item row="0" column="0" rowspan="3">
<widget class="QFrame" name="xMeterFrame">
<property name="minimumSize">
<size>
<width>50</width>
<height>150</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="monitorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>&amp;Monitor</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@ -273,7 +189,72 @@
</item>
</layout>
</item>
<item row="2" column="4" colspan="2">
<item row="0" column="1">
<widget class="QLabel" name="labFreq">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>35</height>
</size>
</property>
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="text">
<string>1296.080</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="4">
<widget class="QFrame" name="xMeterFrame">
<property name="minimumSize">
<size>
<width>50</width>
<height>150</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="monitorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>&amp;Monitor</string>
</property>
</widget>
</item>
<item row="3" column="4" colspan="2">
<widget class="QSlider" name="NBslider">
<property name="enabled">
<bool>false</bool>
@ -304,6 +285,53 @@
</property>
</widget>
</item>
<item row="1" column="4" colspan="2">
<widget class="QSpinBox" name="sbMaxDrift">
<property name="toolTip">
<string>Maximum drift rate in units of symbol rate per transmissiion.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="prefix">
<string>Max Drift </string>
</property>
<property name="maximum">
<number>50</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
<item row="2" column="4" colspan="2">
<widget class="QSpinBox" name="sbOffset">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Offset.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="suffix">
<string> Hz</string>
</property>
<property name="prefix">
<string>Offset </string>
</property>
<property name="minimum">
<number>500</number>
</property>
<property name="maximum">
<number>2000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>1500</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" colspan="2">
@ -373,6 +401,8 @@
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;meta charset=&quot;utf-8&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
li.unchecked::marker { content: &quot;\2610&quot;; }
li.checked::marker { content: &quot;\2612&quot;; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Courier New'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>