Merged from trunk:

------------------------------------------------------------------------
r8060 | k1jt | 2017-09-01 13:51:42 +0100 (Fri, 01 Sep 2017) | 2 lines

Add a link to G3WDG doc on using QRA64 for microwave EME.

------------------------------------------------------------------------
r8061 | k1jt | 2017-09-01 17:22:19 +0100 (Fri, 01 Sep 2017) | 1 line

Fix a misspelled word.
------------------------------------------------------------------------
r8062 | bsomervi | 2017-09-01 21:10:35 +0100 (Fri, 01 Sep 2017) | 7 lines

Rationalize NA contest mode

Generic message packing and unpacking routines now understand antipode
grid contest messages.  These messages  are now recognized as standard
messages in  message response processing and  dealt with appropriately
when contest mode is selected and applicable (currently FT8 and MSK144
only).
------------------------------------------------------------------------
r8063 | bsomervi | 2017-09-01 21:43:45 +0100 (Fri, 01 Sep 2017) | 1 line

Fix issue compiling with Qt older than v5.7
------------------------------------------------------------------------
r8064 | bsomervi | 2017-09-01 22:29:02 +0100 (Fri, 01 Sep 2017) | 7 lines

Fix issues with type 2 compound calls in contest mode

Message generation in  contest mode now generates the  correct Tx3 for
type 2 calls.

"<type-2> 73"  is a free  text so  needed special handling  in message
processing.
------------------------------------------------------------------------
r8065 | bsomervi | 2017-09-01 23:22:20 +0100 (Fri, 01 Sep 2017) | 11 lines

Improved message generation for type 2 calls in contest mode

These attempt  to ensure that  a prefix is  logged by the  QSO partner
even if the compound call holder user Tx3 to tail-end a QSO.

The  type  2 message  generation  options  are largely  overridden  in
contest mode as only a few options make sense. Key is that Tx1 may use
only the base call when calling split is necessary, this requires that
both Tx3 and Tx4 have the full compound call otherwise the QSO partner
will never see the  full call until it is possibly  too late i.e. post
logging.
------------------------------------------------------------------------
r8066 | bsomervi | 2017-09-02 00:28:44 +0100 (Sat, 02 Sep 2017) | 5 lines

Fix erroneous auto stop critera for auto reply in FT8

