Merge branch 'echo-mode' into develop

This commit is contained in:
k9an 2022-07-30 08:46:10 -05:00
commit 00f29458b3
15 changed files with 443 additions and 237 deletions

View File

@ -97,7 +97,7 @@ void SoundInput::start(QAudioDeviceInfo const& device, int framesPerBuffer, Audi
m_stream->start (sink);
checkStream ();
cummulative_lost_usec_ = -1;
LOG_DEBUG ("Selected buffer size (bytes): " << m_stream->bufferSize () << " period size: " << m_stream->periodSize ());
// LOG_DEBUG ("Selected buffer size (bytes): " << m_stream->bufferSize () << " period size: " << m_stream->periodSize ());
}
else
{

View File

@ -111,7 +111,7 @@ void SoundOutput::restart (QIODevice * source)
}
m_stream->setCategory ("production");
m_stream->start (source);
LOG_DEBUG ("Selected buffer size (bytes): " << m_stream->bufferSize () << " period size: " << m_stream->periodSize ());
// LOG_DEBUG ("Selected buffer size (bytes): " << m_stream->bufferSize () << " period size: " << m_stream->periodSize ());
}
void SoundOutput::suspend ()

View File

@ -71,7 +71,7 @@ message (STATUS "******************************************************")
include (set_build_type)
# RC 0 or omitted is a development build, GA is a General Availability release build
set_build_type (RC 2)
set_build_type (RC 3)
set (wsjtx_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${BUILD_TYPE_REVISION}")
#
@ -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

View File

@ -188,7 +188,8 @@ public:
bool highlight_DXcall () const;
bool highlight_DXgrid () const;
enum class SpecialOperatingActivity {NONE, NA_VHF, EU_VHF, FIELD_DAY, RTTY, WW_DIGI, ARRL_DIGI, FOX, HOUND};
// 0 1 2 3 4 5 6 7 8
enum class SpecialOperatingActivity {NONE, NA_VHF, EU_VHF, FIELD_DAY, RTTY, WW_DIGI, FOX, HOUND, ARRL_DIGI};
SpecialOperatingActivity special_op_id () const;
struct CalibrationParams

View File

@ -199,6 +199,7 @@
* 5 -> WW DIGI
* 6 -> FOX
* 7 -> HOUND
* 8 -> ARRL DIGI
*
* The Frequency Tolerance and T/R period fields may have a value
* of the maximum quint32 value which implies the field is not

View File

@ -1,8 +1,8 @@
// Status=edited
Download and execute the package file {win32} (Win 7,
Win 8, Win10, 32-bit) or {win64} (Win 7, Win 8, Win10, 64-bit)
following these instructions:
Download and execute the package file {win32} (Windows 7 or later,
32-bit) or {win64} (Windows 7 or later, 64-bit) following these
instructions:
* Install _WSJT-X_ into its own directory, for example `C:\WSJTX` or `C:\WSJT\WSJTX`, rather than the conventional location `C:\Program
Files ...\WSJTX`.

View File

@ -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

View File

@ -1,5 +1,5 @@
subroutine avecho(id2,ndop,nfrit,nauto,nqual,f1,xlevel,snrdb,db_err, &
dfreq,width)
dfreq,width,bDiskData)
integer TXLENGTH
parameter (TXLENGTH=27648) !27*1024
@ -15,6 +15,7 @@ subroutine avecho(id2,ndop,nfrit,nauto,nqual,f1,xlevel,snrdb,db_err, &
real x(NFFT)
integer ipkv(1)
logical ex
logical*1 bDiskData
complex c(0:NH)
equivalence (x,c),(ipk,ipkv)
common/echocom/nclearave,nsum,blue(NZ),red(NZ)
@ -22,6 +23,7 @@ subroutine avecho(id2,ndop,nfrit,nauto,nqual,f1,xlevel,snrdb,db_err, &
save dop0,sa,sb
fspread=fspread_dx !### Use the predicted Doppler spread ###
if(bDiskData) fspread=width
if(nauto.eq.1) fspread=fspread_self
inquire(file='fspread.txt',exist=ex)
if(ex) then
@ -57,8 +59,13 @@ subroutine avecho(id2,ndop,nfrit,nauto,nqual,f1,xlevel,snrdb,db_err, &
fnominal=1500.0 !Nominal audio frequency w/o doppler or dither
ia=nint((fnominal+dop0-nfrit)/df)
ib=nint((f1+dop-nfrit)/df)
if(ia.lt.600 .or. ib.lt.600) go to 900
if(ia.gt.7590 .or. ib.gt.7590) go to 900
if(ia.lt.2048 .or. ib.lt.2048 .or. ia.gt.6144 .or. ib.gt.6144) then
xlevel=0.
snrdb=0.
db_err=0.
dfreq=0.
go to 900
endif
nsum=nsum+1
do i=1,NZ

View File

@ -108,11 +108,11 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
nfail=0
10 if (params%nagain) then
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown', &
position='append',iostat=ios)
position='append',iostat=ios13)
else
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown',iostat=ios)
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown',iostat=ios13)
endif
if(ios.ne.0) then
if(ios13.ne.0) then
nfail=nfail+1
if(nfail.le.3) then
call sleep_msec(10)
@ -523,8 +523,8 @@ contains
write(*,1010) params%nutc,snr,dt,freq,csync,decoded,cflags
1010 format(i4.4,i4,f5.1,i5,1x,a2,1x,a22,1x,a3)
endif
write(13,1012) params%nutc,nint(sync),snr,dt,float(freq),drift, &
decoded,ft,nsum,nsmo
if(ios13.eq.0) write(13,1012) params%nutc,nint(sync),snr,dt, &
float(freq),drift,decoded,ft,nsum,nsmo
1012 format(i4.4,i4,i5,f6.2,f8.0,i4,3x,a22,' JT65',3i3)
call flush(6)
@ -550,7 +550,8 @@ contains
!$omp critical(decode_results)
write(*,1000) params%nutc,snr,dt,nint(freq),decoded
1000 format(i4.4,i4,f5.1,i5,1x,'@ ',1x,a22)
write(13,1002) params%nutc,nint(sync),snr,dt,freq,drift,decoded
if(ios13.eq.0) write(13,1002) params%nutc,nint(sync),snr,dt,freq, &
drift,decoded
1002 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a22,' JT9')
call flush(6)
!$omp end critical(decode_results)
@ -614,8 +615,9 @@ contains
1000 format(i6.6,i4,f5.1,i5,' ~ ',1x,a22,1x,a2)
if(i0.gt.0) write(*,1001) params%nutc,snr,dt,nint(freq),decoded0,annot
1001 format(i6.6,i4,f5.1,i5,' ~ ',1x,a37,1x,a2)
write(13,1002) params%nutc,nint(sync),snr,dt,freq,0,decoded0
if(ios13.eq.0) write(13,1002) params%nutc,nint(sync),snr,dt,freq,0,decoded0
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FT8')
print*,'A',ios13
if(ncontest.eq.6) then
i1=index(decoded0,' ')
@ -651,7 +653,7 @@ contains
endif
call flush(6)
call flush(13)
if(ios13.eq.0) call flush(13)
select type(this)
type is (counting_ft8_decoder)
@ -686,11 +688,12 @@ contains
write(*,1001) params%nutc,snr,dt,nint(freq),decoded0,annot
1001 format(i6.6,i4,f5.1,i5,' + ',1x,a37,1x,a2)
write(13,1002) params%nutc,nint(sync),snr,dt,freq,0,decoded0
if(ios13.eq.0) write(13,1002) params%nutc,nint(sync),snr,dt, &
freq,0,decoded0
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FT4')
call flush(6)
call flush(13)
if(ios13.eq.0) call flush(13)
select type(this)
type is (counting_ft4_decoder)
@ -734,12 +737,12 @@ contains
if(ntrperiod.lt.60) then
write(line,1001) nutc,nsnr,dt,nint(freq),decoded0,annot
1001 format(i6.6,i4,f5.1,i5,' ` ',1x,a37,1x,a2)
write(13,1002) nutc,nint(sync),nsnr,dt,freq,0,decoded0
if(ios13.eq.0) write(13,1002) nutc,nint(sync),nsnr,dt,freq,0,decoded0
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FST4')
else
write(line,1003) nutc,nsnr,dt,nint(freq),decoded0,annot
1003 format(i4.4,i4,f5.1,i5,' ` ',1x,a37,1x,a2,2f7.3)
write(13,1004) nutc,nint(sync),nsnr,dt,freq,0,decoded0
if(ios13.eq.0) write(13,1004) nutc,nint(sync),nsnr,dt,freq,0,decoded0
1004 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a37,' FST4')
endif
@ -752,7 +755,7 @@ contains
1005 format(a70)
call flush(6)
call flush(13)
if(ios13.eq.0) call flush(13)
select type(this)
type is (counting_fst4_decoder)
@ -790,17 +793,17 @@ contains
if(ntrperiod.lt.60) then
write(*,1001) nutc,nsnr,dt,nint(freq),decoded,cflags
1001 format(i6.6,i4,f5.1,i5,' : ',1x,a37,1x,a3)
write(13,1002) nutc,nint(snr1),nsnr,dt,freq,0,decoded
if(ios13.eq.0) write(13,1002) nutc,nint(snr1),nsnr,dt,freq,0,decoded
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' Q65')
else
write(*,1003) nutc,nsnr,dt,nint(freq),decoded,cflags
1003 format(i4.4,i4,f5.1,i5,' : ',1x,a37,1x,a3)
write(13,1004) nutc,nint(snr1),nsnr,dt,freq,0,decoded
if(ios13.eq.0) write(13,1004) nutc,nint(snr1),nsnr,dt,freq,0,decoded
1004 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a37,' Q65')
endif
call flush(6)
call flush(13)
if(ios13.eq.0) call flush(13)
select type(this)
type is (counting_q65_decoder)

