diff options
Diffstat (limited to 'lib/ft8')
| -rw-r--r-- | lib/ft8/chkcrc13a.f90 | 48 | ||||
| -rw-r--r-- | lib/ft8/chkcrc14a.f90 | 48 | ||||
| -rw-r--r-- | lib/ft8/extractmessage174.f90 | 4 | ||||
| -rw-r--r-- | lib/ft8/extractmessage174_91.f90 | 4 | ||||
| -rw-r--r-- | lib/ft8/ft8apset.f90 | 28 | ||||
| -rw-r--r-- | lib/ft8/ft8b.f90 | 17 | ||||
| -rw-r--r-- | lib/ft8/genft8.f90 | 2 |
7 files changed, 71 insertions, 80 deletions
diff --git a/lib/ft8/chkcrc13a.f90 b/lib/ft8/chkcrc13a.f90 index 74259cfc..25e14584 100644 --- a/lib/ft8/chkcrc13a.f90 +++ b/lib/ft8/chkcrc13a.f90 @@ -1,24 +1,24 @@ -subroutine chkcrc13a(decoded,nbadcrc)
-
- use crc
- integer*1 decoded(90)
- integer*1, target:: i1Dec8BitBytes(12)
- character*90 cbits
-
-! Write decoded bits into cbits: 77-bit message plus 13-bit CRC
- write(cbits,1000) decoded
-1000 format(90i1)
- read(cbits,1001) i1Dec8BitBytes
-1001 format(12b8)
- read(cbits,1002) ncrc13 !Received CRC13
-1002 format(77x,b13)
-
- i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32+16+8)
- i1Dec8BitBytes(11:12)=0
- icrc13=crc13(c_loc(i1Dec8BitBytes),12) !CRC13 computed from 77 msg bits
-
- nbadcrc=1
- if(ncrc13.eq.icrc13) nbadcrc=0
-
- return
-end subroutine chkcrc13a
+subroutine chkcrc13a(decoded,nbadcrc) + + use crc + integer*1 decoded(90) + integer*1, target:: i1Dec8BitBytes(12) + character*90 cbits + +! Write decoded bits into cbits: 77-bit message plus 13-bit CRC + write(cbits,1000) decoded +1000 format(90i1) + read(cbits,1001) i1Dec8BitBytes +1001 format(12b8) + read(cbits,1002) ncrc13 !Received CRC13 +1002 format(77x,b13) + + i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32+16+8,0_1)) + i1Dec8BitBytes(11:12)=0 + icrc13=crc13(c_loc(i1Dec8BitBytes),12) !CRC13 computed from 77 msg bits + + nbadcrc=1 + if(ncrc13.eq.icrc13) nbadcrc=0 + + return +end subroutine chkcrc13a diff --git a/lib/ft8/chkcrc14a.f90 b/lib/ft8/chkcrc14a.f90 index d9d3d7a4..9ecda9b2 100644 --- 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),128+64+32+16+8)
- 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 diff --git a/lib/ft8/extractmessage174.f90 b/lib/ft8/extractmessage174.f90 index 4bac6694..252547c4 100644 --- a/lib/ft8/extractmessage174.f90 +++ b/lib/ft8/extractmessage174.f90 @@ -17,7 +17,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 @@ -26,7 +26,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 diff --git a/lib/ft8/extractmessage174_91.f90 b/lib/ft8/extractmessage174_91.f90 index d2d3019e..ecc14246 100644 --- a/lib/ft8/extractmessage174_91.f90 +++ b/lib/ft8/extractmessage174_91.f90 @@ -17,7 +17,7 @@ subroutine extractmessage174_91(decoded,msgreceived,ncrcflag) read(cbits,1002) ncrc14 !Received CRC12 1002 format(77x,b14) - i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32+16+8) + i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32+16+8,0_1)) i1Dec8BitBytes(11:12)=0 icrc14=crc14(c_loc(i1Dec8BitBytes),12) !CRC12 computed from 75 msg bits @@ -26,7 +26,7 @@ subroutine extractmessage174_91(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 diff --git a/lib/ft8/ft8apset.f90 b/lib/ft8/ft8apset.f90 index 15eddd05..56a18c4f 100644 --- a/lib/ft8/ft8apset.f90 +++ b/lib/ft8/ft8apset.f90 @@ -1,22 +1,21 @@ subroutine ft8apset(mycall12,hiscall12,apsym) use packjt77 character*77 c77 - character*37 msg + character*37 msg,msgchk character*12 mycall12,hiscall12,hiscall integer apsym(58) - logical nohiscall + logical nohiscall,unpk77_success - if(len(trim(mycall12)).eq.0) then - apsym=0 - apsym(1)=99 - apsym(30)=99 - return - endif + apsym=0 + apsym(1)=99 + apsym(30)=99 + + if(len(trim(mycall12)).lt.3) return nohiscall=.false. hiscall=hiscall12 - if(len(trim(hiscall)).eq.0) then - hiscall="K9ABC" + if(len(trim(hiscall)).lt.3) then + hiscall=mycall12 ! use mycall for dummy hiscall - mycall won't be hashed. nohiscall=.true. endif @@ -24,12 +23,9 @@ subroutine ft8apset(mycall12,hiscall12,apsym) ! msg=trim(mycall12)//' '//trim(hiscall)//' RRR' call pack77(msg,i3,n3,c77) - if(i3.ne.1) then - apsym=0 - apsym(1)=99 - apsym(30)=99 - return - endif + call unpack77(c77,1,msgchk,unpk77_success) + + if(i3.ne.1 .or. (msg.ne.msgchk) .or. .not.unpk77_success) return read(c77,'(58i1)',err=1) apsym(1:58) apsym=2*apsym-1 diff --git a/lib/ft8/ft8b.f90 b/lib/ft8/ft8b.f90 index 5db48341..6fbb0368 100644 --- a/lib/ft8/ft8b.f90 +++ b/lib/ft8/ft8b.f90 @@ -8,12 +8,11 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & include 'ft8_params.f90' parameter(NP2=2812) character*37 msg37 - character*12 mycall12,hiscall12,hiscall12_0 + character*12 mycall12,hiscall12 character*77 c77 - character*13 c13 real a(5) real s8(0:7,NN) - real s2(0:511),s2l(0:511) + real s2(0:511) real bmeta(174),bmetb(174),bmetc(174) real llra(174),llrb(174),llrc(174),llrd(174) !Soft symbols real dd0(15*12000) @@ -43,7 +42,7 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & data mrr73/0,1,1,1,1,1,1,0,0,1,1,1,0,1,0,1,0,0,1/ data first/.true./ data graymap/0,1,3,2,5,6,4,7/ - save nappasses,naptypes,ncontest0,one,hiscall12_0 + save nappasses,naptypes,ncontest0,one if(first.or.(ncontest.ne.ncontest0)) then @@ -87,11 +86,8 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & ncontest0=ncontest endif - if(hiscall12.ne.hiscall12_0) then - c13=hiscall12//' ' - call save_hash_call(c13,n10,n12,n22) - hiscall12_0=hiscall12 - endif + dxcall13=hiscall12 + mycall13=mycall12 max_iterations=30 nharderrors=-1 @@ -190,7 +186,6 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & print*,"Error - nsym must be 1, 2, or 3." endif enddo - s2l(0:nt-1)=log(s2(0:nt-1)+1e-32) i32=1+(k-1)*3+(ihalf-1)*87 if(nsym.eq.1) ibmax=2 if(nsym.eq.2) ibmax=5 @@ -396,7 +391,7 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & if(i3.gt.4 .or. (i3.eq.0.and.n3.gt.5)) then cycle endif - call unpack77(c77,msg37,unpk77_success) + call unpack77(c77,1,msg37,unpk77_success) if(.not.unpk77_success) then cycle endif diff --git a/lib/ft8/genft8.f90 b/lib/ft8/genft8.f90 index bf3116b8..41ff546c 100644 --- a/lib/ft8/genft8.f90 +++ b/lib/ft8/genft8.f90 @@ -17,7 +17,7 @@ subroutine genft8(msg,i3,n3,msgsent,msgbits,itone) i3=-1 n3=-1 call pack77(msg,i3,n3,c77) - call unpack77(c77,msgsent,unpk77_success) + call unpack77(c77,0,msgsent,unpk77_success) read(c77,'(77i1)',err=1) msgbits if(unpk77_success) go to 2 1 msgbits=0 |
