XOR the message with rvec before calculating CRC

This commit is contained in:
Steven Franke 2020-06-27 15:43:14 -05:00
parent 1f16beeafe
commit 89c81cb5f1
2 changed files with 6 additions and 2 deletions

View File

@ -54,6 +54,7 @@ subroutine genfst240(msg0,ichk,msgsent,msgbits,i4tone,iwspr)
read(c24,'(24i1)') msgbits(51:74)
else
read(c77,'(77i1)') msgbits(1:77)
msgbits(1:77)=mod(msgbits(1:77)+rvec,2)
call get_crc24(msgbits,101,ncrc24)
write(c24,'(b24.24)') ncrc24
read(c24,'(24i1)') msgbits(78:101)
@ -69,7 +70,6 @@ subroutine genfst240(msg0,ichk,msgsent,msgbits,i4tone,iwspr)
entry get_fst240_tones_from_bits(msgbits,i4tone,iwspr)
2 continue
call encode240_101(msgbits,codeword)
! Grayscale mapping:

View File

@ -51,8 +51,12 @@ contains
integer*1 apmask(240),cw(240)
integer*1 hbits(320)
integer*1 message101(101),message74(74)
integer*1 rvec(77)
logical badsync,unpk77_success,single_decode
integer*2 iwave(300*12000)
data rvec/0,1,0,0,1,0,1,0,0,1,0,1,1,1,1,0,1,0,0,0,1,0,0,1,1,0,1,1,0, &
1,0,0,1,0,1,1,0,0,0,0,1,0,0,0,1,0,1,0,0,1,1,1,1,0,0,1,0,1, &
0,1,0,1,0,1,1,0,1,1,1,1,1,0,0,0,1,0,1/
this%callback => callback
hmod=2**nsubmode
@ -313,7 +317,7 @@ contains
endif
if(nharderrors .ge.0) then
if(iwspr.eq.0) then
write(c77,'(77i1)') message101(1:77)
write(c77,'(77i1)') mod(message101(1:77)+rvec,2)
call unpack77(c77,0,msg,unpk77_success)
else
write(c77,'(50i1)') message74(1:50)