diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
| commit | 2d1068e60bce7ae1fff11623454900e8cee956b1 (patch) | |
| tree | acebe276e30466ef0ab91bc3da5e379bec0d7dc5 /lib/ft8/chkcrc14a.f90 | |
| parent | 43bebfbad6e7ba026bd3d55720c7d9e12a7ef8ef (diff) | |
New upstream version 2.6.0~rc3+repackupstream/2.6.0_rc3+repack
Diffstat (limited to 'lib/ft8/chkcrc14a.f90')
| -rwxr-xr-x | lib/ft8/chkcrc14a.f90 | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/ft8/chkcrc14a.f90 b/lib/ft8/chkcrc14a.f90 index 9ecda9b2..75eac39f 100755 --- a/lib/ft8/chkcrc14a.f90 +++ b/lib/ft8/chkcrc14a.f90 @@ -1,24 +1,24 @@ -subroutine chkcrc14a(decoded,nbadcrc) - - use crc - integer*1 decoded(91) - integer*1, target:: i1Dec8BitBytes(12) - character*91 cbits - -! Write decoded bits into cbits: 77-bit message plus 14-bit CRC - write(cbits,1000) decoded -1000 format(91i1) - read(cbits,1001) i1Dec8BitBytes -1001 format(12b8) - read(cbits,1002) ncrc14 !Received CRC14 -1002 format(77x,b14) - - i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32+16+8,0_1)) - i1Dec8BitBytes(11:12)=0 - icrc14=crc14(c_loc(i1Dec8BitBytes),12) !CRC14 computed from 77 msg bits - - nbadcrc=1 - if(ncrc14.eq.icrc14) nbadcrc=0 - - return -end subroutine chkcrc14a +subroutine chkcrc14a(decoded,nbadcrc)
+
+ use crc
+ integer*1 decoded(91)
+ integer*1, target:: i1Dec8BitBytes(12)
+ character*91 cbits
+
+! Write decoded bits into cbits: 77-bit message plus 14-bit CRC
+ write(cbits,1000) decoded
+1000 format(91i1)
+ read(cbits,1001) i1Dec8BitBytes
+1001 format(12b8)
+ read(cbits,1002) ncrc14 !Received CRC14
+1002 format(77x,b14)
+
+ i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32+16+8,0_1))
+ i1Dec8BitBytes(11:12)=0
+ icrc14=crc14(c_loc(i1Dec8BitBytes),12) !CRC14 computed from 77 msg bits
+
+ nbadcrc=1
+ if(ncrc14.eq.icrc14) nbadcrc=0
+
+ return
+end subroutine chkcrc14a
|
