diff --git a/lib/77bit/77bit.txt b/lib/77bit/77bit.txt index f463fbbc8..aa8652514 100644 --- a/lib/77bit/77bit.txt +++ b/lib/77bit/77bit.txt @@ -20,8 +20,8 @@ i3.n3 Example message Bits Total Purpose 1 WA9XYZ/R KA1ABC/R R FN42 28 1 28 1 1 15 74 Standard msg 2 PA3XYZ/P GM4ABC/P R JO22 28 1 28 1 1 15 74 EU VHF contest 3 TU; W9XYZ K1ABC R 579 MA 1 28 28 1 3 13 74 ARRL RTTY contest -4 PJ4/KA1ABC RR73 13 58 1 2 74 Nonstandard calls -5 ... +4 PJ4/KA1ABC RR73 12 58 1 2 1 74 Nonstandard calls +5 6 7 ---------------------------------------------------------------------------------- diff --git a/lib/77bit/encode77.f90 b/lib/77bit/encode77.f90 index ed2c81bb0..a6aacf38e 100644 --- a/lib/77bit/encode77.f90 +++ b/lib/77bit/encode77.f90 @@ -5,15 +5,14 @@ program encode77 nargs=iargc() open(10,file='messages.txt',status='old') - - write(*,1000) -1000 format('i3.n3 Err Message to be encoded Decoded message'/ & - 80('-')) do iline=1,999 if(nargs.eq.1) then call getarg(1,msg0) else + if(iline.eq.1) write(*,1000) +1000 format('i3.n3 Err Message to be encoded Decoded message'/ & + 80('-')) read(10,1002,end=999) msg0 1002 format(a37) endif diff --git a/lib/77bit/g2 b/lib/77bit/g2 index 2d3b32252..d0f2027ee 100644 --- a/lib/77bit/g2 +++ b/lib/77bit/g2 @@ -2,4 +2,4 @@ gfortran -c ../packjt.f90 gfortran -o encode77 -fbounds-check -Wall -Wno-conversion -Wno-real-q-constant \ encode77.f90 ../deg2grid.f90 ../grid2deg.f90 ../fix_contest_msg.f90 \ ../to_contest_msg.f90 ../fmtmsg.f90 ../azdist.f90 ../geodist.f90 \ - ihashcall.f90 hash10.f90 hash13.f90 hash22.f90 packjt.o + ihashcall.f90 hash10.f90 hash12.f90 hash22.f90 packjt.o diff --git a/lib/77bit/hash13.f90 b/lib/77bit/hash12.f90 similarity index 75% rename from lib/77bit/hash13.f90 rename to lib/77bit/hash12.f90 index 09118ba23..cd20b8485 100644 --- a/lib/77bit/hash13.f90 +++ b/lib/77bit/hash12.f90 @@ -1,4 +1,4 @@ -subroutine hash13(n13,c13,isave) +subroutine hash12(n12,c13,isave) parameter (NMAX=20) character*13 c13,callsign(NMAX) @@ -15,15 +15,15 @@ subroutine hash13(n13,c13,isave) if(isave.ge.0) then do i=1,NMAX - if(ihash(i).eq.n13) go to 900 !This one is already in the list + if(ihash(i).eq.n12) go to 900 !This one is already in the list enddo ihash(NMAX:2:-1)=ihash(NMAX-1:1:-1) callsign(NMAX:2:-1)=callsign(NMAX-1:1:-1) - ihash(1)=n13 + ihash(1)=n12 callsign(1)=c13 else do i=1,NMAX - if(ihash(i).eq.n13) then + if(ihash(i).eq.n12) then c13=callsign(i) go to 900 endif @@ -31,4 +31,4 @@ subroutine hash13(n13,c13,isave) endif 900 return -end subroutine hash13 +end subroutine hash12 diff --git a/lib/77bit/messages.txt b/lib/77bit/messages.txt index 1cc0cf22c..38399e694 100644 --- a/lib/77bit/messages.txt +++ b/lib/77bit/messages.txt @@ -29,6 +29,9 @@ CQ AAA K1ABC FN42 CQ ZZZ K1ABC FN42 CQ AAAA K1ABC FN42 CQ ZZZZ K1ABC FN42 +CQ KH1/KH7Z +CQ YW18FIFA +CQ W4/YW18FIFA PA1XYZ/P GM4ABC/P R FN42 28 1 28 1 1 15 74 EU VHF Contest TU; W9XYZ K1ABC R 579 MA 1 28 28 1 3 13 74 ARRL RTTY contest TU; W9XYZ G8ABC R 559 0013 1 28 28 1 3 13 74 ARRL RTTY (DX) diff --git a/lib/77bit/pack77.f90 b/lib/77bit/pack77.f90 index 21d37f2aa..509a39ba8 100644 --- a/lib/77bit/pack77.f90 +++ b/lib/77bit/pack77.f90 @@ -44,7 +44,7 @@ subroutine pack77(msg0,i3,n3,c77) go to 900 endif -! Check Types 1 and 2 (Standard 77-bit message (type 1) or with "/P" (type 2)) +! Check Type 1 (Standard 77-bit message) or Type 2, with optional "/P" 100 call pack77_1(nwords,w,i3,n3,c77) if(i3.ge.0) go to 900 diff --git a/lib/77bit/pack77_4.f90 b/lib/77bit/pack77_4.f90 index 5b853508e..b8c7922bc 100644 --- a/lib/77bit/pack77_4.f90 +++ b/lib/77bit/pack77_4.f90 @@ -18,20 +18,27 @@ subroutine pack77_4(nwords,w,i3,n3,c77) if(call_2(1:1).eq.'<') call_2=w(2)(2:len(trim(w(2)))-1) call chkcall(call_1,bcall_1,ok1) call chkcall(call_2,bcall_2,ok2) - if(ok1 .and. ok2) then + if(trim(w(1)).eq.'CQ' .or. (ok1.and.ok2)) then + if(trim(w(1)).eq.'CQ' .and. len(trim(w(2))).le.4) go to 900 i3=4 n3=0 + icq=0 + if(trim(w(1)).eq.'CQ') icq=1 endif - if(w(1)(1:1).eq.'<') then + if(icq.eq.1) then iflip=0 - n13=ihashcall(w(1),13) - call hash13(n13,w(1),0) !Save this hash and its callsign + n12=0 + c11=adjustr(call_2(1:11)) + else if(w(1)(1:1).eq.'<') then + iflip=0 + n12=ihashcall(w(1),12) + call hash12(n12,w(1),0) !Save this hash and its callsign c11=adjustr(call_2(1:11)) else if(w(2)(1:1).eq.'<') then iflip=1 - n13=ihashcall(w(2),13) - call hash13(n13,w(2),0) !Save this hash and its callsign + n12=ihashcall(w(2),12) + call hash12(n12,w(2),0) !Save this hash and its callsign c11=adjustr(call_1(1:11)) endif n58=0 @@ -42,9 +49,13 @@ subroutine pack77_4(nwords,w,i3,n3,c77) if(trim(w(3)).eq.'RRR') nrpt=1 if(trim(w(3)).eq.'RR73') nrpt=2 if(trim(w(3)).eq.'73') nrpt=3 - write(c77,1010) n13,n58,iflip,nrpt,i3 -1010 format(b13.13,b58.58,b1,b2.2,b3.3) + if(icq.eq.1) then + iflip=0 + nrpt=0 + endif + write(c77,1010) n12,n58,iflip,nrpt,icq,i3 +1010 format(b12.12,b58.58,b1,b2.2,b1,b3.3) endif - return +900 return end subroutine pack77_4 diff --git a/lib/77bit/unpack77.f90 b/lib/77bit/unpack77.f90 index 97f444f6a..9c6bb9a27 100644 --- a/lib/77bit/unpack77.f90 +++ b/lib/77bit/unpack77.f90 @@ -201,14 +201,14 @@ subroutine unpack77(c77,msg) ' R '//crpt//' '//cserial endif else if(i3.eq.4) then - read(c77,1050) n13,n58,iflip,nrpt -1050 format(b13,b58,b1,b2) + read(c77,1050) n12,n58,iflip,nrpt,icq +1050 format(b12,b58,b1,b2,b1) do i=11,1,-1 j=mod(n58,38)+1 c11(i:i)=c(j:j) n58=n58/38 enddo - call hash13(n13,call_3,-1) + call hash12(n12,call_3,-1) if(iflip.eq.0) then call_1=call_3 call_2=adjustl(c11)//' ' @@ -216,10 +216,14 @@ subroutine unpack77(c77,msg) call_1=adjustl(c11)//' ' call_2=call_3 endif - if(nrpt.eq.0) msg=trim(call_1)//' '//trim(call_2) - if(nrpt.eq.1) msg=trim(call_1)//' '//trim(call_2)//' RRR' - if(nrpt.eq.2) msg=trim(call_1)//' '//trim(call_2)//' RR73' - if(nrpt.eq.3) msg=trim(call_1)//' '//trim(call_2)//' 73' + if(icq.eq.0) then + if(nrpt.eq.0) msg=trim(call_1)//' '//trim(call_2) + if(nrpt.eq.1) msg=trim(call_1)//' '//trim(call_2)//' RRR' + if(nrpt.eq.2) msg=trim(call_1)//' '//trim(call_2)//' RR73' + if(nrpt.eq.3) msg=trim(call_1)//' '//trim(call_2)//' 73' + else + msg='CQ '//trim(call_2) + endif endif return