mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-24 10:22:26 -04:00
Cleanup
This commit is contained in:
parent
01d555c898
commit
8da98fee1e
@ -2,43 +2,43 @@ subroutine decode174_74(llr,Keff,ndeep,apmask,maxsuper,message74,cw,nharderror,i
|
||||
!
|
||||
! A hybrid bp/osd decoder for the (174,74) code.
|
||||
!
|
||||
integer, parameter:: N=174, K=74, M=N-K
|
||||
integer*1 cw(N),apmask(N)
|
||||
integer*1 decoded(K)
|
||||
integer*1 message74(74)
|
||||
integer nrw(M),ncw
|
||||
integer Nm(6,M)
|
||||
integer Mn(3,N) ! 3 checks per bit
|
||||
integer synd(M)
|
||||
real tov(3,N)
|
||||
real toc(6,M)
|
||||
real tanhtoc(6,M)
|
||||
real zn(N),zsum(N)
|
||||
real llr(N)
|
||||
real Tmn
|
||||
integer, parameter:: N=174, K=74, M=N-K
|
||||
integer*1 cw(N),apmask(N)
|
||||
integer*1 decoded(K)
|
||||
integer*1 message74(74)
|
||||
integer nrw(M),ncw
|
||||
integer Nm(6,M)
|
||||
integer Mn(3,N) ! 3 checks per bit
|
||||
integer synd(M)
|
||||
real tov(3,N)
|
||||
real toc(6,M)
|
||||
real tanhtoc(6,M)
|
||||
real zn(N),zsum(N)
|
||||
real llr(N)
|
||||
real Tmn
|
||||
|
||||
include "ldpc_174_74_parity.f90"
|
||||
include "ldpc_174_74_parity.f90"
|
||||
|
||||
decoded=0
|
||||
toc=0
|
||||
tov=0
|
||||
tanhtoc=0
|
||||
decoded=0
|
||||
toc=0
|
||||
tov=0
|
||||
tanhtoc=0
|
||||
! initialize messages to checks
|
||||
do j=1,M
|
||||
do j=1,M
|
||||
do i=1,nrw(j)
|
||||
toc(i,j)=llr((Nm(i,j)))
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
ncnt=0
|
||||
nclast=0
|
||||
ncnt=0
|
||||
nclast=0
|
||||
|
||||
maxiterations=1
|
||||
maxiterations=1
|
||||
|
||||
zsum=0.0
|
||||
do isuper=1,maxsuper
|
||||
zsum=0.0
|
||||
do isuper=1,maxsuper
|
||||
|
||||
do iter=0,maxiterations
|
||||
do iter=0,maxiterations
|
||||
! Update bit log likelihood ratios (tov=0 in iteration 0).
|
||||
do i=1,N
|
||||
if( apmask(i) .ne. 1 ) then
|
||||
@ -47,7 +47,7 @@ do iter=0,maxiterations
|
||||
zn(i)=llr(i)
|
||||
endif
|
||||
enddo
|
||||
zsum=zsum+zn
|
||||
zsum=zsum+zn
|
||||
! Check to see if we have a codeword (check before we do any iteration).
|
||||
cw=0
|
||||
where( zn .gt. 0. ) cw=1
|
||||
@ -64,7 +64,7 @@ zsum=zsum+zn
|
||||
nharderror=count( (2*cw-1)*llr .lt. 0.0 )
|
||||
if(nbadcrc.eq.0) then
|
||||
message74=decoded(1:74)
|
||||
dmin=0.0
|
||||
dmin=0.0
|
||||
return
|
||||
endif
|
||||
endif
|
||||
@ -114,15 +114,15 @@ dmin=0.0
|
||||
enddo
|
||||
enddo
|
||||
|
||||
enddo ! bp iterations
|
||||
llr=zsum
|
||||
enddo ! bp iterations
|
||||
llr=zsum
|
||||
call osd174_74(llr,Keff,apmask,ndeep,message74,cw,nharderror,dmin)
|
||||
if(nharderror.gt.0) then
|
||||
return
|
||||
endif
|
||||
enddo ! super iterations
|
||||
enddo ! super iterations
|
||||
|
||||
nharderror=-1
|
||||
nharderror=-1
|
||||
|
||||
return
|
||||
return
|
||||
end subroutine decode174_74
|
||||
|
Loading…
x
Reference in New Issue
Block a user