mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-30 05:12:26 -04:00
Use GFSK for SuperFox fox transmissions.
This commit is contained in:
parent
bb95fbf405
commit
e83290b1c9
@ -587,6 +587,7 @@ set (wsjt_FSRCS
|
|||||||
lib/fst4/fst4_baseline.f90
|
lib/fst4/fst4_baseline.f90
|
||||||
lib/77bit/hash22calc.f90
|
lib/77bit/hash22calc.f90
|
||||||
lib/superfox/sfox_wave.f90
|
lib/superfox/sfox_wave.f90
|
||||||
|
lib/superfox/sfox_wave_gfsk.f90
|
||||||
)
|
)
|
||||||
|
|
||||||
# temporary workaround for a gfortran v7.3 ICE on Fedora 27 64-bit
|
# temporary workaround for a gfortran v7.3 ICE on Fedora 27 64-bit
|
||||||
|
@ -70,7 +70,8 @@ void Modulator::start (QString mode, unsigned symbolsLength, double framesPerSym
|
|||||||
m_bFastMode=fastMode;
|
m_bFastMode=fastMode;
|
||||||
m_TRperiod=TRperiod;
|
m_TRperiod=TRperiod;
|
||||||
unsigned delay_ms=1000;
|
unsigned delay_ms=1000;
|
||||||
if(mode=="FT8" or (mode=="FST4" and m_nsps==720)) delay_ms=500; //FT8, FST4-15
|
if((mode=="FT8" and m_nsps==1920) or (mode=="FST4" and m_nsps==720)) delay_ms=500; //FT8, FST4-15
|
||||||
|
if((mode=="FT8" and m_nsps==1024)) delay_ms=400; //SuperFox Qary Polar Code transmission
|
||||||
if(mode=="Q65" and m_nsps<=3600) delay_ms=500; //Q65-15 and Q65-30
|
if(mode=="Q65" and m_nsps<=3600) delay_ms=500; //Q65-15 and Q65-30
|
||||||
if(mode=="FT4") delay_ms=300; //FT4
|
if(mode=="FT4") delay_ms=300; //FT4
|
||||||
|
|
||||||
|
78
lib/superfox/sfox_wave_gfsk.f90
Normal file
78
lib/superfox/sfox_wave_gfsk.f90
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
subroutine sfox_wave_gfsk(fname)
|
||||||
|
|
||||||
|
! Called by WSJT-X when it's time for SuperFox to transmit. Reads array
|
||||||
|
! itone(1:151) from disk file 'sfox_2.dat' in the writable data directory.
|
||||||
|
! Generates a GFSK waveform with short ramp-up and ramp-down symbols of
|
||||||
|
! duration NSPS/BT at the beginning and end of the waveform.
|
||||||
|
|
||||||
|
parameter (NWAVE=(160+2)*134400*4) !Max WSJT-X waveform (FST4-1800 at 48kHz)
|
||||||
|
parameter (NSYM=151,NSPS=1024*4)
|
||||||
|
parameter (NPTS=(NSYM+2)*NSPS)
|
||||||
|
parameter (BT=8)
|
||||||
|
character*(*) fname
|
||||||
|
integer itone(151)
|
||||||
|
real*8 dt,twopi,f0,baud,phi,dphi_peak
|
||||||
|
real*8 dphi(0:NPTS-1)
|
||||||
|
real*8 pulse(3*NSPS)
|
||||||
|
logical first/.true./
|
||||||
|
|
||||||
|
common/foxcom/wave(NWAVE)
|
||||||
|
save first,twopi,dt,hmod,dphi_peak,pulse
|
||||||
|
|
||||||
|
if(first) then
|
||||||
|
fsample=48000.0
|
||||||
|
twopi=8.d0*atan(1.d0)
|
||||||
|
dt=1.d0/fsample
|
||||||
|
hmod=1.0
|
||||||
|
dphi_peak=twopi*hmod/real(NSPS)
|
||||||
|
do i=1,3*NSPS
|
||||||
|
tt=(i-1.5*nsps)/real(nsps)
|
||||||
|
pulse(i)=gfsk_pulse(BT,tt)
|
||||||
|
enddo
|
||||||
|
first=.false.
|
||||||
|
endif
|
||||||
|
|
||||||
|
open(25,file=trim(fname),status='unknown',err=999)
|
||||||
|
read(25,'(20i4)',err=999,end=999) itone
|
||||||
|
close(25)
|
||||||
|
if(itone(1).lt.0 .or. itone(1).gt.128) go to 999
|
||||||
|
|
||||||
|
! Generate the SuperFox waveform.
|
||||||
|
|
||||||
|
dphi=0.d0
|
||||||
|
do j=1,NSYM
|
||||||
|
ib=(j-1)*NSPS
|
||||||
|
ie=ib+3*NSPS-1
|
||||||
|
dphi(ib:ie)=dphi(ib:ie)+dphi_peak*pulse(1:3*NSPS)*itone(j)
|
||||||
|
enddo
|
||||||
|
dphi(0:2*NSPS-1)=dphi(0:2*NSPS-1)+dphi_peak*itone(1)*pulse(NSPS+1:3*NSPS)
|
||||||
|
dphi(NSYM*NSPS:(NSYM+2)*NSPS-1)=dphi(NSYM*NSPS:(NSYM+2)*NSPS-1)+dphi_peak*itone(NSYM)*pulse(1:2*NSPS)
|
||||||
|
|
||||||
|
wave=0.
|
||||||
|
phi=0.d0
|
||||||
|
f0=750.0d0
|
||||||
|
dphi=dphi+twopi*f0*dt
|
||||||
|
k=0
|
||||||
|
do j=1,NSPS*(NSYM+2)-1
|
||||||
|
k=k+1
|
||||||
|
wave(k)=sin(phi)
|
||||||
|
phi=phi+dphi(j)
|
||||||
|
enddo
|
||||||
|
|
||||||
|
! Add raised cosine ramps at the beginning and end of the waveform.
|
||||||
|
! Since the modulator expects an integral number of symbols, dummy
|
||||||
|
! symbols are added to the beginning and end of the waveform to
|
||||||
|
! hold the ramps. All but nramp of the samples in each dummy
|
||||||
|
! symbol will be zero.
|
||||||
|
|
||||||
|
nramp=NSPS/BT
|
||||||
|
wave(1:NSPS-nramp)=0.0
|
||||||
|
wave(NSPS-nramp+1:NSPS)=wave(NSPS-nramp+1:NSPS) * &
|
||||||
|
(1.0-cos(twopi*(/(i,i=0,nramp-1)/)/(2.0*nramp)))/2.0
|
||||||
|
k1=(NSYM+1)*NSPS+1
|
||||||
|
wave(k1:k1+nramp-1)=wave(k1:k1+nramp-1) * &
|
||||||
|
(1.0+cos(twopi*(/(i,i=0,nramp-1)/)/(2.0*nramp)))/2.0
|
||||||
|
wave(k1+nramp:NPTS)=0.0
|
||||||
|
|
||||||
|
999 return
|
||||||
|
end subroutine sfox_wave_gfsk
|
@ -178,7 +178,7 @@ extern "C" {
|
|||||||
|
|
||||||
void foxgen_(bool* bSuperFox, char const * fname, FCL len);
|
void foxgen_(bool* bSuperFox, char const * fname, FCL len);
|
||||||
|
|
||||||
void sfox_wave_(char const * fname, FCL len);
|
void sfox_wave_gfsk_(char const * fname, FCL len);
|
||||||
|
|
||||||
void plotsave_(float swide[], int* m_w , int* m_h1, int* irow);
|
void plotsave_(float swide[], int* m_w , int* m_h1, int* irow);
|
||||||
|
|
||||||
@ -11020,5 +11020,5 @@ void MainWindow::sfox_tx()
|
|||||||
p2.start(QDir::toNativeSeparators(m_appDir)+QDir::separator()+"sftx", args);
|
p2.start(QDir::toNativeSeparators(m_appDir)+QDir::separator()+"sftx", args);
|
||||||
p2.waitForFinished();
|
p2.waitForFinished();
|
||||||
auto fname2 {QDir::toNativeSeparators(m_config.writeable_data_dir().absoluteFilePath("sfox_2.dat")).toLocal8Bit()};
|
auto fname2 {QDir::toNativeSeparators(m_config.writeable_data_dir().absoluteFilePath("sfox_2.dat")).toLocal8Bit()};
|
||||||
sfox_wave_(fname2.constData(), (FCL)fname2.size());
|
sfox_wave_gfsk_(fname2.constData(), (FCL)fname2.size());
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
#define NUM_MSK144_SYMBOLS 144 //s8 + d48 + s8 + d80
|
#define NUM_MSK144_SYMBOLS 144 //s8 + d48 + s8 + d80
|
||||||
#define NUM_Q65_SYMBOLS 85 //63 data + 22 sync
|
#define NUM_Q65_SYMBOLS 85 //63 data + 22 sync
|
||||||
#define NUM_FT8_SYMBOLS 79
|
#define NUM_FT8_SYMBOLS 79
|
||||||
#define NUM_SUPERFOX_SYMBOLS 151
|
#define NUM_SUPERFOX_SYMBOLS 153 //24 sync + 127 data + 2 ramp up/down
|
||||||
#define NUM_FT4_SYMBOLS 105
|
#define NUM_FT4_SYMBOLS 105
|
||||||
#define NUM_FST4_SYMBOLS 160 //240/2 data + 5*8 sync
|
#define NUM_FST4_SYMBOLS 160 //240/2 data + 5*8 sync
|
||||||
#define NUM_CW_SYMBOLS 250
|
#define NUM_CW_SYMBOLS 250
|
||||||
|
Loading…
x
Reference in New Issue
Block a user