mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-22 03:58:50 -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/qra/q65/q65_encoding_modules.f90
|
||||
lib/ft8/ft8_a7.f90
|
||||
lib/superfox/sfox_mod.f90
|
||||
|
||||
# remaining non-module sources
|
||||
lib/addit.f90
|
||||
|
@ -25,10 +25,6 @@ OBJS2 = rs_125_49.o ran1.o get_crc14.o rs_sf.a
|
||||
rs_125_49: $(OBJS2)
|
||||
$(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
|
||||
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)
|
||||
|
||||
include "sfox_params.f90"
|
||||
use sfox_mod
|
||||
! include "sfox_params.f90"
|
||||
complex cdat(NMAX) !Generated complex waveform
|
||||
complex clo(NMAX) !Complex Local Oscillator
|
||||
complex w,wstep
|
||||
|
@ -1,6 +1,7 @@
|
||||
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 c(0:NSPS-1) !Work array, one symbol long
|
||||
real s(0:NSPS-1) !Power spectrum
|
||||
|
@ -3,7 +3,8 @@ program sfoxtest
|
||||
! Generate and test sync waveforms for possible use in SuperFox signal.
|
||||
|
||||
use wavhdr
|
||||
include "sfox_params.f90"
|
||||
use sfox_mod
|
||||
! include "sfox_params.f90"
|
||||
type(hdr) h !Header for .wav file
|
||||
integer*2 iwave(NMAX) !Generated i*2 waveform
|
||||
real*4 xnoise(NMAX) !Random noise
|
||||
@ -12,15 +13,13 @@ program sfoxtest
|
||||
complex clo(NMAX) !Complex Local Oscillator
|
||||
complex cnoise(NMAX) !Complex noise
|
||||
complex crcvd(NMAX) !Signal as received
|
||||
integer msg0(KK) !Information symbols
|
||||
! integer msg(KK) !Decoded information
|
||||
integer parsym(NN-KK) !Parity symbols
|
||||
! integer*1 msg1(MM*KK) !Copy of msg0 in 1-bit i*1 format
|
||||
integer chansym0(NN) !Encoded data, 7-bit integers
|
||||
integer chansym(NN) !Recovered hard-decision symbols
|
||||
integer iera(NN)
|
||||
|
||||
integer, allocatable :: msg0(:) !Information symbols
|
||||
integer, allocatable :: parsym(:) !Parity symbols
|
||||
integer, allocatable :: chansym0(:) !Encoded data, 7-bit integers
|
||||
integer, allocatable :: chansym(:) !Recovered hard-decision symbols
|
||||
integer, allocatable :: iera(:) !Positions of erasures
|
||||
character fname*17,arg*12
|
||||
! character c357*357,c14*14 !,chkmsg*15
|
||||
|
||||
nargs=iargc()
|
||||
if(nargs.ne.8) then
|
||||
@ -45,6 +44,20 @@ program sfoxtest
|
||||
call getarg(8,arg)
|
||||
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.
|
||||
fsample=12000.0 !Sample rate (Hz)
|
||||
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)
|
||||
call gen_sfox(chansym0,f0,fsample,syncwidth,cdat,clo)
|
||||
|
||||
do isnr=0,-30,-1
|
||||
do isnr=0,-20,-1
|
||||
snr=isnr
|
||||
if(snrdb.ne.0.0) snr=snrdb
|
||||
sig=sqrt(2*bandwidth_ratio)*10.0**(0.05*snr)
|
||||
@ -147,7 +160,7 @@ program sfoxtest
|
||||
fgoodsync=float(ngoodsync)/nfiles
|
||||
fgood=float(ngood)/nfiles
|
||||
if(isnr.eq.0) write(*,1300)
|
||||
1300 format(' SNR N fsync fgood averr worst'/ &
|
||||
1300 format(' SNR N fsync fgood averr worst'/ &
|
||||
'-----------------------------------------')
|
||||
ave_harderr=float(ntot)/nfiles
|
||||
write(*,1310) snr,nfiles,fgoodsync,fgood,ave_harderr,nworst
|
||||
|
@ -1,6 +1,7 @@
|
||||
subroutine sync_sf(crcvd,clo,snrdb,f,t)
|
||||
|
||||
include "sfox_params.f90"
|
||||
use sfox_mod
|
||||
! include "sfox_params.f90"
|
||||
parameter (MMAX=150,JMAX=300)
|
||||
real ccf(-MMAX:MMAX,-JMAX:JMAX) !2D CCF: DT, dFreq offsets
|
||||
complex clo(NMAX) !Complex Local Oscillator
|
||||
|
Loading…
Reference in New Issue
Block a user