mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-09-20 20:26:41 -04:00
Correct the Tx message length and adjust reported SNR for short JTMSK messages.
Commit some things omitted last time. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6420 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
8f993eeb9f
commit
a74d000c32
@ -52,10 +52,9 @@ void DisplayText::insertLineSpacer(QString const& line)
|
|||||||
|
|
||||||
void DisplayText::appendText(QString const& text, QString const& bg)
|
void DisplayText::appendText(QString const& text, QString const& bg)
|
||||||
{
|
{
|
||||||
QString t=text.trimmed().replace('<','(');
|
QString escaped {text.trimmed().replace('<',"<").replace('>',">").replace(' ', " ")};
|
||||||
t=t.replace('>',')');
|
|
||||||
QString s = "<table border=0 cellspacing=0 width=100%><tr><td bgcolor=\"" +
|
QString s = "<table border=0 cellspacing=0 width=100%><tr><td bgcolor=\"" +
|
||||||
bg + "\">" + t.trimmed ().replace (' ', " ") + "</td></tr></table>";
|
bg + "\">" + escaped + "</td></tr></table>";
|
||||||
auto cursor = textCursor ();
|
auto cursor = textCursor ();
|
||||||
cursor.movePosition (QTextCursor::End);
|
cursor.movePosition (QTextCursor::End);
|
||||||
auto pos = cursor.position ();
|
auto pos = cursor.position ();
|
||||||
|
@ -19,8 +19,8 @@ program JTMSKsim
|
|||||||
if(nargs.ne.5) then
|
if(nargs.ne.5) then
|
||||||
print*,'Usage: JTMSKsim message freq width snr nfiles'
|
print*,'Usage: JTMSKsim message freq width snr nfiles'
|
||||||
print*,' '
|
print*,' '
|
||||||
print*,'Examples: JTMSKsim "K1ABC W9XYZ EN37" 1500 0.05 0.0 1'
|
print*,'Examples: JTMSKsim "K1ABC W9XYZ EN37" 1500 0.12 2 1'
|
||||||
print*,' JTMSKsim "<K1ABC W9XYZ> R26" 1500 0.01 0.0 10'
|
print*,' JTMSKsim "<K1ABC W9XYZ> R26" 1500 0.01 1 3'
|
||||||
go to 999
|
go to 999
|
||||||
endif
|
endif
|
||||||
call getarg(1,msg)
|
call getarg(1,msg)
|
||||||
@ -86,7 +86,7 @@ program JTMSKsim
|
|||||||
write(10) h,iwave !Save the .wav file
|
write(10) h,iwave !Save the .wav file
|
||||||
close(10)
|
close(10)
|
||||||
|
|
||||||
call jtmsk_short(cwave,NMAX,msg)
|
! call jtmsk_short(cwave,NMAX,msg)
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ subroutine jtmsk_decode(id2,narg,line)
|
|||||||
if(msg.ne.' ') then
|
if(msg.ne.' ') then
|
||||||
nline=nline+1
|
nline=nline+1
|
||||||
j=nint(12000.0*tbest/512.0)
|
j=nint(12000.0*tbest/512.0)
|
||||||
nsnr=nint(yellow(j)-1.0)
|
nsnr=nint(3*(yellow(j)-2.0))
|
||||||
write(line(nline),1020) nutc,nsnr,tbest,nrxfreq,msg
|
write(line(nline),1020) nutc,nsnr,tbest,nrxfreq,msg
|
||||||
endif
|
endif
|
||||||
!###
|
!###
|
||||||
|
@ -97,6 +97,7 @@ extern "C" {
|
|||||||
float* width);
|
float* width);
|
||||||
|
|
||||||
void fast_decode_(short id2[], int narg[], char msg[], int len);
|
void fast_decode_(short id2[], int narg[], char msg[], int len);
|
||||||
|
void hash_calls_(char calls[], int* ih9, int len);
|
||||||
void degrade_snr_(short d2[], int* n, float* db);
|
void degrade_snr_(short d2[], int* n, float* db);
|
||||||
void wav12_(short d2[], short d1[], int* nbytes, short* nbitsam2);
|
void wav12_(short d2[], short d1[], int* nbytes, short* nbitsam2);
|
||||||
}
|
}
|
||||||
@ -115,6 +116,7 @@ float fast_s[44992]; //44992=64*703
|
|||||||
float fast_s2[44992];
|
float fast_s2[44992];
|
||||||
int fast_jh;
|
int fast_jh;
|
||||||
int fast_jh2;
|
int fast_jh2;
|
||||||
|
int narg[14];
|
||||||
QVector<QColor> g_ColorTbl;
|
QVector<QColor> g_ColorTbl;
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
@ -781,6 +783,7 @@ void MainWindow::readSettings()
|
|||||||
ui->sbSubmode->setValue(m_nSubMode);
|
ui->sbSubmode->setValue(m_nSubMode);
|
||||||
m_FtolIndex=m_settings->value("FtolIndex",21).toInt();
|
m_FtolIndex=m_settings->value("FtolIndex",21).toInt();
|
||||||
ui->sbFtol->setValue(m_FtolIndex);
|
ui->sbFtol->setValue(m_FtolIndex);
|
||||||
|
on_sbFtol_valueChanged(m_FtolIndex);
|
||||||
// ui->FTol_combo_box->setCurrentText(m_settings->value("FTol","500").toString ());
|
// ui->FTol_combo_box->setCurrentText(m_settings->value("FTol","500").toString ());
|
||||||
ui->syncSpinBox->setValue(m_settings->value("MinSync",0).toInt());
|
ui->syncSpinBox->setValue(m_settings->value("MinSync",0).toInt());
|
||||||
m_bEME=m_settings->value("EME",false).toBool();
|
m_bEME=m_settings->value("EME",false).toBool();
|
||||||
@ -1859,7 +1862,6 @@ void MainWindow::decode() //decode()
|
|||||||
t1=m_t1Pick;
|
t1=m_t1Pick;
|
||||||
if(t1 > m_kdone/12000.0) t1=m_kdone/12000.0;
|
if(t1 > m_kdone/12000.0) t1=m_kdone/12000.0;
|
||||||
}
|
}
|
||||||
static int narg[12];
|
|
||||||
static short int d2b[360000];
|
static short int d2b[360000];
|
||||||
narg[0]=dec_data.params.nutc;
|
narg[0]=dec_data.params.nutc;
|
||||||
if(m_kdone>12000*m_TRperiod) {
|
if(m_kdone>12000*m_TRperiod) {
|
||||||
@ -1879,6 +1881,9 @@ void MainWindow::decode() //decode()
|
|||||||
if(m_mode=="JTMSK") narg[9]=103; //JTMSK
|
if(m_mode=="JTMSK") narg[9]=103; //JTMSK
|
||||||
narg[10]=ui->RxFreqSpinBox->value();
|
narg[10]=ui->RxFreqSpinBox->value();
|
||||||
narg[11]=m_Ftol;
|
narg[11]=m_Ftol;
|
||||||
|
m_calls="<" + m_config.my_callsign() + " " + hisCall + ">";
|
||||||
|
hash_calls_(m_calls.toLatin1().data(), &narg[12], m_calls.length());
|
||||||
|
narg[13]=-1;
|
||||||
memcpy(d2b,dec_data.d2,2*360000);
|
memcpy(d2b,dec_data.d2,2*360000);
|
||||||
*future3 = QtConcurrent::run(fast_decode_,&d2b[0],&narg[0],&m_msg[0][0],80);
|
*future3 = QtConcurrent::run(fast_decode_,&d2b[0],&narg[0],&m_msg[0][0],80);
|
||||||
watcher3->setFuture(*future3);
|
watcher3->setFuture(*future3);
|
||||||
@ -1903,6 +1908,7 @@ void::MainWindow::fast_decode_done()
|
|||||||
}
|
}
|
||||||
if(m_msg[i][0]==0) break;
|
if(m_msg[i][0]==0) break;
|
||||||
QString message=QString::fromLatin1(m_msg[i]);
|
QString message=QString::fromLatin1(m_msg[i]);
|
||||||
|
if(narg[13]==narg[12]) message=message.trimmed().replace("<...>",m_calls);
|
||||||
|
|
||||||
//Left (Band activity) window
|
//Left (Band activity) window
|
||||||
DecodedText decodedtext;
|
DecodedText decodedtext;
|
||||||
@ -4340,7 +4346,7 @@ void MainWindow::transmit (double snr)
|
|||||||
m_toneSpacing=6000.0/m_nsps;
|
m_toneSpacing=6000.0/m_nsps;
|
||||||
double f0=1000.0;
|
double f0=1000.0;
|
||||||
int nsym=NUM_JTMSK_SYMBOLS;
|
int nsym=NUM_JTMSK_SYMBOLS;
|
||||||
if(itone[37] < 0) nsym=37;
|
if(itone[35] < 0) nsym=35;
|
||||||
Q_EMIT sendMessage (nsym, double(m_nsps), f0, m_toneSpacing,
|
Q_EMIT sendMessage (nsym, double(m_nsps), f0, m_toneSpacing,
|
||||||
m_soundOutput, m_config.audio_output_channel (),
|
m_soundOutput, m_config.audio_output_channel (),
|
||||||
true, true, snr, m_TRperiod);
|
true, true, snr, m_TRperiod);
|
||||||
|
@ -483,6 +483,7 @@ private:
|
|||||||
QString m_fileToSave;
|
QString m_fileToSave;
|
||||||
QString m_band;
|
QString m_band;
|
||||||
QString m_c2name;
|
QString m_c2name;
|
||||||
|
QString m_calls;
|
||||||
|
|
||||||
QStringList m_prefix;
|
QStringList m_prefix;
|
||||||
QStringList m_suffix;
|
QStringList m_suffix;
|
||||||
|
Loading…
Reference in New Issue
Block a user