mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-01 05:32:31 -04:00
Change to 12-bit hash in msg type 4, to accommodate CQ calls.
This commit is contained in:
parent
190aef8a36
commit
18a839963f
@ -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
|
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
|
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
|
3 TU; W9XYZ K1ABC R 579 MA 1 28 28 1 3 13 74 ARRL RTTY contest
|
||||||
4 <WA9XYZ> PJ4/KA1ABC RR73 13 58 1 2 74 Nonstandard calls
|
4 <WA9XYZ> PJ4/KA1ABC RR73 12 58 1 2 1 74 Nonstandard calls
|
||||||
5 ...
|
5
|
||||||
6
|
6
|
||||||
7
|
7
|
||||||
----------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------
|
||||||
|
@ -6,14 +6,13 @@ program encode77
|
|||||||
nargs=iargc()
|
nargs=iargc()
|
||||||
open(10,file='messages.txt',status='old')
|
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
|
do iline=1,999
|
||||||
if(nargs.eq.1) then
|
if(nargs.eq.1) then
|
||||||
call getarg(1,msg0)
|
call getarg(1,msg0)
|
||||||
else
|
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
|
read(10,1002,end=999) msg0
|
||||||
1002 format(a37)
|
1002 format(a37)
|
||||||
endif
|
endif
|
||||||
|
@ -2,4 +2,4 @@ gfortran -c ../packjt.f90
|
|||||||
gfortran -o encode77 -fbounds-check -Wall -Wno-conversion -Wno-real-q-constant \
|
gfortran -o encode77 -fbounds-check -Wall -Wno-conversion -Wno-real-q-constant \
|
||||||
encode77.f90 ../deg2grid.f90 ../grid2deg.f90 ../fix_contest_msg.f90 \
|
encode77.f90 ../deg2grid.f90 ../grid2deg.f90 ../fix_contest_msg.f90 \
|
||||||
../to_contest_msg.f90 ../fmtmsg.f90 ../azdist.f90 ../geodist.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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine hash13(n13,c13,isave)
|
subroutine hash12(n12,c13,isave)
|
||||||
|
|
||||||
parameter (NMAX=20)
|
parameter (NMAX=20)
|
||||||
character*13 c13,callsign(NMAX)
|
character*13 c13,callsign(NMAX)
|
||||||
@ -15,15 +15,15 @@ subroutine hash13(n13,c13,isave)
|
|||||||
|
|
||||||
if(isave.ge.0) then
|
if(isave.ge.0) then
|
||||||
do i=1,NMAX
|
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
|
enddo
|
||||||
ihash(NMAX:2:-1)=ihash(NMAX-1:1:-1)
|
ihash(NMAX:2:-1)=ihash(NMAX-1:1:-1)
|
||||||
callsign(NMAX:2:-1)=callsign(NMAX-1:1:-1)
|
callsign(NMAX:2:-1)=callsign(NMAX-1:1:-1)
|
||||||
ihash(1)=n13
|
ihash(1)=n12
|
||||||
callsign(1)=c13
|
callsign(1)=c13
|
||||||
else
|
else
|
||||||
do i=1,NMAX
|
do i=1,NMAX
|
||||||
if(ihash(i).eq.n13) then
|
if(ihash(i).eq.n12) then
|
||||||
c13=callsign(i)
|
c13=callsign(i)
|
||||||
go to 900
|
go to 900
|
||||||
endif
|
endif
|
||||||
@ -31,4 +31,4 @@ subroutine hash13(n13,c13,isave)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
900 return
|
900 return
|
||||||
end subroutine hash13
|
end subroutine hash12
|
@ -29,6 +29,9 @@ CQ AAA K1ABC FN42
|
|||||||
CQ ZZZ K1ABC FN42
|
CQ ZZZ K1ABC FN42
|
||||||
CQ AAAA K1ABC FN42
|
CQ AAAA K1ABC FN42
|
||||||
CQ ZZZZ 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
|
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 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)
|
TU; W9XYZ G8ABC R 559 0013 1 28 28 1 3 13 74 ARRL RTTY (DX)
|
||||||
|
@ -44,7 +44,7 @@ subroutine pack77(msg0,i3,n3,c77)
|
|||||||
go to 900
|
go to 900
|
||||||
endif
|
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)
|
100 call pack77_1(nwords,w,i3,n3,c77)
|
||||||
if(i3.ge.0) go to 900
|
if(i3.ge.0) go to 900
|
||||||
|
|
||||||
|
@ -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)
|
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_1,bcall_1,ok1)
|
||||||
call chkcall(call_2,bcall_2,ok2)
|
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
|
i3=4
|
||||||
n3=0
|
n3=0
|
||||||
|
icq=0
|
||||||
|
if(trim(w(1)).eq.'CQ') icq=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if(w(1)(1:1).eq.'<') then
|
if(icq.eq.1) then
|
||||||
iflip=0
|
iflip=0
|
||||||
n13=ihashcall(w(1),13)
|
n12=0
|
||||||
call hash13(n13,w(1),0) !Save this hash and its callsign
|
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))
|
c11=adjustr(call_2(1:11))
|
||||||
else if(w(2)(1:1).eq.'<') then
|
else if(w(2)(1:1).eq.'<') then
|
||||||
iflip=1
|
iflip=1
|
||||||
n13=ihashcall(w(2),13)
|
n12=ihashcall(w(2),12)
|
||||||
call hash13(n13,w(2),0) !Save this hash and its callsign
|
call hash12(n12,w(2),0) !Save this hash and its callsign
|
||||||
c11=adjustr(call_1(1:11))
|
c11=adjustr(call_1(1:11))
|
||||||
endif
|
endif
|
||||||
n58=0
|
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.'RRR') nrpt=1
|
||||||
if(trim(w(3)).eq.'RR73') nrpt=2
|
if(trim(w(3)).eq.'RR73') nrpt=2
|
||||||
if(trim(w(3)).eq.'73') nrpt=3
|
if(trim(w(3)).eq.'73') nrpt=3
|
||||||
write(c77,1010) n13,n58,iflip,nrpt,i3
|
if(icq.eq.1) then
|
||||||
1010 format(b13.13,b58.58,b1,b2.2,b3.3)
|
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
|
endif
|
||||||
|
|
||||||
return
|
900 return
|
||||||
end subroutine pack77_4
|
end subroutine pack77_4
|
||||||
|
@ -201,14 +201,14 @@ subroutine unpack77(c77,msg)
|
|||||||
' R '//crpt//' '//cserial
|
' R '//crpt//' '//cserial
|
||||||
endif
|
endif
|
||||||
else if(i3.eq.4) then
|
else if(i3.eq.4) then
|
||||||
read(c77,1050) n13,n58,iflip,nrpt
|
read(c77,1050) n12,n58,iflip,nrpt,icq
|
||||||
1050 format(b13,b58,b1,b2)
|
1050 format(b12,b58,b1,b2,b1)
|
||||||
do i=11,1,-1
|
do i=11,1,-1
|
||||||
j=mod(n58,38)+1
|
j=mod(n58,38)+1
|
||||||
c11(i:i)=c(j:j)
|
c11(i:i)=c(j:j)
|
||||||
n58=n58/38
|
n58=n58/38
|
||||||
enddo
|
enddo
|
||||||
call hash13(n13,call_3,-1)
|
call hash12(n12,call_3,-1)
|
||||||
if(iflip.eq.0) then
|
if(iflip.eq.0) then
|
||||||
call_1=call_3
|
call_1=call_3
|
||||||
call_2=adjustl(c11)//' '
|
call_2=adjustl(c11)//' '
|
||||||
@ -216,10 +216,14 @@ subroutine unpack77(c77,msg)
|
|||||||
call_1=adjustl(c11)//' '
|
call_1=adjustl(c11)//' '
|
||||||
call_2=call_3
|
call_2=call_3
|
||||||
endif
|
endif
|
||||||
|
if(icq.eq.0) then
|
||||||
if(nrpt.eq.0) msg=trim(call_1)//' '//trim(call_2)
|
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.1) msg=trim(call_1)//' '//trim(call_2)//' RRR'
|
||||||
if(nrpt.eq.2) msg=trim(call_1)//' '//trim(call_2)//' RR73'
|
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(nrpt.eq.3) msg=trim(call_1)//' '//trim(call_2)//' 73'
|
||||||
|
else
|
||||||
|
msg='CQ '//trim(call_2)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user