mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-06-26 06:55:19 -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:
parent
7bf4aaef2e
commit
8dd19ee80c
@ -589,7 +589,7 @@ set (wsjt_FSRCS
|
|||||||
lib/77bit/hash22calc.f90
|
lib/77bit/hash22calc.f90
|
||||||
lib/superfox/sfox_gen.f90
|
lib/superfox/sfox_gen.f90
|
||||||
lib/superfox/sfox_sync.f90
|
lib/superfox/sfox_sync.f90
|
||||||
lib/superfox/sfox_hard.f90
|
lib/superfox/sfox_demod.f90
|
||||||
lib/superfox/sfox_clo.f90
|
lib/superfox/sfox_clo.f90
|
||||||
lib/superfox/ran1.f90
|
lib/superfox/ran1.f90
|
||||||
)
|
)
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
subroutine sfox_hard(crcvd,f,t,chansym)
|
subroutine sfox_demod(crcvd,f,t,s3,chansym)
|
||||||
|
|
||||||
use sfox_mod
|
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:NQ-1) !Power spectrum
|
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)
|
integer ipk(1)
|
||||||
|
|
||||||
i0=nint(12000.0*t)
|
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
|
call four2a(c,NSPS,1,-1,1) !Compute symbol spectrum
|
||||||
do j=0,NQ-1
|
do j=0,NQ-1
|
||||||
s(j)=real(c(j0+j))**2 + aimag(c(j0+j))**2
|
s(j)=real(c(j0+j))**2 + aimag(c(j0+j))**2
|
||||||
|
s3(j,n-1)=s(j)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
! Could we measure fspread, perhaps in the sync routine, and use that to
|
! 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
|
enddo
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine sfox_hard
|
end subroutine sfox_demod
|
@ -14,6 +14,7 @@ program sfoxtest
|
|||||||
complex crcvd(NMAX) !Signal as received
|
complex crcvd(NMAX) !Signal as received
|
||||||
real a(3)
|
real a(3)
|
||||||
|
|
||||||
|
real, allocatable :: s3(:,:) !Symbol spectra: will be s3(NQ,ND)
|
||||||
integer, allocatable :: msg0(:) !Information symbols
|
integer, allocatable :: msg0(:) !Information symbols
|
||||||
integer, allocatable :: parsym(:) !Parity symbols
|
integer, allocatable :: parsym(:) !Parity symbols
|
||||||
integer, allocatable :: chansym0(:) !Encoded data, 7-bit integers
|
integer, allocatable :: chansym0(:) !Encoded data, 7-bit integers
|
||||||
@ -71,6 +72,7 @@ program sfoxtest
|
|||||||
' MaxErr:',i3,' tsync:',f4.1,' TxT:',f5.1/)
|
' MaxErr:',i3,' tsync:',f4.1,' TxT:',f5.1/)
|
||||||
|
|
||||||
! Allocate storage for arrays that depend on code parameters.
|
! Allocate storage for arrays that depend on code parameters.
|
||||||
|
allocate(s3(0:NQ-1,0:ND-1))
|
||||||
allocate(msg0(1:KK))
|
allocate(msg0(1:KK))
|
||||||
allocate(parsym(1:NN-KK))
|
allocate(parsym(1:NN-KK))
|
||||||
allocate(chansym0(1:NN))
|
allocate(chansym0(1:NN))
|
||||||
@ -162,7 +164,7 @@ program sfoxtest
|
|||||||
a(1)=1500.0-f
|
a(1)=1500.0-f
|
||||||
call twkfreq(crcvd,crcvd,NMAX,12000.0,a)
|
call twkfreq(crcvd,crcvd,NMAX,12000.0,a)
|
||||||
f=1500.0
|
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
|
nera=0
|
||||||
chansym=mod(chansym,nq) !Enforce 0 to nq-1
|
chansym=mod(chansym,nq) !Enforce 0 to nq-1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user