Apply the QU1RKS patch to SF i3=0 messages, and some code cleanup.

This commit is contained in:
Joe Taylor 2024-09-25 10:49:00 -04:00
parent 3fc573f4e1
commit f01239c000
2 changed files with 20 additions and 20 deletions

View File

@ -4,6 +4,7 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
use packjt
use packjt77
use julian
parameter (NQU1RKS=203514677)
integer*8 n47,n58,now
integer*1 xin(0:49) !Packed message as 7-bit symbols
logical*1 bMoreCQs,bSendMsg
@ -19,6 +20,8 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
i0=index(line,'/')
i3=0 !Default to i3=0, standard message
nh1=0 !Number of Hound calls with RR73
nh2=0 !Number of Hound calls with report
! Split the command line into words
w=' '
@ -50,9 +53,9 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
now=itime8()/30
now=30*now
read(ckey(5:10),*) nsignature
read(ckey(5:10),*) notp
write(msgbits(307:326),'(b20.20)') nsignature !Insert the digital signature
write(msgbits(307:326),'(b20.20)') notp !Insert the digital signature
if(w(1)(1:3).eq.'CQ ') then
i3=3
@ -70,8 +73,6 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
call pack28(w(1),n28) !Fox call
write(msgbits(1:28),'(b28.28)') n28
nh1=0 !Number of Hound calls with RR73
nh2=0 !Number of Hound calls with report
! Default report is RR73 if we're also sending a free text message.
if(bSendMsg) msgbits(141:160)='11111111111111111111'
@ -138,6 +139,15 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
endif
if(bMoreCQs) msgbits(306:306)='1'
read(msgbits(327:329),'(b3)') i3
if(i3.eq.0) then
do i=1,9
i0=i*28 + 1
read(msgbits(i0:i0+27),'(b28)') n28
if(n28.eq.0) write(msgbits(i0:i0+27),'(b28.28)') NQU1RKS
enddo
endif
read(msgbits,1004) xin(0:46)
1004 format(47b7)
@ -151,7 +161,5 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
xin=xin(49:0:-1) !Reverse the symbol order
! NB: CRC is now in first three symbols, fox call in the last four.
read(msgbits(327:329),'(b3)') i3
return
end subroutine sfox_pack

View File

@ -1,6 +1,7 @@
subroutine sfox_unpack(nutc,x,nsnr,f0,dt0,foxcall,nsignature)
subroutine sfox_unpack(nutc,x,nsnr,f0,dt0,foxcall,notp)
use packjt77
parameter (NQU1RKS=203514677)
integer*1 x(0:49)
integer*8 n58
logical success
@ -15,7 +16,7 @@ subroutine sfox_unpack(nutc,x,nsnr,f0,dt0,foxcall,nsignature)
data c/' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ/'/
ncq=0
if (nsignature.eq.0) then
if (notp.eq.0) then
use_otp = .FALSE.
else
use_otp = .TRUE.
@ -25,7 +26,6 @@ subroutine sfox_unpack(nutc,x,nsnr,f0,dt0,foxcall,nsignature)
read(msgbits(327:329),'(b6)') i3 !Message type
read(msgbits(1:28),'(b28)') n28 !Standard Fox call
call unpack28(n28,foxcall,success)
! print*,'aa',i3,foxcall
if(i3.eq.1) then !Compound Fox callsign
! read(msgbits(87:101),'(b15)') n15
@ -40,7 +40,6 @@ subroutine sfox_unpack(nutc,x,nsnr,f0,dt0,foxcall,nsignature)
if(freeTextMsg(i:i).ne.'.') exit
freeTextMsg(i:i)=' '
enddo
! print*,'aa1 ',freeTextMsg
write(*,1100) nutc,nsnr,dt0,nint(f0),freeTextMsg
1100 format(i6.6,i4,f5.1,i5,1x,"~",2x,a)
else if(i3.eq.3) then !CQ FoxCall Grid
@ -69,7 +68,6 @@ subroutine sfox_unpack(nutc,x,nsnr,f0,dt0,foxcall,nsignature)
j=281
iz=4 !Max number of reports
if(i3.eq.2) j=141
! print*,'aa2',j,iz
do i=1,iz !Extract the reports
read(msgbits(j:j+4),'(b5)') n
if(n.eq.31) then
@ -79,27 +77,22 @@ subroutine sfox_unpack(nutc,x,nsnr,f0,dt0,foxcall,nsignature)
1006 format(i3.2)
if(crpt(i)(1:1).eq.' ') crpt(i)(1:1)='+'
endif
! print*,'aa3',i,n,crpt(i)
j=j+5
enddo
! Unpack Hound callsigns and format user-level messages:
iz=9 !Max number of hound calls
if(i3.eq.2 .or. i3.eq.3) iz=4
! print*,'bb',i3,iz
! print*,msgbits
do i=1,iz
j=28*i + 1
read(msgbits(j:j+27),'(b28)') n28
call unpack28(n28,c13,success)
! print*,'cc',i,j,n28
if(n28.eq.0) cycle
if(n28.eq.0 .or. n28.eq.NQU1RKS) cycle
msg(i)=trim(c13)//' '//trim(foxcall)
if(msg(i)(1:3).eq.'CQ ') then
ncq=ncq+1
else
if(i3.eq.2) then
! print*,'dd',i,crpt(i)
msg(i)=trim(msg(i))//' '//crpt(i)
else
if(i.le.5) msg(i)=trim(msg(i))//' RR73'
@ -115,10 +108,9 @@ subroutine sfox_unpack(nutc,x,nsnr,f0,dt0,foxcall,nsignature)
write(*,1100) nutc,nsnr,dt0,nint(f0),'CQ '//foxcall
endif
100 read(msgbits(307:326),'(b20)') nsignature
! print*,'i3:',i3
100 read(msgbits(307:326),'(b20)') notp
if (use_otp) then
write(ssignature,'(I6.6)') nsignature
write(ssignature,'(I6.6)') notp
write(*,1100) nutc,nsnr,dt0,nint(f0),'$VERIFY$ '//trim(foxcall)//' '//trim(ssignature)
endif
return