1
0
mirror of https://github.com/saitohirga/WSJT-X.git synced 2025-04-13 06:48:39 -04:00

Change subroutine name sfox_hard to sfox_demod; introduce array s3(NQ,ND) to be used for soft-decision decoding.

This commit is contained in:
Joe Taylor 2024-02-13 12:02:04 -05:00
parent 7bf4aaef2e
commit 8dd19ee80c
3 changed files with 10 additions and 7 deletions

View File

@ -589,7 +589,7 @@ set (wsjt_FSRCS
lib/77bit/hash22calc.f90
lib/superfox/sfox_gen.f90
lib/superfox/sfox_sync.f90
lib/superfox/sfox_hard.f90
lib/superfox/sfox_demod.f90
lib/superfox/sfox_clo.f90
lib/superfox/ran1.f90
)

View File

@ -1,11 +1,11 @@
subroutine sfox_hard(crcvd,f,t,chansym)
subroutine sfox_demod(crcvd,f,t,s3,chansym)
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:NQ-1) !Power spectrum
integer chansym(NN) !Recovered hard-decision symbols
real s3(0:NQ-1,0:ND-1) !Symbol spectra
integer chansym(NN) !Hard-decision symbol values
integer ipk(1)
i0=nint(12000.0*t)
@ -20,6 +20,7 @@ subroutine sfox_hard(crcvd,f,t,chansym)
call four2a(c,NSPS,1,-1,1) !Compute symbol spectrum
do j=0,NQ-1
s(j)=real(c(j0+j))**2 + aimag(c(j0+j))**2
s3(j,n-1)=s(j)
enddo
! Could we measure fspread, perhaps in the sync routine, and use that to
@ -32,4 +33,4 @@ subroutine sfox_hard(crcvd,f,t,chansym)
enddo
return
end subroutine sfox_hard
end subroutine sfox_demod

View File

@ -13,7 +13,8 @@ program sfoxtest
complex cnoise(NMAX) !Complex noise
complex crcvd(NMAX) !Signal as received
real a(3)
real, allocatable :: s3(:,:) !Symbol spectra: will be s3(NQ,ND)
integer, allocatable :: msg0(:) !Information symbols
integer, allocatable :: parsym(:) !Parity symbols
integer, allocatable :: chansym0(:) !Encoded data, 7-bit integers
@ -71,6 +72,7 @@ program sfoxtest
' MaxErr:',i3,' tsync:',f4.1,' TxT:',f5.1/)
! Allocate storage for arrays that depend on code parameters.
allocate(s3(0:NQ-1,0:ND-1))
allocate(msg0(1:KK))
allocate(parsym(1:NN-KK))
allocate(chansym0(1:NN))
@ -162,7 +164,7 @@ program sfoxtest
a(1)=1500.0-f
call twkfreq(crcvd,crcvd,NMAX,12000.0,a)
f=1500.0
call sfox_hard(crcvd,f,t,chansym) !Get hard symbol values
call sfox_demod(crcvd,f,t,s3,chansym) !Get s3 and hard symbol values
nera=0
chansym=mod(chansym,nq) !Enforce 0 to nq-1