We cannot assume that a "DE <dx-call>  <anything>" is or is not for us
so  we must  continue calling  and  risk possible  QRM. Calling  split
avoids this issue.
------------------------------------------------------------------------



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx-1.8@8067 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville
2017-09-01 23:55:56 +00:00
parent f67ed2006e
commit b048669c02
30 changed files with 144 additions and 199 deletions
+4 -6
View File
@@ -36,10 +36,8 @@ program contest72
1001 format(a22)
endif
msg=msg0
if(bcontest) call to_contest_msg(msg0,msg)
call packmsg(msg,dat,itype)
call unpackmsg(dat,msg1)
call fix_contest_msg(mygrid,msg1)
call packmsg(msg,dat,itype,bcontest)
call unpackmsg(dat,msg1,bcontest,mygrid)
ok=msg1.eq.msg0
if(msg0.eq.' ') then
write(*,1002)
@@ -78,9 +76,9 @@ program contest72
cycle
endif
call packmsg(msg,dat,itype)
call packmsg(msg,dat,itype,.false.)
write(ct1,1010) dat
call packtext(msg,nc1,nc2,ng)
call packtext(msg,nc1,nc2,ng,.false.,'')
! write(ct2,1012) nc1,nc2,ng+32768
!1012 format(2b28.28,b16.16)
! write(*,1014) ct1
+1 -1
View File
@@ -9,7 +9,7 @@ subroutine encode4(message,ncode)
integer*1 data0(13),symbol(216)
call chkmsg(message,cok,nspecial,flip)
call packmsg(message,dgen,itype) !Pack 72-bit message into 12 six-bit symbols
call packmsg(message,dgen,itype,.false.) !Pack 72-bit message into 12 six-bit symbols
call entail(dgen,data0)
call encode232(data0,206,symbol) !Convolutional encoding
call interleave4(symbol,1) !Apply JT4 interleaving
+1 -1
View File
@@ -122,7 +122,7 @@ subroutine extract(s3,nadd,mode65,ntrials,naggressive,ndepth,nflip, &
correct(1:63)=tmp(1:63)
call interleave63(correct,63,1)
call graycode65(correct,63,1)
call unpackmsg(dat4,decoded) !Unpack the user message
call unpackmsg(dat4,decoded,.false.,' ') !Unpack the user message
ncount=0
if(iand(dat4(10),8).ne.0) ltext=.true.
endif
+1 -1
View File
@@ -57,7 +57,7 @@ subroutine extract4(sym0,ncount,decoded)
read(c72,1102) data4
1102 format(12b6)
call unpackmsg(data4,decoded)
call unpackmsg(data4,decoded,.false.,' ')
if(decoded(1:6).eq.'000AAA') then
! decoded='***WRONG MODE?***'
decoded=' '
+4 -38
View File
@@ -6,10 +6,9 @@ subroutine genft8(msg,mygrid,bcontest,msgsent,msgbits,itone)
use packjt
include 'ft8_params.f90'
character*22 msg,msgsent
character*6 mygrid,g1,g2,g3,g4
character*6 mygrid
character*87 cbits
logical*1 bcontest
logical isgrid
logical bcontest
integer*4 i4Msg6BitWords(12) !72-bit message as 6-bit words
integer*1 msgbits(KK),codeword(3*ND)
integer*1, target:: i1Msg8BitBytes(11)
@@ -17,41 +16,8 @@ subroutine genft8(msg,mygrid,bcontest,msgsent,msgbits,itone)
integer icos7(0:6)
data icos7/2,5,6,0,4,1,3/ !Costas 7x7 tone pattern
isgrid(g1)=g1(1:1).ge.'A' .and. g1(1:1).le.'R' .and. g1(2:2).ge.'A' .and. &
g1(2:2).le.'R' .and. g1(3:3).ge.'0' .and. g1(3:3).le.'9' .and. &
g1(4:4).ge.'0' .and. g1(4:4).le.'9' .and. g1(1:4).ne.'RR73'
if(bcontest) then
i0=index(msg,' R ') + 3 !Check for ' R ' in message
g1=msg(i0:i0+3)//' '
if(isgrid(g1)) then !Check for ' R grid'
call grid2deg(g1,dlong,dlat)
dlong=dlong+180.0
if(dlong.gt.180.0) dlong=dlong-360.0
dlat=-dlat
call deg2grid(dlong,dlat,g2) !g2=antipodes grid
msg=msg(1:i0-3)//g2(1:4) !Send message with g2
endif
endif
call packmsg(msg,i4Msg6BitWords,itype) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent) !Unpack to get msgsent
if(bcontest) then
i1=index(msgsent(8:22),' ') + 8
g3=msgsent(i1:i1+3)//' '
if(isgrid(g3)) then
call azdist(mygrid,g3,0.d0,nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter)
if(ndkm.gt.10000) then
call grid2deg(g3,dlong,dlat)
dlong=dlong+180.0
if(dlong.gt.180.0) dlong=dlong-360.0
dlat=-dlat
call deg2grid(dlong,dlat,g4)
msgsent=msgsent(1:i1-1)//'R '//g4(1:4)
endif
endif
endif
call packmsg(msg,i4Msg6BitWords,itype,bcontest) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent,bcontest,mygrid) !Unpack to get msgsent
i3bit=0 !### temporary ###
write(cbits,1000) i4Msg6BitWords,32*i3bit
+2 -2
View File
@@ -66,8 +66,8 @@ allocate ( rxdata(N), llr(N) )
! msg="K1JT K9AN EN50"
msg="G4WJS K9AN EN50"
call packmsg(msg,i4Msg6BitWords,itype) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent) !Unpack to get msgsent
call packmsg(msg,i4Msg6BitWords,itype,.false.) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent,.false.,'') !Unpack to get msgsent
write(*,*) "message sent ",msgsent
i4=0
+2 -2
View File
@@ -71,8 +71,8 @@ allocate ( rxdata(N), llr(N) )
msg="K1JT K9AN EN50"
! msg="G4WJS K9AN EN50"
call packmsg(msg,i4Msg6BitWords,itype) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent) !Unpack to get msgsent
call packmsg(msg,i4Msg6BitWords,itype,.false.) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent,.false.,'') !Unpack to get msgsent
write(*,*) "message sent ",msgsent
i4=0
+2 -2
View File
@@ -26,8 +26,8 @@ subroutine gen4(msg0,ichk,msgsent,itone,itype)
message=msg0
call fmtmsg(message,iz)
call packmsg(message,i4Msg6BitWords,itype) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent) !Unpack to get msgsent
call packmsg(message,i4Msg6BitWords,itype,.false.) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent,.false.,' ') !Unpack to get msgsent
if(ichk.ne.0) go to 999
call encode4(message,itone) !Encode the information bits
i1=index(message,'-')
+2 -2
View File
@@ -44,8 +44,8 @@ subroutine gen65(msg0,ichk,msgsent,itone,itype)
ntest=0
if(flip.lt.0.0) ntest=1
if(nspecial.eq.0) then
call packmsg(message,dgen,itype) !Pack message into 72 bits
call unpackmsg(dgen,msgsent) !Unpack to get message sent
call packmsg(message,dgen,itype,.false.) !Pack message into 72 bits
call unpackmsg(dgen,msgsent,.false.,' ') !Unpack to get message sent
msgsent(20:22)=cok
call fmtmsg(msgsent,iz)
if(ichk.ne.0) go to 999 !Return if checking only
+2 -2
View File
@@ -37,8 +37,8 @@ subroutine gen9(msg0,ichk,msgsent,i4tone,itype)
message=message(i+1:)
enddo
call packmsg(message,i4Msg6BitWords,itype) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent) !Unpack to get msgsent
call packmsg(message,i4Msg6BitWords,itype,.false.) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent,.false.,' ') !Unpack to get msgsent
if(ichk.ne.0) go to 999
call entail(i4Msg6BitWords,i1Msg8BitBytes) !Add tail, make 8-bit bytes
nsym2=206
+5 -38
View File
@@ -23,7 +23,7 @@ subroutine genmsk144(msg0,mygrid,ichk,bcontest,msgsent,i4tone,itype)
character*22 msg0
character*22 message !Message to be generated
character*22 msgsent !Message as it will be received
character*6 mygrid,g1,g2,g3,g4
character*6 mygrid
integer*4 i4Msg6BitWords(13) !72-bit message as 6-bit words
integer*4 i4tone(144) !
integer*1, target:: i1Msg8BitBytes(10) !80 bits represented in 10 bytes
@@ -32,19 +32,15 @@ subroutine genmsk144(msg0,mygrid,ichk,bcontest,msgsent,i4tone,itype)
integer*1 bitseq(144) !Tone #s, data and sync (values 0-1)
integer*1 i1hash(4)
integer*1 s8(8)
logical*1 bcontest
logical bcontest
real*8 pp(12)
real*8 xi(864),xq(864),pi,twopi
data s8/0,1,1,1,0,0,1,0/
equivalence (ihash,i1hash)
logical first,isgrid
logical first
data first/.true./
save
isgrid(g1)=g1(1:1).ge.'A' .and. g1(1:1).le.'R' .and. g1(2:2).ge.'A' .and. &
g1(2:2).le.'R' .and. g1(3:3).ge.'0' .and. g1(3:3).le.'9' .and. &
g1(4:4).ge.'0' .and. g1(4:4).le.'9' .and. g1(1:4).ne.'RR73'
if(first) then
first=.false.
nsym=128
@@ -81,37 +77,8 @@ subroutine genmsk144(msg0,mygrid,ichk,bcontest,msgsent,i4tone,itype)
go to 999
endif
if(bcontest) then
i0=index(message,' R ') + 3 !Check for ' R ' in message
g1=message(i0:i0+3)//' '
if(isgrid(g1)) then !Check for ' R grid'
call grid2deg(g1,dlong,dlat)
dlong=dlong+180.0
if(dlong.gt.180.0) dlong=dlong-360.0
dlat=-dlat
call deg2grid(dlong,dlat,g2) !g2=antipodes grid
message=message(1:i0-3)//g2(1:4) !Send message with g2
endif
endif
call packmsg(message,i4Msg6BitWords,itype) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent) !Unpack to get msgsent
if(bcontest) then
i1=index(msgsent(8:22),' ') + 8
g3=msgsent(i1:i1+3)//' '
if(isgrid(g3)) then
call azdist(mygrid,g3,0.d0,nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter)
if(ndkm.gt.10000) then
call grid2deg(g3,dlong,dlat)
dlong=dlong+180.0
if(dlong.gt.180.0) dlong=dlong-360.0
dlat=-dlat
call deg2grid(dlong,dlat,g4)
msgsent=msgsent(1:i1-1)//'R '//g4(1:4)
endif
endif
endif
call packmsg(message,i4Msg6BitWords,itype,bcontest) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent,bcontest,mygrid) !Unpack to get msgsent
if(ichk.eq.1) go to 999
i4=0
+2 -2
View File
@@ -37,8 +37,8 @@ subroutine genqra64(msg0,ichk,msgsent,itone,itype)
enddo
call chkmsg(message,cok,nspecial,flip)
call packmsg(message,dgen,itype) !Pack message into 72 bits
call unpackmsg(dgen,msgsent) !Unpack to get message sent
call packmsg(message,dgen,itype,.false.) !Pack message into 72 bits
call unpackmsg(dgen,msgsent,.false.,' ') !Unpack to get message sent
if(ichk.ne.0) go to 999 !Return if checking only
call qra64_enc(dgen,sent) !Encode using QRA64
+1 -1
View File
@@ -88,7 +88,7 @@ subroutine hint65(s3,mrs,mrs2,nadd,nflip,mycall,hiscall,hisgrid,qual,decoded)
if(m.eq.2) msg='CQ '//call2(i)//' '//grid2(i)
endif
call fmtmsg(msg,iz)
call packmsg(msg,dgen,itype) !Pack message into 72 bits
call packmsg(msg,dgen,itype,.false.) !Pack message into 72 bits
call rs_encode(dgen,sym_rev) !RS encode
sym(0:62)=sym_rev(62:0:-1)
sym1(0:62,j)=sym
+2 -2
View File
@@ -61,7 +61,7 @@ program JT65code
go to 10
endif
call packmsg(msg1,dgen,itype) !Pack message into 12 six-bit bytes
call packmsg(msg1,dgen,itype,.false.) !Pack message into 12 six-bit bytes
msgtype=""
if(itype.eq.1) msgtype="Std Msg"
if(itype.eq.2) msgtype="Type 1 pfx"
@@ -77,7 +77,7 @@ program JT65code
call graycode(sent,63,-1,tmp) !Remove Gray code
call interleave63(tmp,-1) !Remove interleaving
call rs_decode(tmp,era,0,recd,nerr) !Decode the message
call unpackmsg(recd,decoded) !Unpack the user message
call unpackmsg(recd,decoded,.false.,' ') !Unpack the user message
if(cok.eq."OOO") decoded(20:22)=cok
call fmtmsg(decoded,iz)
+1 -1
View File
@@ -153,7 +153,7 @@ program jt65sim
msg="K1ABC W9XYZ EN37"
!###
call packmsg(msg,dgen,itype) !Pack message into 12 six-bit bytes
call packmsg(msg,dgen,itype,.false.) !Pack message into 12 six-bit bytes
call rs_encode(dgen,sent) !Encode using RS(63,12)
call interleave63(sent,1) !Interleave channel symbols
call graycode65(sent,63,1) !Apply Gray code
+1 -1
View File
@@ -84,7 +84,7 @@ subroutine jt9fano(i1SoftSymbols,limit,nlim,msg)
enddo
call unpackbits(i4DecodedBytes,nbytes,8,i1DecodedBits)
call packbits(i1DecodedBits,12,6,i4Decoded6BitWords)
call unpackmsg(i4Decoded6BitWords,msg) !Unpack decoded msg
call unpackmsg(i4Decoded6BitWords,msg,.false.,' ') !Unpack decoded msg
if(index(msg,'000AAA ').gt.0) msg=' '
endif
+2 -2
View File
@@ -53,8 +53,8 @@ allocate ( codeword(N), decoded(K), message(K) )
allocate ( lratio(N), rxdata(N), rxavgd(N), yy(N), llr(N) )
msg="K9AN K1JT EN50"
call packmsg(msg,i4Msg6BitWords,itype) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent) !Unpack to get msgsent
call packmsg(msg,i4Msg6BitWords,itype,.false.) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent,.false.,' ') !Unpack to get msgsent
write(*,*) "message sent ",msgsent
i4=0
+13 -6
View File
@@ -392,7 +392,7 @@ subroutine packbits(dbits,nsymd,m0,sym)
900 return
end subroutine unpackgrid
subroutine packmsg(msg0,dat,itype)
subroutine packmsg(msg0,dat,itype,bcontest)
! Packs a JT4/JT9/JT65 message into twelve 6-bit symbols
@@ -413,10 +413,15 @@ subroutine packbits(dbits,nsymd,m0,sym)
character*12 c1,c2
character*4 c3
character*6 grid6
logical text1,text2,text3
logical text1,text2,text3,bcontest
msg=msg0
itype=1
if(bcontest) then
call to_contest_msg(msg0,msg)
else
msg=msg0
end if
call fmtmsg(msg,iz)
if(msg(1:6).eq.'CQ DX ') msg(3:3)='9'
@@ -525,13 +530,13 @@ subroutine packbits(dbits,nsymd,m0,sym)
return
end subroutine packmsg
subroutine unpackmsg(dat,msg)
subroutine unpackmsg(dat,msg,bcontest,mygrid)
parameter (NBASE=37*36*10*27*27*27)
parameter (NGBASE=180*180)
integer dat(:)
character c1*12,c2*12,grid*4,msg*22,grid6*6,psfx*4,junk2*4
logical cqnnn
character c1*12,c2*12,grid*4,msg*22,grid6*6,psfx*4,junk2*4,mygrid*6
logical cqnnn,bcontest
cqnnn=.false.
nc1=ishft(dat(1),22) + ishft(dat(2),16) + ishft(dat(3),10)+ &
@@ -645,6 +650,8 @@ subroutine packbits(dbits,nsymd,m0,sym)
msg(4:4).ge.'A' .and. msg(4:4).le.'Z' .and. &
msg(5:5).eq.' ') msg='CQ '//msg(3:)
if(bcontest) call fix_contest_msg(mygrid,msg)
return
end subroutine unpackmsg
+1 -1
View File
@@ -128,7 +128,7 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
10 decoded=' '
if(irc.ge.0) then
call unpackmsg(dat4,decoded) !Unpack the user message
call unpackmsg(dat4,decoded,.false.,' ') !Unpack the user message
call fmtmsg(decoded,iz)
if(index(decoded,"000AAA ").ge.1) then
! Suppress a certain type of garbage decode.
+2 -2
View File
@@ -34,7 +34,7 @@ program QRA64code
msg0=msg !Input message
call chkmsg(msg,cok,nspecial,flip) !See if it includes "OOO" report
msg1=msg !Message without "OOO"
call packmsg(msg1,dgen,itype) !Pack message into 12 six-bit bytes
call packmsg(msg1,dgen,itype,.false.) !Pack message into 12 six-bit bytes
msgtype=""
if(itype.eq.1) msgtype="Std Msg"
if(itype.eq.2) msgtype="Type 1 pfx"
@@ -45,7 +45,7 @@ program QRA64code
call qra64_enc(dgen,sent) !Encode using QRA64
call unpackmsg(dgen,decoded) !Unpack the user message
call unpackmsg(dgen,decoded,.false.,' ') !Unpack the user message
call fmtmsg(decoded,iz)
ii=imsg
write(*,1020) ii,msg0,decoded,itype,msgtype
+7 -3
View File
@@ -1,11 +1,15 @@
logical*1 function stdmsg(msg0)
function stdmsg(msg0,bcontest,mygrid)
use iso_c_binding, only: c_bool
use packjt
character*22 msg0,msg
character*6 mygrid
integer dat(12)
logical(c_bool), value :: bcontest
logical(c_bool) :: stdmsg
call packmsg(msg0,dat,itype)
call unpackmsg(dat,msg)
call packmsg(msg0,dat,itype,logical(bcontest))
call unpackmsg(dat,msg,logical(bcontest),mygrid)
stdmsg=(msg.eq.msg0) .and. (itype.ge.0) .and. itype.ne.6
return
+1 -1
View File
@@ -294,7 +294,7 @@ subroutine syncmsk(cdat,npts,jpk,ipk,idf,rmax,snr,metric,decoded)
1012 format(9b8.8)
read(c72,1014) i4Msg6BitWords
1014 format(12b6.6)
call unpackmsg(i4Msg6BitWords,decoded) !Unpack to get msgsent
call unpackmsg(i4Msg6BitWords,decoded,.false.,' ') !Unpack to get msgsent
endif
if(decoded.ne.' ') exit
enddo