mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-09-20 12:16:36 -04:00
OK, we can now transmit in FST280 mode.
This commit is contained in:
parent
b2ae563a7d
commit
87b79d0615
@ -85,7 +85,7 @@ extern struct {
|
|||||||
} echocom_;
|
} echocom_;
|
||||||
|
|
||||||
extern struct {
|
extern struct {
|
||||||
float wave[606720];
|
float wave[14278656];
|
||||||
int nslots;
|
int nslots;
|
||||||
int nfreq;
|
int nfreq;
|
||||||
int i3bit[5];
|
int i3bit[5];
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
subroutine gen_fst280wave(itone,nsym,nsps,nwave,fsample,hmod,f0,icmplx,cwave,wave)
|
subroutine gen_fst280wave(itone,nsym,nsps,nwave,fsample,hmod,f0, &
|
||||||
|
icmplx,cwave,wave)
|
||||||
|
|
||||||
real wave(nwave)
|
real wave(nwave)
|
||||||
complex cwave(nwave)
|
complex cwave(nwave)
|
||||||
@ -11,7 +12,7 @@ subroutine gen_fst280wave(itone,nsym,nsps,nwave,fsample,hmod,f0,icmplx,cwave,wav
|
|||||||
save first,twopi,dt,tsym
|
save first,twopi,dt,tsym
|
||||||
|
|
||||||
if(first) then
|
if(first) then
|
||||||
allocate( pulse(3*nsps*fsample) )
|
allocate(pulse(3*nsps*int(fsample)))
|
||||||
twopi=8.0*atan(1.0)
|
twopi=8.0*atan(1.0)
|
||||||
dt=1.0/fsample
|
dt=1.0/fsample
|
||||||
tsym=nsps/fsample
|
tsym=nsps/fsample
|
||||||
|
@ -105,12 +105,18 @@ extern "C" {
|
|||||||
void genft4_(char* msg, int* ichk, char* msgsent, char ft4msgbits[], int itone[],
|
void genft4_(char* msg, int* ichk, char* msgsent, char ft4msgbits[], int itone[],
|
||||||
fortran_charlen_t, fortran_charlen_t);
|
fortran_charlen_t, fortran_charlen_t);
|
||||||
|
|
||||||
|
void genfst280_(char* msg, int* ichk, char* msgsent, char fst280msgbits[],
|
||||||
|
int itone[], int* iwspr, fortran_charlen_t, fortran_charlen_t);
|
||||||
|
|
||||||
void gen_ft8wave_(int itone[], int* nsym, int* nsps, float* bt, float* fsample, float* f0,
|
void gen_ft8wave_(int itone[], int* nsym, int* nsps, float* bt, float* fsample, float* f0,
|
||||||
float xjunk[], float wave[], int* icmplx, int* nwave);
|
float xjunk[], float wave[], int* icmplx, int* nwave);
|
||||||
|
|
||||||
void gen_ft4wave_(int itone[], int* nsym, int* nsps, float* fsample, float* f0,
|
void gen_ft4wave_(int itone[], int* nsym, int* nsps, float* fsample, float* f0,
|
||||||
float xjunk[], float wave[], int* icmplx, int* nwave);
|
float xjunk[], float wave[], int* icmplx, int* nwave);
|
||||||
|
|
||||||
|
void gen_fst280wave_(int itone[], int* nsym, int* nsps, int* nwave, float* fsample,
|
||||||
|
int* hmod, float* f0, int* icmplx, float xjunk[], float wave[]);
|
||||||
|
|
||||||
void gen4_(char* msg, int* ichk, char* msgsent, int itone[],
|
void gen4_(char* msg, int* ichk, char* msgsent, int itone[],
|
||||||
int* itext, fortran_charlen_t, fortran_charlen_t);
|
int* itext, fortran_charlen_t, fortran_charlen_t);
|
||||||
|
|
||||||
@ -3801,7 +3807,8 @@ void MainWindow::guiUpdate()
|
|||||||
&m_currentMessageType, 22, 22);
|
&m_currentMessageType, 22, 22);
|
||||||
if(m_modeTx=="WSPR") genwspr_(message, msgsent, const_cast<int *> (itone),
|
if(m_modeTx=="WSPR") genwspr_(message, msgsent, const_cast<int *> (itone),
|
||||||
22, 22);
|
22, 22);
|
||||||
if(m_modeTx=="MSK144" or m_modeTx=="FT8" or m_modeTx=="FT4") {
|
if(m_modeTx=="MSK144" or m_modeTx=="FT8" or m_modeTx=="FT4"
|
||||||
|
or m_modeTx=="FST280" or m_modeTx=="FST280W") {
|
||||||
char MyCall[6];
|
char MyCall[6];
|
||||||
char MyGrid[6];
|
char MyGrid[6];
|
||||||
::memcpy(MyCall, (m_config.my_callsign()+" ").toLatin1(), sizeof MyCall);
|
::memcpy(MyCall, (m_config.my_callsign()+" ").toLatin1(), sizeof MyCall);
|
||||||
@ -3862,8 +3869,26 @@ void MainWindow::guiUpdate()
|
|||||||
foxcom_.wave,&icmplx,&nwave);
|
foxcom_.wave,&icmplx,&nwave);
|
||||||
}
|
}
|
||||||
if(m_modeTx=="FST280" or m_modeTx=="FST280W") {
|
if(m_modeTx=="FST280" or m_modeTx=="FST280W") {
|
||||||
// call genfst280()
|
int ichk=0;
|
||||||
// call gen_fst280wave()
|
int iwspr=0;
|
||||||
|
char fst280msgbits[101];
|
||||||
|
genfst280_(message,&ichk,msgsent,const_cast<char *> (fst280msgbits),
|
||||||
|
const_cast<int *>(itone), &iwspr, 37, 37);
|
||||||
|
int hmod=int(pow(2.0,double(m_nSubMode)));
|
||||||
|
int nsps=800;
|
||||||
|
if(m_TRperiod==30) nsps=1680;
|
||||||
|
if(m_TRperiod==60) nsps=4000;
|
||||||
|
if(m_TRperiod==120) nsps=8400;
|
||||||
|
if(m_TRperiod==300) nsps=21504;
|
||||||
|
nsps=4*nsps; //48000 Hz sampling
|
||||||
|
int nsym=164;
|
||||||
|
float fsample=48000.0;
|
||||||
|
float dfreq=hmod*fsample/nsps;
|
||||||
|
float f0=ui->TxFreqSpinBox->value() - m_XIT + 1.5*dfreq;
|
||||||
|
int nwave=(nsym+2)*nsps;
|
||||||
|
int icmplx=0;
|
||||||
|
gen_fst280wave_(const_cast<int *>(itone),&nsym,&nsps,&nwave,
|
||||||
|
&fsample,&hmod,&f0,&icmplx,foxcom_.wave,foxcom_.wave);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SpecOp::EU_VHF==m_config.special_op_id()) {
|
if(SpecOp::EU_VHF==m_config.special_op_id()) {
|
||||||
@ -7140,6 +7165,22 @@ void MainWindow::transmit (double snr)
|
|||||||
true, false, snr, m_TRperiod);
|
true, false, snr, m_TRperiod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_modeTx == "FST280" or m_modeTx == "FST280W") {
|
||||||
|
m_dateTimeSentTx3=QDateTime::currentDateTimeUtc();
|
||||||
|
toneSpacing=-2.0; //Transmit a pre-computed, filtered waveform.
|
||||||
|
int nsps=800;
|
||||||
|
if(m_TRperiod==30) nsps=1680;
|
||||||
|
if(m_TRperiod==60) nsps=4000;
|
||||||
|
if(m_TRperiod==120) nsps=8400;
|
||||||
|
if(m_TRperiod==300) nsps=21504;
|
||||||
|
int hmod=int(pow(2.0,double(m_nSubMode)));
|
||||||
|
double dfreq=hmod*12000.0/nsps;
|
||||||
|
double f0=ui->TxFreqSpinBox->value() - m_XIT + 1.5*dfreq;
|
||||||
|
Q_EMIT sendMessage (NUM_FST280_SYMBOLS,double(nsps),f0,toneSpacing,
|
||||||
|
m_soundOutput,m_config.audio_output_channel(),
|
||||||
|
true, false, snr, m_TRperiod);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_modeTx == "QRA64") {
|
if (m_modeTx == "QRA64") {
|
||||||
if(m_nSubMode==0) toneSpacing=12000.0/6912.0;
|
if(m_nSubMode==0) toneSpacing=12000.0/6912.0;
|
||||||
if(m_nSubMode==1) toneSpacing=2*12000.0/6912.0;
|
if(m_nSubMode==1) toneSpacing=2*12000.0/6912.0;
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
#define NUM_QRA64_SYMBOLS 84 //63 data + 21 sync
|
#define NUM_QRA64_SYMBOLS 84 //63 data + 21 sync
|
||||||
#define NUM_FT8_SYMBOLS 79
|
#define NUM_FT8_SYMBOLS 79
|
||||||
#define NUM_FT4_SYMBOLS 105
|
#define NUM_FT4_SYMBOLS 105
|
||||||
|
#define NUM_FST280_SYMBOLS 164 //280/2 data + 6*4 sync
|
||||||
#define NUM_CW_SYMBOLS 250
|
#define NUM_CW_SYMBOLS 250
|
||||||
#define TX_SAMPLE_RATE 48000
|
#define TX_SAMPLE_RATE 48000
|
||||||
#define N_WIDGETS 33
|
#define N_WIDGETS 33
|
||||||
|
@ -54,6 +54,7 @@ include(logbook/logbook.pri)
|
|||||||
include(widgets/widgets.pri)
|
include(widgets/widgets.pri)
|
||||||
include(Decoder/decodedtext.pri)
|
include(Decoder/decodedtext.pri)
|
||||||
include(Detector/Detector.pri)
|
include(Detector/Detector.pri)
|
||||||
|
include(Modulator/Modulator.pri)
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
Radio.cpp NetworkServerLookup.cpp revision_utils.cpp \
|
Radio.cpp NetworkServerLookup.cpp revision_utils.cpp \
|
||||||
|
Loading…
Reference in New Issue
Block a user