27
lib/save_echo_params.f90 Normal file
View 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

View File

@ -92,7 +92,7 @@ void Astro::write_settings ()
}
auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const& hisgrid, Frequency freq,
bool dx_is_self, bool bTx, bool no_tx_QSY, double TR_period) -> Correction
bool bEchoMode, bool bTx, bool bAuto, bool no_tx_QSY, double TR_period) -> Correction
{
Frequency freq_moon {freq};
double azsun,elsun,azmoon,elmoon,azmoondx,elmoondx;
@ -121,6 +121,7 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
AzElFileName.toLocal8Bit ().constData (),
jpleph.toLocal8Bit ().constData ());
// qDebug() << "AA1" << m_dop00 << m_dop << width1 << width2;
QString message;
{
QTextStream out {&message};
@ -136,14 +137,14 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
<< "Az: " << azmoon << "\n"
"El: " << elmoon << "\n"
"SelfDop:" << m_dop00 << "\n"
"Width: " << int(width1) << "\n"
"Width: " << int(width1+0.5) << "\n"
<< qSetRealNumberPrecision (2)
<< "Delay: " << techo << "\n"
<< qSetRealNumberPrecision (1)
<< "DxAz: " << azmoondx << "\n"
"DxEl: " << elmoondx << "\n"
"DxDop: " << m_dop << "\n"
"DxWid: " << int(width2) << "\n"
"DxWid: " << int(width2+0.5) << "\n"
"Dec: " << decmoon << "\n"
"SunAz: " << azsun << "\n"
"SunEl: " << elsun << "\n"
@ -159,7 +160,14 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
ui_->text_label->setText(message);
Correction correction;
correction.dop=m_dop00;
correction.width=width1;
if(hisgrid!="" and !bAuto) {
correction.dop=m_dop;
correction.width=width2;
}
if (ui_->cbDopplerTracking->isChecked ()) {
ui_->sbRIT->setEnabled(m_DopplerMethod==0);
switch (m_DopplerMethod)
{
case 1: // All Doppler correction done here; DX station stays at nominal dial frequency.
@ -170,7 +178,7 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
break;
//case 5: // All Doppler correction done here; DX station stays at nominal dial frequency.
case 3: // Both stations do full correction on Rx and none on Tx
//correction.rx = dx_is_self ? m_dop00 : m_dop;
//correction.rx = bEchoMode ? m_dop00 : m_dop;
correction.rx = m_dop00; // Now always sets RX to *own* echo freq
break;
case 2:
@ -195,7 +203,7 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
}
//if (3 != m_DopplerMethod || 4 != m_DopplerMethod) correction.tx = -correction.rx;
if(dx_is_self && m_DopplerMethod == 1) correction.rx = 0;
if(bEchoMode && m_DopplerMethod == 1) correction.rx = 0;
if (no_tx_QSY && 3 != m_DopplerMethod && 0 != m_DopplerMethod)
{
@ -229,7 +237,7 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
{
case 1:
// All Doppler correction done here; DX station stays at nominal dial frequency.
offset = dx_is_self ? m_dop00 : m_dop;
offset = bEchoMode ? m_dop00 : m_dop;
break;
case 2:
@ -250,11 +258,14 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
//qDebug () << "correction.tx (no tx qsy):" << correction.tx;
}
}
// qDebug() << "AA0" << m_DopplerMethod << bAuto << correction.tx << correction.rx << correction.width;
return correction;
}
void Astro::check_split ()
{
/* TEMPORARILY DISABLE
if (doppler_tracking () && !configuration_->split_mode ())
{
MessageBox::warning_message (this, tr ("Doppler Tracking Error"),
@ -262,6 +273,7 @@ void Astro::check_split ()
tr ("Go to \"Menu->File->Settings->Radio\" to enable split operation"));
ui_->rbNoDoppler->click ();
}
*/
}
void Astro::on_rbFullTrack_clicked(bool)
@ -331,3 +343,27 @@ void Astro::hideEvent (QHideEvent * e)
Q_EMIT tracking_update ();
QWidget::hideEvent (e);
}
bool Astro::bDither()
{
return ui_->cbDither->isChecked();
}
void Astro::selectOwnEcho()
{
ui_->rbOwnEcho->click();
}
void Astro::selectOnDxEcho()
{
ui_->rbOnDxEcho->click();
}
qint32 Astro::nfRIT()
{
if(m_DopplerMethod==0) {
return ui_->sbRIT->value();
} else {
return 0;
}
}

