mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-04 23:22:26 -04:00
Work in progress, starting toward implementing soft-decision ftrsd decoder.
This commit is contained in:
parent
8dd19ee80c
commit
a516184a3c
@ -591,6 +591,7 @@ set (wsjt_FSRCS
|
|||||||
lib/superfox/sfox_sync.f90
|
lib/superfox/sfox_sync.f90
|
||||||
lib/superfox/sfox_demod.f90
|
lib/superfox/sfox_demod.f90
|
||||||
lib/superfox/sfox_clo.f90
|
lib/superfox/sfox_clo.f90
|
||||||
|
lib/superfox/sym_prob.f90
|
||||||
lib/superfox/ran1.f90
|
lib/superfox/ran1.f90
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -11,10 +11,12 @@ subroutine sfox_demod(crcvd,f,t,s3,chansym)
|
|||||||
i0=nint(12000.0*t)
|
i0=nint(12000.0*t)
|
||||||
df=12000.0/NSPS
|
df=12000.0/NSPS
|
||||||
j0=nint(f/df)-NQ/2
|
j0=nint(f/df)-NQ/2
|
||||||
|
chansym=0
|
||||||
do n=1,ND !Loop over all symbols
|
do n=1,ND !Loop over all symbols
|
||||||
ib=n*NSPS + i0
|
ib=n*NSPS + i0
|
||||||
if(n.gt.ND1) ib=(NS+n)*NSPS + i0
|
if(n.gt.ND1) ib=(NS+n)*NSPS + i0
|
||||||
ia=ib-NSPS+1
|
ia=ib-NSPS+1
|
||||||
|
chansym(n)=0
|
||||||
if(ia.lt.1 .or. ib.gt.NMAX) cycle
|
if(ia.lt.1 .or. ib.gt.NMAX) cycle
|
||||||
c=crcvd(ia:ib)
|
c=crcvd(ia:ib)
|
||||||
call four2a(c,NSPS,1,-1,1) !Compute symbol spectrum
|
call four2a(c,NSPS,1,-1,1) !Compute symbol spectrum
|
||||||
|
@ -13,13 +13,16 @@ program sfoxtest
|
|||||||
complex cnoise(NMAX) !Complex noise
|
complex cnoise(NMAX) !Complex noise
|
||||||
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)
|
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
|
||||||
integer, allocatable :: chansym(:) !Recovered hard-decision symbols
|
integer, allocatable :: chansym(:) !Recovered hard-decision symbols
|
||||||
integer, allocatable :: iera(:) !Positions of erasures
|
integer, allocatable :: iera(:) !Positions of erasures
|
||||||
|
integer, allocatable :: rxdat(:)
|
||||||
|
integer, allocatable :: rxprob(:)
|
||||||
|
integer, allocatable :: rxdat2(:)
|
||||||
|
integer, allocatable :: rxprob2(:)
|
||||||
character fname*17,arg*12,itu*2
|
character fname*17,arg*12,itu*2
|
||||||
|
|
||||||
nargs=iargc()
|
nargs=iargc()
|
||||||
@ -78,6 +81,10 @@ program sfoxtest
|
|||||||
allocate(chansym0(1:NN))
|
allocate(chansym0(1:NN))
|
||||||
allocate(chansym(1:NN))
|
allocate(chansym(1:NN))
|
||||||
allocate(iera(1:NN))
|
allocate(iera(1:NN))
|
||||||
|
allocate(rxdat(0:ND-1))
|
||||||
|
allocate(rxprob(0:ND-1))
|
||||||
|
allocate(rxdat2(0:ND-1))
|
||||||
|
allocate(rxprob2(0:ND-1))
|
||||||
|
|
||||||
rms=100.
|
rms=100.
|
||||||
fsample=12000.0 !Sample rate (Hz)
|
fsample=12000.0 !Sample rate (Hz)
|
||||||
@ -165,10 +172,19 @@ program sfoxtest
|
|||||||
call twkfreq(crcvd,crcvd,NMAX,12000.0,a)
|
call twkfreq(crcvd,crcvd,NMAX,12000.0,a)
|
||||||
f=1500.0
|
f=1500.0
|
||||||
call sfox_demod(crcvd,f,t,s3,chansym) !Get s3 and hard symbol values
|
call sfox_demod(crcvd,f,t,s3,chansym) !Get s3 and hard symbol values
|
||||||
|
call sym_prob(s3,rxdat,rxprob,rxdat2,rxprob2)
|
||||||
|
chansym(1:ND)=rxdat !### TEMPORARY ? ###
|
||||||
|
! do j=0,ND-1
|
||||||
|
! do j=0,5
|
||||||
|
! write(*,3001) j,chansym(1+j),rxdat(j),rxprob(j),rxdat2(j),rxprob2(j)
|
||||||
|
!3001 format('prob'i5,5i8)
|
||||||
|
! enddo
|
||||||
|
|
||||||
nera=0
|
nera=0
|
||||||
chansym=mod(chansym,nq) !Enforce 0 to nq-1
|
chansym=mod(chansym,nq) !Enforce 0 to nq-1
|
||||||
nharderr=count(chansym.ne.chansym0) !Count hard errors
|
nharderr=count(chansym.ne.chansym0) !Count hard errors
|
||||||
|
! nhard2=count(rxdat.ne.chansym0(1:ND)) !Count hard errors
|
||||||
|
! print*,'A',nharderr,nhard2
|
||||||
ntot=ntot+nharderr
|
ntot=ntot+nharderr
|
||||||
nworst=max(nworst,nharderr)
|
nworst=max(nworst,nharderr)
|
||||||
call rs_decode_sf(chansym,iera,nera,nfixed) !Call the decoder
|
call rs_decode_sf(chansym,iera,nera,nfixed) !Call the decoder
|
||||||
|
Loading…
x
Reference in New Issue
Block a user