mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Implement real-time decoding in MSK144 mode, for testing.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7097 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
6040d761c4
commit
3b97ae7417
@ -408,6 +408,7 @@ set (wsjt_FSRCS
|
||||
lib/move.f90
|
||||
lib/msk144d.f90
|
||||
lib/msk144_decode.f90
|
||||
lib/mskrtd.f90
|
||||
lib/msk144sim.f90
|
||||
lib/options.f90
|
||||
lib/opdetmsk144.f90
|
||||
|
@ -540,6 +540,7 @@ private:
|
||||
bool twoPass_;
|
||||
bool x2ToneSpacing_;
|
||||
bool contestMode_;
|
||||
bool realTimeDecode_;
|
||||
bool offsetRxFreq_;
|
||||
QString udp_server_name_;
|
||||
port_type udp_server_port_;
|
||||
@ -626,6 +627,7 @@ bool Configuration::single_decode () const {return m_->single_decode_;}
|
||||
bool Configuration::twoPass() const {return m_->twoPass_;}
|
||||
bool Configuration::x2ToneSpacing() const {return m_->x2ToneSpacing_;}
|
||||
bool Configuration::contestMode() const {return m_->contestMode_;}
|
||||
bool Configuration::realTimeDecode() const {return m_->realTimeDecode_;}
|
||||
bool Configuration::offsetRxFreq () const {return m_->offsetRxFreq_;}
|
||||
bool Configuration::split_mode () const {return m_->split_mode ();}
|
||||
QString Configuration::udp_server_name () const {return m_->udp_server_name_;}
|
||||
@ -1053,6 +1055,7 @@ void Configuration::impl::initialize_models ()
|
||||
ui_->cbTwoPass->setChecked(twoPass_);
|
||||
ui_->cbx2ToneSpacing->setChecked(x2ToneSpacing_);
|
||||
ui_->cbContestMode->setChecked(contestMode_);
|
||||
ui_->cbRealTime->setChecked(realTimeDecode_);
|
||||
ui_->offset_Rx_freq_check_box->setChecked(offsetRxFreq_);
|
||||
ui_->type_2_msg_gen_combo_box->setCurrentIndex (type_2_msg_gen_);
|
||||
ui_->rig_combo_box->setCurrentText (rig_params_.rig_name);
|
||||
@ -1278,6 +1281,7 @@ void Configuration::impl::read_settings ()
|
||||
twoPass_ = settings_->value("TwoPass",true).toBool ();
|
||||
x2ToneSpacing_ = settings_->value("x2ToneSpacing",false).toBool ();
|
||||
contestMode_ = settings_->value("ContestMode",false).toBool ();
|
||||
realTimeDecode_ = settings_->value("RealTimeDecode",false).toBool ();
|
||||
offsetRxFreq_ = settings_->value("OffsetRx",false).toBool();
|
||||
rig_params_.poll_interval = settings_->value ("Polling", 0).toInt ();
|
||||
rig_params_.split_mode = settings_->value ("SplitMode", QVariant::fromValue (TransceiverFactory::split_mode_none)).value<TransceiverFactory::SplitMode> ();
|
||||
@ -1375,6 +1379,7 @@ void Configuration::impl::write_settings ()
|
||||
settings_->setValue ("TwoPass", twoPass_);
|
||||
settings_->setValue ("x2ToneSpacing", x2ToneSpacing_);
|
||||
settings_->setValue ("ContestMode", contestMode_);
|
||||
settings_->setValue ("RealTimeDecode", realTimeDecode_);
|
||||
settings_->setValue("OffsetRx",offsetRxFreq_);
|
||||
settings_->setValue ("UDPServer", udp_server_name_);
|
||||
settings_->setValue ("UDPServerPort", udp_server_port_);
|
||||
@ -1768,6 +1773,7 @@ void Configuration::impl::accept ()
|
||||
twoPass_ = ui_->cbTwoPass->isChecked ();
|
||||
x2ToneSpacing_ = ui_->cbx2ToneSpacing->isChecked ();
|
||||
contestMode_ = ui_->cbContestMode->isChecked ();
|
||||
realTimeDecode_ = ui_->cbRealTime->isChecked ();
|
||||
offsetRxFreq_ = ui_->offset_Rx_freq_check_box->isChecked();
|
||||
frequency_calibration_intercept_ = ui_->calibration_intercept_spin_box->value ();
|
||||
frequency_calibration_slope_ppm_ = ui_->calibration_slope_ppm_spin_box->value ();
|
||||
|
@ -123,6 +123,7 @@ public:
|
||||
bool twoPass() const;
|
||||
bool x2ToneSpacing() const;
|
||||
bool contestMode() const;
|
||||
bool realTimeDecode() const;
|
||||
bool MyDx() const;
|
||||
bool CQMyN() const;
|
||||
bool NDxG() const;
|
||||
|
@ -2,6 +2,14 @@
|
||||
<ui version="4.0">
|
||||
<class>configuration_dialog</class>
|
||||
<widget class="QDialog" name="configuration_dialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>545</width>
|
||||
<height>591</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
@ -2259,7 +2267,7 @@ Right click for insert and delete options.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="cbx2ToneSpacing">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Generate Tx audio with twice the normal tone spacing. Intended for special LF/MF transmitters that use a divide-by-2 before generating RF.</p></body></html></string>
|
||||
@ -2269,6 +2277,19 @@ Right click for insert and delete options.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QCheckBox" name="cbRealTime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Decode on-the-fly rather than at end of Rx sequence.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>MSK144 Realtime decode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -2518,12 +2539,12 @@ soundcard changes</string>
|
||||
</connection>
|
||||
</connections>
|
||||
<buttongroups>
|
||||
<buttongroup name="CAT_stop_bits_button_group"/>
|
||||
<buttongroup name="split_mode_button_group"/>
|
||||
<buttongroup name="PTT_method_button_group"/>
|
||||
<buttongroup name="CAT_stop_bits_button_group"/>
|
||||
<buttongroup name="CAT_data_bits_button_group"/>
|
||||
<buttongroup name="CAT_handshake_button_group"/>
|
||||
<buttongroup name="TX_mode_button_group"/>
|
||||
<buttongroup name="TX_audio_source_button_group"/>
|
||||
<buttongroup name="split_mode_button_group"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine hspec(id2,k,ntrperiod,ingain,green,s,jh)
|
||||
subroutine hspec(id2,k,nutc0,ntrperiod,ntol,bmsk144,ingain,green,s,jh,line1)
|
||||
|
||||
! Input:
|
||||
! k pointer to the most recent new data
|
||||
@ -9,7 +9,9 @@ subroutine hspec(id2,k,ntrperiod,ingain,green,s,jh)
|
||||
! jh index of most recent data in green(), s()
|
||||
|
||||
parameter (JZ=703)
|
||||
character*80 line1
|
||||
integer*2 id2(0:120*12000-1)
|
||||
logical*1 bmsk144
|
||||
real green(0:JZ-1)
|
||||
real s(0:63,0:JZ-1)
|
||||
real x(512)
|
||||
@ -62,5 +64,14 @@ subroutine hspec(id2,k,ntrperiod,ingain,green,s,jh)
|
||||
enddo
|
||||
k0=k
|
||||
|
||||
!###
|
||||
if(bmsk144) then
|
||||
if(k.ge.7168) then
|
||||
tsec=(k-3584)/12000.0
|
||||
call mskrtd(id2(k-7168+1:k),nutc0,tsec,ntol,line1)
|
||||
endif
|
||||
endif
|
||||
!###
|
||||
|
||||
900 return
|
||||
end subroutine hspec
|
||||
|
@ -14,7 +14,8 @@ subroutine tweak1(ca,jz,f0,cb)
|
||||
wstep=cmplx(cos(dphi),sin(dphi))
|
||||
do i=1,jz
|
||||
w=w*wstep
|
||||
cb(i)=w*ca(i)
|
||||
w4=w
|
||||
cb(i)=w4*ca(i)
|
||||
enddo
|
||||
|
||||
return
|
||||
|
@ -67,8 +67,9 @@ extern "C" {
|
||||
void symspec_(struct dec_data *, int* k, int* ntrperiod, int* nsps, int* ingain, int* minw,
|
||||
float* px, float s[], float* df3, int* nhsym, int* npts8);
|
||||
|
||||
void hspec_(short int d2[], int* k, int* ntrperiod, int* ingain,
|
||||
float green[], float s[], int* jh);
|
||||
void hspec_(short int d2[], int* k, int* nutc0, int* ntrperiod, int* ntol,
|
||||
bool* bmsk144, int* ingain, float green[], float s[], int* jh,
|
||||
char line[], int len1);
|
||||
|
||||
void gen4_(char* msg, int* ichk, char* msgsent, int itone[],
|
||||
int* itext, int len1, int len2);
|
||||
@ -1261,17 +1262,42 @@ void MainWindow::fastSink(qint64 frames)
|
||||
m_bFastDecodeCalled=false;
|
||||
}
|
||||
|
||||
hspec_(dec_data.d2, &k, &m_TRperiod, &m_inGain, fast_green, fast_s, &fast_jh);
|
||||
QDateTime tnow=QDateTime::currentDateTimeUtc();
|
||||
int ihr=tnow.toString("hh").toInt();
|
||||
int imin=tnow.toString("mm").toInt();
|
||||
int isec=tnow.toString("ss").toInt();
|
||||
isec=isec - isec%m_TRperiod;
|
||||
int nutc0=10000*ihr + 100*imin + isec;
|
||||
if(m_diskData) nutc0=m_UTCdisk;
|
||||
char line[80];
|
||||
bool bmsk144=((m_mode=="MSK144") and (m_monitoring or m_diskData));
|
||||
bmsk144=bmsk144 && m_config.realTimeDecode();
|
||||
line[0]=0;
|
||||
hspec_(dec_data.d2,&k,&nutc0,&m_TRperiod, &m_Ftol, &bmsk144,&m_inGain,fast_green,
|
||||
fast_s,&fast_jh, &line[0],80);
|
||||
float px = fast_green[fast_jh];
|
||||
QString t;
|
||||
t.sprintf(" Rx noise: %5.1f ",px);
|
||||
ui->signal_meter_widget->setValue(px); // Update thermometer
|
||||
m_fastGraph->plotSpec(m_diskData,m_UTCdisk);
|
||||
|
||||
//###
|
||||
if(bmsk144 and (line[0]!=0)) {
|
||||
QString message=QString::fromLatin1(line);
|
||||
DecodedText decodedtext;
|
||||
decodedtext=message.replace("\n","");
|
||||
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
||||
m_config.color_NewCall());
|
||||
m_bDecoded=true;
|
||||
}
|
||||
//###
|
||||
|
||||
decodeNow=false;
|
||||
m_k0=k;
|
||||
if(m_diskData and m_k0 >= dec_data.params.kin - 7 * 512) decodeNow=true;
|
||||
if(!m_diskData and m_tRemaining<0.35 and !m_bFastDecodeCalled) decodeNow=true;
|
||||
if(m_config.realTimeDecode()) decodeNow=false;
|
||||
|
||||
if(decodeNow) {
|
||||
m_dataAvailable=true;
|
||||
@ -2938,6 +2964,7 @@ void MainWindow::guiUpdate()
|
||||
|
||||
//Once per second:
|
||||
if(nsec != m_sec0) {
|
||||
qDebug() << m_config.contestMode() << m_config.realTimeDecode();
|
||||
g_single_decode=m_config.single_decode();
|
||||
if(m_auto and m_mode=="Echo" and m_bEchoTxOK) {
|
||||
progressBar.setMaximum(6);
|
||||
|
Loading…
Reference in New Issue
Block a user