View File

@ -32,6 +32,8 @@ public:
Correction ()
: rx {0}
, tx {0}
, dop {0}
, width {0}
{}
Correction (Correction const&) = default;
Correction& operator = (Correction const&) = default;
@ -45,6 +47,8 @@ public:
FrequencyDelta rx;
FrequencyDelta tx;
double dop;
double width;
};
Correction astroUpdate(QDateTime const& t,
@ -53,10 +57,16 @@ public:
Frequency frequency,
bool dx_is_self,
bool bTx,
bool bAuto,
bool no_tx_QSY,
double TR_period);
bool doppler_tracking () const;
bool bDither();
void selectOwnEcho();
void selectOnDxEcho();
qint32 nfRIT();
Q_SLOT void nominal_frequency (Frequency rx, Frequency tx);
Q_SIGNAL void tracking_update () const;
@ -67,8 +77,8 @@ protected:
private slots:
void on_rbConstFreqOnMoon_clicked(bool);
void on_rbFullTrack_clicked(bool);
void on_rbOwnEcho_clicked(bool);
void on_rbNoDoppler_clicked(bool);
void on_rbOwnEcho_clicked(bool);
void on_rbOnDxEcho_clicked(bool);
void on_rbCallDx_clicked(bool);
void on_cbDopplerTracking_toggled(bool);

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>359</width>
<height>342</height>
<height>401</height>
</rect>
</property>
<property name="sizePolicy">
@ -70,7 +70,7 @@
</property>
</widget>
</item>
<item>
<item>
<widget class="QRadioButton" name="rbOnDxEcho">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;DX station announces their TX Freq, which is entered as the Sked Freq. Correction applied to RX and TX so you appear on the DX's station's own echo Freq.&lt;/p&gt;&lt;p&gt;If the rig does not accept CAT QSY commands while transmitting a single correction is applied for the whole transmit period.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -83,7 +83,7 @@
</property>
</widget>
</item>
<item>
<item>
<widget class="QRadioButton" name="rbCallDx">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Tune radio manually and select this mode to put your echo on the same frequency.&lt;/p&gt;&lt;p&gt;If the rig does not accept CAT QSY commands while transmitting a single correction is applied for the whole transmit period.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -95,7 +95,7 @@
<bool>false</bool>
</property>
</widget>
</item>
</item>
<item>
<widget class="QRadioButton" name="rbNoDoppler">
<property name="toolTip">
@ -109,7 +109,7 @@
</property>
</widget>
</item>
</layout>
</layout>
</widget>
</item>
<item>
@ -202,6 +202,76 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="title">
<string>Echo Mode</string>
</property>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>164</width>
<height>22</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QSpinBox" name="sbRIT">
<property name="enabled">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="suffix">
<string> Hz</string>
</property>
<property name="prefix">
<string>RIT </string>
</property>
<property name="minimum">
<number>-20000</number>
</property>
<property name="maximum">
<number>20000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="cbDither">
<property name="text">
<string>Dither</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">

File diff suppressed because it is too large Load Diff

View File

@ -105,6 +105,7 @@ public:
using Frequency = Radio::Frequency;
using FrequencyDelta = Radio::FrequencyDelta;
using Mode = Modes::Mode;
using SpecOp = Configuration::SpecialOperatingActivity;
explicit MainWindow(QDir const& temp_directory, bool multiple, MultiSettings *,
QSharedMemory *shdmem, unsigned downSampleFactor,
@ -432,6 +433,10 @@ private:
double m_tRemaining;
double m_TRperiod;
double m_fSpread;
double m_s6;
double m_fDither;
double m_fAudioShift;
float m_DTtol;
float m_t0;
@ -500,6 +505,7 @@ private:
qint32 m_latestDecodeTime=-1;
qint32 m_points=-99;
qint32 m_score=0;
qint32 m_fDop=0;
bool m_btxok; //True if OK to transmit
bool m_diskData;
@ -557,6 +563,8 @@ private:
bool m_bOK_to_chk=false;
bool m_bSentReport=false;
SpecOp m_specOp;
enum
{
CALLING,