mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-10 14:23:31 -05:00
Fix up ldpcsim144 for comparisons with ldpcsim128_90.
This commit is contained in:
parent
5da3986f0a
commit
1aeaa1715b
@ -130,15 +130,15 @@ do idb = 14,-6,-1
|
|||||||
nerrdec(nerr)=nerrdec(nerr)+1
|
nerrdec(nerr)=nerrdec(nerr)+1
|
||||||
else ! this is an undetected error
|
else ! this is an undetected error
|
||||||
nue=nue+1
|
nue=nue+1
|
||||||
nbadwt(nhw)=nbadwt(nhw)+1 ! store the weight of the error vector
|
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
nbadcrc=nbadcrc+1
|
nbadcrc=nbadcrc+1
|
||||||
|
nbadwt(nhw)=nbadwt(nhw)+1 ! store the weight of the error vector
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
snr2500=db-3.5
|
snr2500=db-2.5
|
||||||
pberr=real(nerr)/real(ntrials*N)
|
pberr=real(nerr)/real(ntrials*N)
|
||||||
write(*,"(f4.1,4x,f5.1,1x,i8,1x,i8,1x,i8,8x,f5.2,8x,e10.3)") db,snr2500,ngood,nue,nbadcrc,ss,pberr
|
write(*,"(f4.1,4x,f5.1,1x,i8,1x,i8,1x,i8,8x,f5.2,8x,e10.3)") db,snr2500,ngood,nue,nbadcrc,ss,pberr
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ do i=0,N
|
|||||||
write(23,'(i4,2x,i10,i10,f10.2)') i,nerrdec(i),nerrtot(i),real(nerrdec(i))/real(nerrtot(i)+1e-10)
|
write(23,'(i4,2x,i10,i10,f10.2)') i,nerrdec(i),nerrtot(i),real(nerrdec(i))/real(nerrtot(i)+1e-10)
|
||||||
enddo
|
enddo
|
||||||
close(23)
|
close(23)
|
||||||
open(unit=25,file='undetected_error_hamming_weight.dat',status='unknown')
|
open(unit=25,file='badcrc_hamming_weight.dat',status='unknown')
|
||||||
do i=0,N
|
do i=0,N
|
||||||
write(25,'(i4,2x,i10)') i,nbadwt(i)
|
write(25,'(i4,2x,i10)') i,nbadwt(i)
|
||||||
enddo
|
enddo
|
||||||
|
@ -14,7 +14,7 @@ integer*1 i1hash(4)
|
|||||||
integer*1 msgbits(80)
|
integer*1 msgbits(80)
|
||||||
integer*4 i4Msg6BitWords(13)
|
integer*4 i4Msg6BitWords(13)
|
||||||
integer ihash
|
integer ihash
|
||||||
integer nerrtot(128),nerrdec(128)
|
integer nerrtot(0:128),nerrdec(0:128)
|
||||||
real*8, allocatable :: lratio(:), rxdata(:), rxavgd(:)
|
real*8, allocatable :: lratio(:), rxdata(:), rxavgd(:)
|
||||||
real, allocatable :: yy(:), llr(:)
|
real, allocatable :: yy(:), llr(:)
|
||||||
equivalence(ihash,i1hash)
|
equivalence(ihash,i1hash)
|
||||||
@ -41,8 +41,8 @@ call getarg(4,arg)
|
|||||||
read(arg,*) s
|
read(arg,*) s
|
||||||
|
|
||||||
! don't count hash bits as data bits
|
! don't count hash bits as data bits
|
||||||
|
K=80
|
||||||
N=128
|
N=128
|
||||||
K=72
|
|
||||||
rate=real(K)/real(N)
|
rate=real(K)/real(N)
|
||||||
|
|
||||||
write(*,*) "rate: ",rate
|
write(*,*) "rate: ",rate
|
||||||
@ -90,7 +90,7 @@ msg="K9AN K1JT EN50"
|
|||||||
call init_random_seed()
|
call init_random_seed()
|
||||||
|
|
||||||
write(*,*) "Eb/N0 SNR2500 ngood nundetected nbadhash sigma"
|
write(*,*) "Eb/N0 SNR2500 ngood nundetected nbadhash sigma"
|
||||||
do idb = -6, 14
|
do idb = 14,-6,-1
|
||||||
db=idb/2.0-1.0
|
db=idb/2.0-1.0
|
||||||
sigma=1/sqrt( 2*rate*(10**(db/10.0)) )
|
sigma=1/sqrt( 2*rate*(10**(db/10.0)) )
|
||||||
ngood=0
|
ngood=0
|
||||||
@ -161,7 +161,7 @@ do idb = -6, 14
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
snr2500=db-3.5
|
snr2500=db-3.0
|
||||||
write(*,"(f4.1,4x,f5.1,1x,i8,1x,i8,1x,i8,8x,f5.2)") db,snr2500,ngood,nue,nbadhash,ss
|
write(*,"(f4.1,4x,f5.1,1x,i8,1x,i8,1x,i8,8x,f5.2)") db,snr2500,ngood,nue,nbadhash,ss
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
Loading…
Reference in New Issue
Block a user