Merge branch 'feat-fst280' of bitbucket.org:k1jt/wsjtx into feat-fst280

This commit is contained in:
Steven Franke 2020-06-17 10:44:35 -05:00
commit c25ed618b3
8 changed files with 41 additions and 59 deletions

View File

@ -3,7 +3,7 @@ program fst280d
! Decode fst280 data read from *.c2 or *.wav files.
use packjt77
include 'ft4s280_params.f90'
include 'fst280_params.f90'
character arg*8,infile*80,fname*16,datetime*11
! character ch1*1,ch4*4,cseq*31
! character*22 decodes(100)
@ -337,7 +337,7 @@ subroutine sync_fst280(cd0,i0,f0,hmod,ncoh,np,nss,fs,sync)
! Compute sync power for a complex, downsampled FST280 signal.
include 'ft4s280_params.f90'
include 'fst280_params.f90'
complex cd0(0:np-1)
complex, allocatable, save :: csync(:)
complex, allocatable, save :: csynct(:)

View File

@ -4,7 +4,7 @@ program fst280sim
use wavhdr
use packjt77
include 'ft4s280_params.f90' !Set various constants
include 'fst280_params.f90' !Set various constants
type(hdr) h !Header for .wav file
character arg*12,fname*17
character msg37*37,msgsent37*37,c77*77

View File

@ -13,7 +13,7 @@ subroutine genfst280(msg0,ichk,msgsent,msgbits,i4tone,iwspr)
! Message duration: TxT = 164*8400/12000 = 114.8 s
use packjt77
include 'ft4s280_params.f90'
include 'fst280_params.f90'
character*37 msg0
character*37 message !Message to be generated
character*37 msgsent !Message as it will be received
@ -68,7 +68,7 @@ subroutine genfst280(msg0,ichk,msgsent,msgbits,i4tone,iwspr)
msgsent='*** bad message *** '
go to 999
entry get_ft4s280_tones_from_bits(msgbits,i4tone,iwspr)
entry get_fst280_tones_from_bits(msgbits,i4tone,iwspr)
2 continue

View File

@ -1,6 +1,6 @@
subroutine get_fst280_bitmetrics(cd,nss,hmod,bitmetrics,badsync)
include 'ft4s280_params.f90'
include 'fst280_params.f90'
complex cd(0:NN*nss-1)
complex cs(0:3,NN)
complex csymb(nss)

View File

