Merged patch to fix #97

This commit is contained in:
Jordan Sherer
2019-03-21 21:14:23 -04:00
parent 9d9ae62526
commit 5ef440faf6
7 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ subroutine chkcrc12a(decoded,nbadcrc)
read(cbits,1002) ncrc12 !Received CRC12
1002 format(75x,b12)
i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32)
i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32,0_1))
i1Dec8BitBytes(11)=0
icrc12=crc12(c_loc(i1Dec8BitBytes),11) !CRC12 computed from 75 msg bits
icrc12=xor(icrc12, 42) ! TODO: jsherer - could change the crc here
+2 -2
View File
@@ -19,7 +19,7 @@ subroutine extractmessage174(decoded,msgreceived,ncrcflag)
read(cbits,1002) ncrc12 !Received CRC12
1002 format(75x,b12)
i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32)
i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32,0_1))
i1Dec8BitBytes(11)=0
icrc12=crc12(c_loc(i1Dec8BitBytes),11) !CRC12 computed from 75 msg bits
icrc12=xor(icrc12, 42) ! TODO: jsherer - could change the crc here
@@ -29,7 +29,7 @@ subroutine extractmessage174(decoded,msgreceived,ncrcflag)
do ibyte=1,12
itmp=0
do ibit=1,6
itmp=ishft(itmp,1)+iand(1,decoded((ibyte-1)*6+ibit))
itmp=ishft(itmp,1)+iand(1_1,decoded((ibyte-1)*6+ibit))
enddo
i4Dec6BitWords(ibyte)=itmp
enddo
+1 -1
View File
@@ -35,7 +35,7 @@ subroutine genft8(msg,mygrid,bcontest,i3bit,msgsent,msgbits,itone)
1000 format(12b6.6,b8.8)
read(cbits,1001) i1Msg8BitBytes(1:10)
1001 format(10b8)
i1Msg8BitBytes(10)=iand(i1Msg8BitBytes(10),128+64+32)
i1Msg8BitBytes(10)=iand(i1Msg8BitBytes(10),transfer(128+64+32,0_1))
i1Msg8BitBytes(11)=0
icrc12=crc12(c_loc(i1Msg8BitBytes),11)
icrc12=xor(icrc12, 42) ! TODO: jsherer - could change the crc here
+1 -1
View File
@@ -94,7 +94,7 @@ allocate ( rxdata(N), llr(N) )
checksum = xor(checksum, 42) ! TODO: jsherer - could change the crc here
! For reference, the next 3 lines show how to check the CRC
i1Msg8BitBytes(10)=checksum/256
i1Msg8BitBytes(11)=iand (checksum,255)
i1Msg8BitBytes(11)=iand(checksum,transfer(255,0_2))
checksumok = crc12_check(c_loc (i1Msg8BitBytes), 11)
if( checksumok ) write(*,*) 'Good checksum'