mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-24 10:22:26 -04:00
WIP: sfoxtest now running with parameters set in sfox_mod.
This commit is contained in:
parent
464838aa78
commit
c051168a6b
@ -342,6 +342,7 @@ set (wsjt_FSRCS
|
|||||||
lib/wavhdr.f90
|
lib/wavhdr.f90
|
||||||
lib/qra/q65/q65_encoding_modules.f90
|
lib/qra/q65/q65_encoding_modules.f90
|
||||||
lib/ft8/ft8_a7.f90
|
lib/ft8/ft8_a7.f90
|
||||||
|
lib/superfox/sfox_mod.f90
|
||||||
|
|
||||||
# remaining non-module sources
|
# remaining non-module sources
|
||||||
lib/addit.f90
|
lib/addit.f90
|
||||||
|
@ -25,10 +25,6 @@ OBJS2 = rs_125_49.o ran1.o get_crc14.o rs_sf.a
|
|||||||
rs_125_49: $(OBJS2)
|
rs_125_49: $(OBJS2)
|
||||||
$(FC) -o rs_125_49 $(OBJS2) rs_sf.a
|
$(FC) -o rs_125_49 $(OBJS2) rs_sf.a
|
||||||
|
|
||||||
#OBJS3 = rst8.o encode_rs_8.o decode_rs_8.o wrap_rs_8.o
|
|
||||||
rst8: rst8.o wrap_rs_8.o
|
|
||||||
$(FC) -o rst8 rst8.o wrap_rs_8.o librs.a
|
|
||||||
|
|
||||||
rs_sf.a: init_rs_sf.o encode_rs_sf.o decode_rs_sf.o rs_sf.o
|
rs_sf.a: init_rs_sf.o encode_rs_sf.o decode_rs_sf.o rs_sf.o
|
||||||
ar -crs rs_sf.a init_rs_sf.o encode_rs_sf.o decode_rs_sf.o rs_sf.o
|
ar -crs rs_sf.a init_rs_sf.o encode_rs_sf.o decode_rs_sf.o rs_sf.o
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
subroutine gen_sfox(idat,f0,fsample,syncwidth,cdat,clo)
|
subroutine gen_sfox(idat,f0,fsample,syncwidth,cdat,clo)
|
||||||
|
|
||||||
include "sfox_params.f90"
|
use sfox_mod
|
||||||
|
! include "sfox_params.f90"
|
||||||
complex cdat(NMAX) !Generated complex waveform
|
complex cdat(NMAX) !Generated complex waveform
|
||||||
complex clo(NMAX) !Complex Local Oscillator
|
complex clo(NMAX) !Complex Local Oscillator
|
||||||
complex w,wstep
|
complex w,wstep
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
subroutine hard_symbols(crcvd,f,t,jdat)
|
subroutine hard_symbols(crcvd,f,t,jdat)
|
||||||
|
|
||||||
include "sfox_params.f90"
|
use sfox_mod
|
||||||
|
! include "sfox_params.f90"
|
||||||
complex crcvd(NMAX) !Signal as received
|
complex crcvd(NMAX) !Signal as received
|
||||||
complex c(0:NSPS-1) !Work array, one symbol long
|
complex c(0:NSPS-1) !Work array, one symbol long
|
||||||
real s(0:NSPS-1) !Power spectrum
|
real s(0:NSPS-1) !Power spectrum
|
||||||
|
@ -3,7 +3,8 @@ program sfoxtest
|
|||||||
! Generate and test sync waveforms for possible use in SuperFox signal.
|
! Generate and test sync waveforms for possible use in SuperFox signal.
|
||||||
|
|
||||||
use wavhdr
|
use wavhdr
|
||||||
include "sfox_params.f90"
|
use sfox_mod
|
||||||
|
! include "sfox_params.f90"
|
||||||
type(hdr) h !Header for .wav file
|
type(hdr) h !Header for .wav file
|
||||||
integer*2 iwave(NMAX) !Generated i*2 waveform
|
integer*2 iwave(NMAX) !Generated i*2 waveform
|
||||||
real*4 xnoise(NMAX) !Random noise
|
real*4 xnoise(NMAX) !Random noise
|
||||||
@ -12,15 +13,13 @@ program sfoxtest
|
|||||||
complex clo(NMAX) !Complex Local Oscillator
|
complex clo(NMAX) !Complex Local Oscillator
|
||||||
complex cnoise(NMAX) !Complex noise
|
complex cnoise(NMAX) !Complex noise
|
||||||
complex crcvd(NMAX) !Signal as received
|
complex crcvd(NMAX) !Signal as received
|
||||||
integer msg0(KK) !Information symbols
|
|
||||||
! integer msg(KK) !Decoded information
|
integer, allocatable :: msg0(:) !Information symbols
|
||||||
integer parsym(NN-KK) !Parity symbols
|
integer, allocatable :: parsym(:) !Parity symbols
|
||||||
! integer*1 msg1(MM*KK) !Copy of msg0 in 1-bit i*1 format
|
integer, allocatable :: chansym0(:) !Encoded data, 7-bit integers
|
||||||
integer chansym0(NN) !Encoded data, 7-bit integers
|
integer, allocatable :: chansym(:) !Recovered hard-decision symbols
|
||||||
integer chansym(NN) !Recovered hard-decision symbols
|
integer, allocatable :: iera(:) !Positions of erasures
|
||||||
integer iera(NN)
|
|
||||||
character fname*17,arg*12
|
character fname*17,arg*12
|
||||||
! character c357*357,c14*14 !,chkmsg*15
|
|
||||||
|
|
||||||
nargs=iargc()
|
nargs=iargc()
|
||||||
if(nargs.ne.8) then
|
if(nargs.ne.8) then
|
||||||
@ -45,6 +44,20 @@ program sfoxtest
|
|||||||
call getarg(8,arg)
|
call getarg(8,arg)
|
||||||
read(arg,*) snrdb
|
read(arg,*) snrdb
|
||||||
|
|
||||||
|
call sfox_init
|
||||||
|
baud=12000.0/NSPS
|
||||||
|
bw=NQ*baud
|
||||||
|
|
||||||
|
write(*,1000) MM,NN,KK,NSPS,baud,bw
|
||||||
|
1000 format('M:',i2,' Base code: (',i3,',',i3,') NSPS:',i5, &
|
||||||
|
' Symbol Rate:',f7.3,' BW:',f6.0)
|
||||||
|
|
||||||
|
allocate(msg0(1:KK))
|
||||||
|
allocate(parsym(1:NN-KK))
|
||||||
|
allocate(chansym0(1:NN))
|
||||||
|
allocate(chansym(1:NN))
|
||||||
|
allocate(iera(1:NN))
|
||||||
|
|
||||||
rms=100.
|
rms=100.
|
||||||
fsample=12000.0 !Sample rate (Hz)
|
fsample=12000.0 !Sample rate (Hz)
|
||||||
baud=12000.0/nsps !Keying rate, 11.719 baud for nsps=1024
|
baud=12000.0/nsps !Keying rate, 11.719 baud for nsps=1024
|
||||||
@ -67,7 +80,7 @@ program sfoxtest
|
|||||||
! Generate cdat (SuperFox waveform) and clo (LO for sync detection)
|
! Generate cdat (SuperFox waveform) and clo (LO for sync detection)
|
||||||
call gen_sfox(chansym0,f0,fsample,syncwidth,cdat,clo)
|
call gen_sfox(chansym0,f0,fsample,syncwidth,cdat,clo)
|
||||||
|
|
||||||
do isnr=0,-30,-1
|
do isnr=0,-20,-1
|
||||||
snr=isnr
|
snr=isnr
|
||||||
if(snrdb.ne.0.0) snr=snrdb
|
if(snrdb.ne.0.0) snr=snrdb
|
||||||
sig=sqrt(2*bandwidth_ratio)*10.0**(0.05*snr)
|
sig=sqrt(2*bandwidth_ratio)*10.0**(0.05*snr)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
subroutine sync_sf(crcvd,clo,snrdb,f,t)
|
subroutine sync_sf(crcvd,clo,snrdb,f,t)
|
||||||
|
|
||||||
include "sfox_params.f90"
|
use sfox_mod
|
||||||
|
! include "sfox_params.f90"
|
||||||
parameter (MMAX=150,JMAX=300)
|
parameter (MMAX=150,JMAX=300)
|
||||||
real ccf(-MMAX:MMAX,-JMAX:JMAX) !2D CCF: DT, dFreq offsets
|
real ccf(-MMAX:MMAX,-JMAX:JMAX) !2D CCF: DT, dFreq offsets
|
||||||
complex clo(NMAX) !Complex Local Oscillator
|
complex clo(NMAX) !Complex Local Oscillator
|
||||||
|
Loading…
x
Reference in New Issue
Block a user