@ -46,16 +46,21 @@ namespace
{20000000, Modes::FreqCal, IARURegions::ALL},
{136000, Modes::WSPR, IARURegions::ALL},
{136000, Modes::FST280W, IARURegions::ALL},
{136130, Modes::JT65, IARURegions::ALL},
{136130, Modes::JT9, IARURegions::ALL},
{136130, Modes::FST280, IARURegions::ALL},
{474200, Modes::JT65, IARURegions::ALL},
{474200, Modes::JT9, IARURegions::ALL},
{474200, Modes::FST280, IARURegions::ALL},
{474200, Modes::WSPR, IARURegions::ALL},
{474200, Modes::FST280W, IARURegions::ALL},
{1836600, Modes::WSPR, IARURegions::ALL},
{1838000, Modes::JT65, IARURegions::ALL}, // squeezed allocations
{1839000, Modes::JT9, IARURegions::ALL},
{1839000, Modes::FST280, IARURegions::ALL},
{1840000, Modes::FT8, IARURegions::ALL},
// Band plans (all USB dial unless stated otherwise)
@ -87,6 +92,7 @@ namespace
//
{3570000, Modes::JT65, IARURegions::ALL}, // JA compatible
{3572000, Modes::JT9, IARURegions::ALL},
{3572000, Modes::FST280, IARURegions::ALL},
{3573000, Modes::FT8, IARURegions::ALL}, // above as below JT65 is out of DM allocation
{3568600, Modes::WSPR, IARURegions::ALL}, // needs guard marker and lock out
{3575000, Modes::FT4, IARURegions::ALL}, // provisional
@ -127,6 +133,7 @@ namespace
{7074000, Modes::FT8, IARURegions::ALL},
{7076000, Modes::JT65, IARURegions::ALL},
{7078000, Modes::JT9, IARURegions::ALL},
{7078000, Modes::FST280, IARURegions::ALL},
{7047500, Modes::FT4, IARURegions::ALL}, // provisional - moved
// up 500Hz to clear
// W1AW code practice QRG
@ -161,6 +168,7 @@ namespace
{10138000, Modes::JT65, IARURegions::ALL},
{10138700, Modes::WSPR, IARURegions::ALL},
{10140000, Modes::JT9, IARURegions::ALL},
{10140000, Modes::FST280, IARURegions::ALL},
{10140000, Modes::FT4, IARURegions::ALL}, // provisional
// Band plans (all USB dial unless stated otherwise)
@ -204,6 +212,7 @@ namespace
{14074000, Modes::FT8, IARURegions::ALL},
{14076000, Modes::JT65, IARURegions::ALL},
{14078000, Modes::JT9, IARURegions::ALL},
{14078000, Modes::FST280, IARURegions::ALL},
{14080000, Modes::FT4, IARURegions::ALL}, // provisional
// Band plans (all USB dial unless stated otherwise)
@ -236,24 +245,28 @@ namespace
{18100000, Modes::FT8, IARURegions::ALL},
{18102000, Modes::JT65, IARURegions::ALL},
{18104000, Modes::JT9, IARURegions::ALL},
{18104000, Modes::FST280, IARURegions::ALL},
{18104000, Modes::FT4, IARURegions::ALL}, // provisional
{18104600, Modes::WSPR, IARURegions::ALL},
{21074000, Modes::FT8, IARURegions::ALL},
{21076000, Modes::JT65, IARURegions::ALL},
{21078000, Modes::JT9, IARURegions::ALL},
{21078000, Modes::FST280, IARURegions::ALL},
{21094600, Modes::WSPR, IARURegions::ALL},
{21140000, Modes::FT4, IARURegions::ALL},
{24915000, Modes::FT8, IARURegions::ALL},
{24917000, Modes::JT65, IARURegions::ALL},
{24919000, Modes::JT9, IARURegions::ALL},
{24919000, Modes::FST280, IARURegions::ALL},
{24919000, Modes::FT4, IARURegions::ALL}, // provisional
{24924600, Modes::WSPR, IARURegions::ALL},
{28074000, Modes::FT8, IARURegions::ALL},
{28076000, Modes::JT65, IARURegions::ALL},
{28078000, Modes::JT9, IARURegions::ALL},
{28078000, Modes::FST280, IARURegions::ALL},
{28124600, Modes::WSPR, IARURegions::ALL},
{28180000, Modes::FT4, IARURegions::ALL},
@ -267,6 +280,7 @@ namespace
{50293000, Modes::WSPR, IARURegions::R3},
{50310000, Modes::JT65, IARURegions::ALL},
{50312000, Modes::JT9, IARURegions::ALL},
{50312000, Modes::FST280, IARURegions::ALL},
{50313000, Modes::FT8, IARURegions::ALL},
{50318000, Modes::FT4, IARURegions::ALL}, // provisional
{50323000, Modes::FT8, IARURegions::ALL},

View File

