Making progress on what will become QRA65 mode.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6794 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-06-22 20:26:41 +00:00
parent 132596242f
commit 9c19ff3eea
7 changed files with 77 additions and 31 deletions

View File

@ -481,6 +481,16 @@ set (ldpc_CSRCS
lib/ldpc/distrib.c
)
set (qra_CSRCS
lib/qra/qra65/qra65.c
lib/qra/qra65/qra65_subs.c
lib/qra/qracodes/npfwht.c
lib/qra/qracodes/pdmath.c
lib/qra/qracodes/qra12_63_64_irr_b.c
lib/qra/qracodes/qra13_64_64_irr_e.c
lib/qra/qracodes/qracodes.c
)
set (wsjt_CSRCS
${ka9q_CSRCS}
lib/ftrsd/ftrsd2.c
@ -497,6 +507,7 @@ set (wsjt_CSRCS
lib/wisdom.c
lib/wrapkarn.c
${ldpc_CSRCS}
${qra_CSRCS}
)
set (wsjt_qt_UISRCS
@ -1004,12 +1015,18 @@ target_link_libraries (jt4sim wsjt_fort wsjt_cxx)
add_executable (jt65sim lib/jt65sim.f90 wsjtx.rc)
target_link_libraries (jt65sim wsjt_fort wsjt_cxx)
add_executable (qra65sim lib/qra/qra65/qra65sim.f90 wsjtx.rc)
target_link_libraries (qra65sim wsjt_fort wsjt_cxx)
add_executable (jt9sim lib/jt9sim.f90 wsjtx.rc)
target_link_libraries (jt9sim wsjt_fort wsjt_cxx)
add_executable (jt65code lib/jt65code.f90 wsjtx.rc)
target_link_libraries (jt65code wsjt_fort wsjt_cxx)
add_executable (qra65code lib/qra65code.f90 wsjtx.rc)
target_link_libraries (qra65code wsjt_fort wsjt_cxx)
add_executable (jt9code lib/jt9code.f90 wsjtx.rc)
target_link_libraries (jt9code wsjt_fort wsjt_cxx)
@ -1174,7 +1191,7 @@ install (TARGETS udp_daemon message_aggregator
BUNDLE DESTINATION ${WSJT_BIN_DESTINATION} COMPONENT runtime
)
install (TARGETS jt9 jt65code jt9code jt4code wsprd
install (TARGETS jt9 jt65code qra65code jt9code jt4code wsprd
RUNTIME DESTINATION ${WSJT_BIN_DESTINATION} COMPONENT runtime
BUNDLE DESTINATION ${WSJT_BIN_DESTINATION} COMPONENT runtime
)

View File

@ -48,7 +48,7 @@ public:
ISCAT,
JTMSK,
MSK144,
QRA,
QRA65,
MODES_END_SENTINAL_AND_COUNT // this must be last
};
Q_ENUM (Mode)

View File

@ -20,7 +20,7 @@ CAboutDlg::CAboutDlg(QWidget *parent) :
"weak-signal Amateur Radio communication. <br /><br />"
"&copy; 2001-2016 by Joe Taylor, K1JT, with grateful <br />"
"acknowledgment for contributions from AC6SL, AE4JY, <br />"
"DJ0OT, G4KLA, G4WJS, IW3RAB, K3WYC, K9AN, KA6MAL, <br />"
"DJ0OT, G4KLA, G4WJS, IV3NWV, IW3RAB, K3WYC, K9AN, KA6MAL, <br />"
"KA9Q, KB1ZMX, KD6EKQ, KI7MT, KK1D, ND0B, PY2SDR, <br />"
"VK3ACF, VK4BDJ, W4TI, W4TV, and W9MDB.<br /><br />"
"WSJT-X is licensed under the terms of Version 3 <br />"

View File

@ -1,3 +1,4 @@
FC = gfortran
CC = gcc
CFLAGS = -O2 -Wall -I. -D_WIN32
@ -13,14 +14,17 @@ CFLAGS = -O2 -Wall -I. -D_WIN32
%.o: %.F90
${FC} ${FFLAGS} -c $<
all: qra65sim.exe
all: qra65.exe
OBJS1 = main.o qra65.o
qra65.exe: $(OBJS1)
${CC} -o qra65.exe $(OBJS1) ../qracodes/libqra65.a -lm
qra65sim.exe: $(OBJS1)
${CC} -o qra65sim.exe $(OBJS1) ../qracodes/libqra65.a -lm
OBJS2 = qra65sim.o options.o wavhdr.o
qra65sim.exe: $(OBJS2)
${FC} -o qra65sim.exe $(OBJS2) ../qracodes/libqra65.a -lm
.PHONY : clean
clean:
$(RM) *.o qra65sim.exe
$(RM) *.o qra65.exe qra65sim.exe

View File

@ -463,7 +463,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->actionISCAT->setActionGroup(modeGroup);
ui->actionJTMSK->setActionGroup(modeGroup);
ui->actionMSK144->setActionGroup(modeGroup);
ui->actionQRA->setActionGroup(modeGroup);
ui->actionQRA65->setActionGroup(modeGroup);
QActionGroup* saveGroup = new QActionGroup(this);
ui->actionNone->setActionGroup(saveGroup);
@ -737,7 +737,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
bool b=m_config.enable_VHF_features() and (m_mode=="JT4" or m_mode=="JT65" or
m_mode=="ISCAT" or m_mode=="JT9" or m_mode=="JTMSK" or m_mode=="MSK144" or
m_mode=="QRA");
m_mode=="QRA65");
VHF_controls_visible(b);
ui->txFirstCheckBox->setChecked(m_txFirst);
@ -765,7 +765,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
if(m_mode=="ISCAT") on_actionISCAT_triggered();
if(m_mode=="JTMSK") on_actionJTMSK_triggered();
if(m_mode=="MSK144") on_actionMSK144_triggered();
if(m_mode=="QRA") on_actionQRA_triggered();
if(m_mode=="QRA65") on_actionQRA65_triggered();
if(m_mode=="Echo") monitor(false); //Don't auto-start Monitor in Echo mode.
ui->sbTR->setValue(m_TRindex);
@ -820,7 +820,15 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
}
statusChanged();
//###
{
QString t=m_config.my_callsign();
if(t!="IV3NWV" and t!="K1JT" and t!="K9AN" and t!="G4WJS" and t!="IW0HDV") {
ui->actionQRA65->setChecked(false);
ui->actionQRA65->setEnabled(false);
}
}
//###
// this must be the last statement of constructor
if (!m_valid) throw std::runtime_error {"Fatal initialization exception"};
}
@ -1306,7 +1314,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog
displayDialFrequency ();
bool b=m_config.enable_VHF_features() and (m_mode=="JT4" or m_mode=="JT65" or
m_mode=="ISCAT" or m_mode=="JT9" or m_mode=="JTMSK" or
m_mode=="MSK144" or m_mode=="QRA");
m_mode=="MSK144" or m_mode=="QRA65");
VHF_features_enabled(b);
VHF_controls_visible(b);
}
@ -1981,7 +1989,7 @@ void MainWindow::decode() //decode()
dec_data.params.ntxmode=9;
if(m_modeTx=="JT65") dec_data.params.ntxmode=65;
dec_data.params.nmode=9;
if(m_mode=="JT65" or m_mode=="QRA") dec_data.params.nmode=65;
if(m_mode=="JT65" or m_mode=="QRA65") dec_data.params.nmode=65;
if(m_mode=="JT9+JT65") dec_data.params.nmode=9+65; // = 74
if(m_mode=="JT4") {
dec_data.params.nmode=4;
@ -2172,7 +2180,7 @@ void MainWindow::readFromStdout() //readFromStdout
QByteArray t=proc_jt9.readLine();
bool bAvgMsg=false;
int navg=0;
if(m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA") {
if(m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA65") {
int n=t.indexOf("f");
if(n<0) n=t.indexOf("d");
if(n>0) {
@ -2284,7 +2292,7 @@ void MainWindow::readFromStdout() //readFromStdout
}
}
if((m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA") and m_msgAvgWidget!=NULL) {
if((m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA65") and m_msgAvgWidget!=NULL) {
if(m_msgAvgWidget->isVisible()) {
QFile f(m_config.temp_dir ().absoluteFilePath ("avemsg.txt"));
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
@ -2383,7 +2391,7 @@ void MainWindow::guiUpdate()
txDuration=0.0;
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" or m_mode=="QRA") txDuration=1.0 + 126*4096/11025.0; // JT65 or QRA
if(m_modeTx=="JT65" or m_mode=="QRA65") txDuration=1.0 + 126*4096/11025.0; // JT65 or QRA65
if(m_mode=="WSPR-2") txDuration=2.0 + 162*8192/12000.0; // WSPR
if(m_mode=="ISCAT" or m_mode=="JTMSK" or m_mode=="MSK144" or m_bFast9) {
txDuration=m_TRperiod-0.25; // ISCAT, JT9-fast, JTMSK, MSK144
@ -2563,7 +2571,7 @@ void MainWindow::guiUpdate()
&m_currentMessageType, len1, len1);
//###
// To be changed!
if(m_modeTx=="QRA") gen65_(message, &ichk, msgsent, const_cast<int *> (itone),
if(m_modeTx=="QRA65") gen65_(message, &ichk, msgsent, const_cast<int *> (itone),
&m_currentMessageType, len1, len1);
//###
if(m_mode.startsWith ("WSPR")) genwspr_(message, msgsent, const_cast<int *> (itone),
@ -3075,7 +3083,7 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
if (ui->TxFreqSpinBox->isEnabled ()) {
if(!m_bFastMode) ui->TxFreqSpinBox->setValue(frequency);
} else if(m_mode != "JT4" && m_mode != "JT65" && !m_mode.startsWith ("JT9") &&
m_mode != "QRA") {
m_mode != "QRA65") {
return;
}
}
@ -3785,17 +3793,18 @@ void MainWindow::on_actionMSK144_triggered()
ui->actionMSK144->setChecked(true);
}
void MainWindow::on_actionQRA_triggered()
void MainWindow::on_actionQRA65_triggered()
{
on_actionJT65_triggered();
m_mode="QRA";
m_modeTx="QRA";
ui->actionQRA->setChecked(true);
switch_mode (Modes::QRA);
m_mode="QRA65";
m_modeTx="QRA65";
ui->actionQRA65->setChecked(true);
switch_mode (Modes::QRA65);
statusChanged();
mode_label->setStyleSheet("QLabel{background-color: #99ff33}");
QString t1=(QString)QChar(short(m_nSubMode+65));
mode_label->setText(m_mode + " " + t1);
// mode_label->setText(m_mode + " " + t1);
mode_label->setText("QRA01 " + t1);
}
@ -4689,11 +4698,11 @@ void MainWindow::transmit (double snr)
true, false, snr, m_TRperiod);
}
if (m_modeTx == "QRA") {
if (m_modeTx == "QRA65") {
if(m_nSubMode==0) toneSpacing=11025.0/4096.0;
if(m_nSubMode==1) toneSpacing=2*11025.0/4096.0;
if(m_nSubMode==2) toneSpacing=4*11025.0/4096.0;
Q_EMIT sendMessage (NUM_QRA_SYMBOLS,
Q_EMIT sendMessage (NUM_QRA65_SYMBOLS,
4096.0*12000.0/11025.0, ui->TxFreqSpinBox->value () - m_XIT,
toneSpacing, m_soundOutput, m_config.audio_output_channel (),
true, false, snr, m_TRperiod);

View File

@ -42,7 +42,7 @@
#define NUM_ISCAT_SYMBOLS 1291 //30*11025/256
#define NUM_JTMSK_SYMBOLS 234 //(72+15+12)*2 + 3*11 sync + 3 f0-parity
#define NUM_MSK144_SYMBOLS 144 //s8 + d48 + s8 + d80
#define NUM_QRA_SYMBOLS 126 //63 data + 63 sync
#define NUM_QRA65_SYMBOLS 126 //63 data + 63 sync
#define NUM_CW_SYMBOLS 250
#define TX_SAMPLE_RATE 48000
@ -248,7 +248,7 @@ private slots:
void on_sbCQRxFreq_valueChanged(int n);
void on_cbCQRx_toggled(bool b);
void on_actionMSK144_triggered();
void on_actionQRA_triggered();
void on_actionQRA65_triggered();
private:
Q_SIGNAL void initializeAudioOutputStream (QAudioDeviceInfo,

View File

@ -2,6 +2,14 @@
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>896</width>
<height>565</height>
</rect>
</property>
<property name="windowTitle">
<string>WSJT-X by K1JT</string>
</property>
@ -2276,6 +2284,14 @@ QPushButton[state=&quot;ok&quot;] {
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>896</width>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
@ -2353,7 +2369,7 @@ QPushButton[state=&quot;ok&quot;] {
<addaction name="actionISCAT"/>
<addaction name="actionJTMSK"/>
<addaction name="actionMSK144"/>
<addaction name="actionQRA"/>
<addaction name="actionQRA65"/>
</widget>
<widget class="QMenu" name="menuConfig">
<property name="title">
@ -2823,12 +2839,12 @@ QPushButton[state=&quot;ok&quot;] {
<string>MSK144</string>
</property>
</action>
<action name="actionQRA">
<action name="actionQRA65">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>QRA</string>
<string>QRA01</string>
</property>
</action>
</widget>