Change tolerances for auto stop and auto-sequence of some messages

FT8 auto-stop  will only react to  messages within +/- 50Hz  of our Tx
frequency.

Auto-sequence on  "DE ..." and free  text 73 messages will  respond if
they are within 25Hz of our Tx or Rx frequency.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7970 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2017-07-28 23:25:32 +00:00
parent e6635624f5
commit 4b9302d5c2
2 changed files with 27 additions and 19 deletions

View File

@ -1435,7 +1435,7 @@ void MainWindow::fastSink(qint64 frames)
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
m_config.color_NewCall());
m_bDecoded=true;
auto_sequence (message, ui->sbFtol->value ());
auto_sequence (message, ui->sbFtol->value (), std::numeric_limits<unsigned>::max ());
if (m_mode != "ISCAT") postDecode (true, decodedtext.string ());
writeAllTxt(message);
bool stdMsg = decodedtext.report(m_baseCall,
@ -2563,7 +2563,7 @@ void::MainWindow::fast_decode_done()
dec_data.params.ndiskdat=false;
// if(m_msg[0][0]==0) m_bDecoded=false;
for(int i=0; i<100; i++) {
if (tmax >= 0.0) auto_sequence (msg0, ui->sbFtol->value ());
if (tmax >= 0.0) auto_sequence (msg0, ui->sbFtol->value (), ui->sbFtol->value ());
if(m_msg[i][0]==0) break;
QString message=QString::fromLatin1(m_msg[i]);
m_msg[i][0]=0;
@ -2765,7 +2765,7 @@ void MainWindow::readFromStdout() //readFromStdout
}
m_QSOText=decodedtext;
}
if(m_mode=="FT8") auto_sequence (decodedtext.string(), 10);
if(m_mode=="FT8") auto_sequence (decodedtext.string(), 25, 50);
postDecode (true, decodedtext.string ());
@ -2791,19 +2791,27 @@ void MainWindow::readFromStdout() //readFromStdout
}
}
void MainWindow::auto_sequence (QString const& message, unsigned tolerance)
//
// start_tolerance - only respond to "DE ..." and free text 73
// messages within +/- this value
//
// stop_tolerance - kill Tx if running station is seen to reply to
// another caller and we are going to transmit within
// +/- this value of the reply to another caller
//
void MainWindow::auto_sequence (QString const& message, unsigned start_tolerance, unsigned stop_tolerance)
{
auto const& parts = message.split (' ', QString::SkipEmptyParts);
if (parts.size () > 6) {
bool ok;
auto df = parts[3].toInt (&ok);
auto in_tolerance = ok
&& (qAbs (ui->RxFreqSpinBox->value () - df) <= int (tolerance)
|| qAbs (ui->TxFreqSpinBox->value () - df) <= int (tolerance));
auto within_tolerance = ok
&& (qAbs (ui->RxFreqSpinBox->value () - df) <= int (start_tolerance)
|| qAbs (ui->TxFreqSpinBox->value () - df) <= int (start_tolerance));
if (m_auto
&& (REPLYING == m_QSOProgress
|| (!ui->tx1->isEnabled () && REPORT == m_QSOProgress))
&& qAbs (ui->TxFreqSpinBox->value () - df) <= int (tolerance)
&& qAbs (ui->TxFreqSpinBox->value () - df) <= int (stop_tolerance)
&& !parts[5].contains (QRegularExpression {"(^(CQ|QRZ)$)|" + m_baseCall})
&& parts[6].contains (Radio::base_callsign (ui->dxCallEntry->text ()))) {
// auto stop to avoid accidental QRM
@ -2817,11 +2825,11 @@ void MainWindow::auto_sequence (QString const& message, unsigned tolerance)
// being called and not already in a QSO
&& parts[6].contains (Radio::base_callsign (ui->dxCallEntry->text ())))
// type 2 compound replies
|| (in_tolerance
|| (within_tolerance
&& ((m_QSOProgress >= ROGER_REPORT && message_is_73 (0, parts))
|| ("DE" == parts[5] && parts[6].contains (Radio::base_callsign (m_hisCall)))))))
|| (m_bCallingCQ && m_bAutoReply
&& ((in_tolerance && "DE" == parts[5]) // look for type 2 compound call replies on our Tx and Rx offsets
&& ((within_tolerance && "DE" == parts[5]) // look for type 2 compound call replies on our Tx and Rx offsets
|| parts[5].contains (m_baseCall)))))
{
processMessage (message, message.size ());

View File

@ -305,7 +305,7 @@ private:
private:
void astroUpdate ();
void writeAllTxt(QString message);
void auto_sequence (QString const& message, unsigned tolerance);
void auto_sequence (QString const& message, unsigned start_tolerance, unsigned stop_tolerance);
void hideMenus(bool b);
NetworkAccessManager m_network_manager;