diff --git a/CMakeLists.txt b/CMakeLists.txt index 30767fa97..b54d67ac2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ) diff --git a/lib/superfox/sfox_hard.f90 b/lib/superfox/sfox_demod.f90 similarity index 80% rename from lib/superfox/sfox_hard.f90 rename to lib/superfox/sfox_demod.f90 index ecb067536..6186aac22 100644 --- a/lib/superfox/sfox_hard.f90 +++ b/lib/superfox/sfox_demod.f90 @@ -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 diff --git a/lib/superfox/sfoxtest.f90 b/lib/superfox/sfoxtest.f90 index e144f39f5..bed48477d 100644 --- a/lib/superfox/sfoxtest.f90 +++ b/lib/superfox/sfoxtest.f90 @@ -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