mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-31 20:27:51 -04:00
MSK144 mode: minimum Ftol=20; report received copied to Log screen; spots sent to PSKreporter.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7140 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
4fac7306dd
commit
5c6874db58
@ -129,10 +129,12 @@ QString DecodedText::call()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get the second word, most likely the de call and the third word, most likely grid
|
// get the second word, most likely the de call and the third word, most likely grid
|
||||||
void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid)
|
void DecodedText::deCallAndGrid(QString jtmode,/*out*/QString& call, QString& grid)
|
||||||
{
|
{
|
||||||
auto msg = _string;
|
auto msg = _string;
|
||||||
msg = msg.replace (" CQ DX ", " CQ_DX ").mid (column_qsoText);
|
int iadd=0;
|
||||||
|
if(jtmode=="MSK144") iadd=3;
|
||||||
|
msg = msg.replace (" CQ DX ", " CQ_DX ").mid (column_qsoText+iadd);
|
||||||
int i1 = msg.indexOf(" ");
|
int i1 = msg.indexOf(" ");
|
||||||
call = msg.mid(i1+1);
|
call = msg.mid(i1+1);
|
||||||
int i2 = call.indexOf(" ");
|
int i2 = call.indexOf(" ");
|
||||||
|
@ -75,7 +75,7 @@ public:
|
|||||||
QString call();
|
QString call();
|
||||||
|
|
||||||
// get the second word, most likely the de call and the third word, most likely grid
|
// get the second word, most likely the de call and the third word, most likely grid
|
||||||
void deCallAndGrid(/*out*/QString& call, QString& grid);
|
void deCallAndGrid(QString jtmode,/*out*/QString& call, QString& grid);
|
||||||
|
|
||||||
int timeInSeconds();
|
int timeInSeconds();
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ subroutine sync64(dd,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk,snrdb,c0)
|
|||||||
real s0(0:NSPC-1) !Sum of s1+s2+s3
|
real s0(0:NSPC-1) !Sum of s1+s2+s3
|
||||||
real s0a(0:NSPC-1) !Best synchromized spectrum (saved)
|
real s0a(0:NSPC-1) !Best synchromized spectrum (saved)
|
||||||
real s0b(0:NSPC-1) !tmp
|
real s0b(0:NSPC-1) !tmp
|
||||||
real a(5)
|
|
||||||
integer icos7(0:6) !Costas 7x7 tones
|
integer icos7(0:6) !Costas 7x7 tones
|
||||||
integer ipk0(1)
|
integer ipk0(1)
|
||||||
complex cc(0:NSPC-1) !Costas waveform
|
complex cc(0:NSPC-1) !Costas waveform
|
||||||
|
@ -1293,34 +1293,36 @@ void MainWindow::fastSink(qint64 frames)
|
|||||||
ui->signal_meter_widget->setValue(px); // Update thermometer
|
ui->signal_meter_widget->setValue(px); // Update thermometer
|
||||||
m_fastGraph->plotSpec(m_diskData,m_UTCdisk);
|
m_fastGraph->plotSpec(m_diskData,m_UTCdisk);
|
||||||
|
|
||||||
|
DecodedText decodedtext;
|
||||||
QString message;
|
QString message;
|
||||||
if(bmsk144 and (line[0]!=0)) {
|
if(bmsk144 and (line[0]!=0)) {
|
||||||
message=QString::fromLatin1(line);
|
message=QString::fromLatin1(line);
|
||||||
DecodedText decodedtext;
|
|
||||||
decodedtext=message.replace("\n","");
|
decodedtext=message.replace("\n","");
|
||||||
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
||||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
||||||
m_config.color_NewCall());
|
m_config.color_NewCall());
|
||||||
m_bDecoded=true;
|
m_bDecoded=true;
|
||||||
|
int i1=message.indexOf(m_baseCall);
|
||||||
|
int i2=message.indexOf(m_hisCall);
|
||||||
|
if(i1>10 and i2>i1+3) {
|
||||||
|
if((message.indexOf(" 73") < 0) or (m_ntx!=6)) {
|
||||||
|
processMessage(message,43,false);
|
||||||
|
}
|
||||||
|
writeAllTxt(message);
|
||||||
|
}
|
||||||
|
bool stdMsg = decodedtext.report(m_baseCall,
|
||||||
|
Radio::base_callsign(ui->dxCallEntry->text()),m_rptRcvd);
|
||||||
|
// if(m_config.spot_to_psk_reporter() and stdMsg and !m_diskData) pskPost(decodedtext);
|
||||||
|
if(m_config.spot_to_psk_reporter() and stdMsg) pskPost(decodedtext);
|
||||||
}
|
}
|
||||||
|
|
||||||
int i1=message.indexOf(m_baseCall);
|
|
||||||
int i2=message.indexOf(m_hisCall);
|
|
||||||
if(i1>10 and i2>i1+3) {
|
|
||||||
if((message.indexOf(" 73") < 0) or (m_ntx!=6)) {
|
|
||||||
processMessage(message,43,false);
|
|
||||||
}
|
|
||||||
writeAllTxt(message);
|
|
||||||
}
|
|
||||||
float fracTR=float(k)/(12000.0*m_TRperiod);
|
float fracTR=float(k)/(12000.0*m_TRperiod);
|
||||||
decodeNow=false;
|
decodeNow=false;
|
||||||
if(fracTR>0.98) {
|
if(fracTR>0.98) {
|
||||||
// m_bFastDone=true;
|
|
||||||
m_dataAvailable=true;
|
m_dataAvailable=true;
|
||||||
fast_decode_done();
|
fast_decode_done();
|
||||||
m_bFastDone=true;
|
m_bFastDone=true;
|
||||||
}
|
}
|
||||||
//###
|
|
||||||
|
|
||||||
m_k0=k;
|
m_k0=k;
|
||||||
if(m_diskData and m_k0 >= dec_data.params.kin - 7 * 512) decodeNow=true;
|
if(m_diskData and m_k0 >= dec_data.params.kin - 7 * 512) decodeNow=true;
|
||||||
@ -2345,21 +2347,7 @@ void::MainWindow::fast_decode_done()
|
|||||||
|
|
||||||
// extract details and send to PSKreporter
|
// extract details and send to PSKreporter
|
||||||
if(m_config.spot_to_psk_reporter() and stdMsg and !m_diskData) {
|
if(m_config.spot_to_psk_reporter() and stdMsg and !m_diskData) {
|
||||||
QString msgmode=m_mode;
|
pskPost(decodedtext);
|
||||||
QString deCall;
|
|
||||||
QString grid;
|
|
||||||
decodedtext.deCallAndGrid(/*out*/deCall,grid);
|
|
||||||
int audioFrequency = decodedtext.frequencyOffset();
|
|
||||||
int snr = decodedtext.snr();
|
|
||||||
Frequency frequency = m_freqNominal + audioFrequency;
|
|
||||||
pskSetLocal();
|
|
||||||
if(grid_regexp.exactMatch (grid))
|
|
||||||
{
|
|
||||||
// qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr;
|
|
||||||
psk_Reporter->addRemoteStation(deCall,grid,QString::number(frequency),msgmode,
|
|
||||||
QString::number(snr),
|
|
||||||
QString::number(QDateTime::currentDateTime().toTime_t()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2525,22 +2513,7 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
int nsec=QDateTime::currentMSecsSinceEpoch()/1000-m_secBandChanged;
|
int nsec=QDateTime::currentMSecsSinceEpoch()/1000-m_secBandChanged;
|
||||||
bool okToPost=(nsec>50);
|
bool okToPost=(nsec>50);
|
||||||
if(m_config.spot_to_psk_reporter () and stdMsg and !m_diskData and okToPost) {
|
if(m_config.spot_to_psk_reporter () and stdMsg and !m_diskData and okToPost) {
|
||||||
QString msgmode="JT9";
|
pskPost(decodedtext);
|
||||||
if (decodedtext.isJT65()) msgmode="JT65";
|
|
||||||
QString deCall;
|
|
||||||
QString grid;
|
|
||||||
decodedtext.deCallAndGrid(/*out*/deCall,grid);
|
|
||||||
int audioFrequency = decodedtext.frequencyOffset();
|
|
||||||
int snr = decodedtext.snr();
|
|
||||||
Frequency frequency = m_freqNominal + audioFrequency;
|
|
||||||
pskSetLocal ();
|
|
||||||
if(grid_regexp.exactMatch (grid))
|
|
||||||
{
|
|
||||||
// qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr;
|
|
||||||
psk_Reporter->addRemoteStation(deCall,grid,QString::number(frequency),msgmode,
|
|
||||||
QString::number(snr),
|
|
||||||
QString::number(QDateTime::currentDateTime().toTime_t()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if((m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA64") and m_msgAvgWidget!=NULL) {
|
if((m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA64") and m_msgAvgWidget!=NULL) {
|
||||||
@ -2557,6 +2530,27 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::pskPost(DecodedText decodedtext)
|
||||||
|
{
|
||||||
|
QString msgmode=m_mode;
|
||||||
|
if(m_mode=="JT9+JT65") {
|
||||||
|
msgmode="JT9";
|
||||||
|
if (decodedtext.isJT65()) msgmode="JT65";
|
||||||
|
}
|
||||||
|
QString deCall;
|
||||||
|
QString grid;
|
||||||
|
decodedtext.deCallAndGrid(m_mode,/*out*/deCall,grid);
|
||||||
|
int audioFrequency = decodedtext.frequencyOffset();
|
||||||
|
int snr = decodedtext.snr();
|
||||||
|
Frequency frequency = m_freqNominal + audioFrequency;
|
||||||
|
pskSetLocal ();
|
||||||
|
if(grid_regexp.exactMatch (grid)) {
|
||||||
|
// qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr;
|
||||||
|
psk_Reporter->addRemoteStation(deCall,grid,QString::number(frequency),msgmode,
|
||||||
|
QString::number(snr),QString::number(QDateTime::currentDateTime().toTime_t()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::killFile ()
|
void MainWindow::killFile ()
|
||||||
{
|
{
|
||||||
if (m_fnameWE.size () &&
|
if (m_fnameWE.size () &&
|
||||||
@ -3333,7 +3327,7 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
|
|||||||
|
|
||||||
QString hiscall;
|
QString hiscall;
|
||||||
QString hisgrid;
|
QString hisgrid;
|
||||||
decodedtext.deCallAndGrid(/*out*/hiscall,hisgrid);
|
decodedtext.deCallAndGrid(m_mode,/*out*/hiscall,hisgrid);
|
||||||
if (!Radio::is_callsign (hiscall) // not interested if not from QSO partner
|
if (!Radio::is_callsign (hiscall) // not interested if not from QSO partner
|
||||||
&& !(t4.size () == 7 // unless it is of the form
|
&& !(t4.size () == 7 // unless it is of the form
|
||||||
&& (t4.at (5) == m_baseCall // "<our-call> 73"
|
&& (t4.at (5) == m_baseCall // "<our-call> 73"
|
||||||
@ -4073,7 +4067,7 @@ void MainWindow::on_actionMSK144_triggered()
|
|||||||
ui->rptSpinBox->setMaximum(24);
|
ui->rptSpinBox->setMaximum(24);
|
||||||
ui->rptSpinBox->setValue(0);
|
ui->rptSpinBox->setValue(0);
|
||||||
ui->rptSpinBox->setSingleStep(1);
|
ui->rptSpinBox->setSingleStep(1);
|
||||||
ui->sbFtol->setMinimum(23);
|
ui->sbFtol->setMinimum(22);
|
||||||
ui->sbFtol->setMaximum(25);
|
ui->sbFtol->setMaximum(25);
|
||||||
bool b=m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN";
|
bool b=m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN";
|
||||||
ui->cbCQRx->setEnabled(b);
|
ui->cbCQRx->setEnabled(b);
|
||||||
|
@ -534,6 +534,7 @@ private:
|
|||||||
void transmit (double snr = 99.);
|
void transmit (double snr = 99.);
|
||||||
void rigFailure (QString const& reason);
|
void rigFailure (QString const& reason);
|
||||||
void pskSetLocal ();
|
void pskSetLocal ();
|
||||||
|
void pskPost(DecodedText decodedtext);
|
||||||
void displayDialFrequency ();
|
void displayDialFrequency ();
|
||||||
void transmitDisplay (bool);
|
void transmitDisplay (bool);
|
||||||
void processMessage(QString const& messages, qint32 position, bool ctrl);
|
void processMessage(QString const& messages, qint32 position, bool ctrl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user