@ -1316,8 +1316,6 @@ void MainWindow::fixStop()
m_hsymStop=179;
if(m_mode=="WSPR") {
m_hsymStop=396;
} else if(m_mode=="WSPR-LF") {
m_hsymStop=813;
} else if(m_mode=="Echo") {
m_hsymStop=9;
} else if (m_mode=="JT4"){
@ -1533,26 +1531,11 @@ void MainWindow::dataSink(qint64 frames)
m_cmndP1 << depth_args << "-a"
<< QDir::toNativeSeparators (m_config.writeable_data_dir ().absolutePath()) << m_path;
} else {
// if(m_mode=="WSPR-LF")
// {
// m_cmndP1 << degrade << t2 << "-a"
// << QDir::toNativeSeparators (m_config.writeable_data_dir ().absolutePath())
// << m_fnameWE + ".wav";
// }
// else
{
m_cmndP1 << depth_args << "-a"
<< QDir::toNativeSeparators (m_config.writeable_data_dir ().absolutePath())
<< t2 << m_fnameWE + ".wav";
}
m_cmndP1 << depth_args << "-a"
<< QDir::toNativeSeparators (m_config.writeable_data_dir ().absolutePath())
<< t2 << m_fnameWE + ".wav";
}
// QString t3=cmnd;
// int i1=cmnd.indexOf("/wsprd ");
// cmnd=t3.mid(0,i1+7) + t3.mid(i1+7);
// if(m_mode=="WSPR-LF") cmnd=cmnd.replace("/wsprd ","/wspr_fsk8d "+degrade+t2);
if (ui) ui->DecodeButton->setChecked (true);
// m_cmndP1=QDir::toNativeSeparators(cmnd);
p1Timer.start(1000);
m_decoderBusy = true;
statusUpdate ();
@ -1563,14 +1546,8 @@ void MainWindow::dataSink(qint64 frames)
void MainWindow::startP1()
{
// if (m_mode=="WSPR-LF")
// {
// p1.start (QDir::toNativeSeparators (QDir {QApplication::applicationDirPath ()}.absoluteFilePath ("wspr_fsk8d")), m_cmndP1);
// }
// else
{
p1.start (QDir::toNativeSeparators (QDir {QApplication::applicationDirPath ()}.absoluteFilePath ("wsprd")), m_cmndP1);
}
// if(WSPR-LF) ... was here
p1.start (QDir::toNativeSeparators (QDir {QApplication::applicationDirPath ()}.absoluteFilePath ("wsprd")), m_cmndP1);
}
QString MainWindow::save_wave_file (QString const& name, short const * data, int samples,
@ -3561,9 +3538,15 @@ void MainWindow::guiUpdate()
if(m_modeTx=="JT4") txDuration=1.0 + 207.0*2520/11025.0; // JT4
if(m_modeTx=="JT9") txDuration=1.0 + 85.0*m_nsps/12000.0; // JT9
if(m_modeTx=="JT65") txDuration=1.0 + 126*4096/11025.0; // JT65
if(m_modeTx=="QRA64") txDuration=1.0 + 84*6912/12000.0; // QRA64
if(m_modeTx=="WSPR") txDuration=2.0 + 162*8192/12000.0; // WSPR
if(m_modeTx=="WSPR-LF") txDuration=2.0 + 114*24576/12000.0; // WSPR-LF
if(m_modeTx=="QRA64") txDuration=1.0 + 84*6912/12000.0; // QRA64
if(m_modeTx=="WSPR") txDuration=2.0 + 162*8192/12000.0; // WSPR
if(m_modeTx=="FST280" or m_mode=="FST280W") { //FST280, FST280W
if(m_TRperiod==15) txDuration=1.0 + 164*800/12000.0;
if(m_TRperiod==30) txDuration=1.0 + 164*1680/12000.0;
if(m_TRperiod==60) txDuration=1.0 + 164*4000/12000.0;
if(m_TRperiod==120) txDuration=1.0 + 164*8400/12000.0;
if(m_TRperiod==300) txDuration=1.0 + 164*2150500/12000.0;
}
if(m_modeTx=="ISCAT" or m_mode=="MSK144" or m_bFast9) {
txDuration=m_TRperiod-0.25; // ISCAT, JT9-fast, MSK144
}
@ -3834,8 +3817,6 @@ void MainWindow::guiUpdate()
&m_currentMessageType, 22, 22);
if(m_modeTx=="WSPR") genwspr_(message, msgsent, const_cast<int *> (itone),
22, 22);
// if(m_modeTx=="WSPR-LF") genwspr_fsk8_(message, msgsent, const_cast<int *> (itone),
// 22, 22);
if(m_modeTx=="MSK144" or m_modeTx=="FT8" or m_modeTx=="FT4") {
char MyCall[6];
char MyGrid[6];
@ -3896,6 +3877,10 @@ void MainWindow::guiUpdate()
gen_ft4wave_(const_cast<int *>(itone),&nsym,&nsps,&fsample,&f0,foxcom_.wave,
foxcom_.wave,&icmplx,&nwave);
}
if(m_modeTx=="FST280" or m_modeTx=="FST280W") {
// call genfst280()
// call gen_fst280wave()
}
if(SpecOp::EU_VHF==m_config.special_op_id()) {
if(m_ntx==2) m_xSent=ui->tx2->text().right(13);
@ -6353,23 +6338,6 @@ void MainWindow::on_actionWSPR_triggered()
statusChanged();
}
void MainWindow::on_actionWSPR_LF_triggered()
{
on_actionWSPR_triggered();
m_mode="WSPR-LF";
switch_mode (Modes::WSPR);
m_modeTx="WSPR-LF";
m_TRperiod=240.0;
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_hsymStop=813;
m_toneSpacing=12000.0/24576.0;
setup_status_bar (false);
ui->actionWSPR_LF->setChecked(true);
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
statusChanged();
}
void MainWindow::on_actionEcho_triggered()
{
on_actionJT4_triggered();
@ -9049,7 +9017,8 @@ void MainWindow::set_mode (QString const& mode)
else if ("ISCAT" == mode) on_actionISCAT_triggered ();
else if ("MSK144" == mode) on_actionMSK144_triggered ();
else if ("WSPR" == mode) on_actionWSPR_triggered ();
else if ("WSPR-LF" == mode) on_actionWSPR_LF_triggered ();
else if ("FST280" == mode) on_actionFST280_triggered ();
else if ("FST280W" == mode) on_actionFST280W_triggered ();
else if ("Echo" == mode) on_actionEcho_triggered ();
}

View File

@ -278,7 +278,6 @@ private slots:
void networkError (QString const&);
void on_ClrAvgButton_clicked();
void on_actionWSPR_triggered();
void on_actionWSPR_LF_triggered();
void on_syncSpinBox_valueChanged(int n);
void on_TxPowerComboBox_currentIndexChanged(int);
void on_sbTxPercent_valueChanged(int n);