mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-04 23:22:26 -04:00
Apply the QU1RKS patch to SF i3=0 messages, and some code cleanup.
This commit is contained in:
parent
3fc573f4e1
commit
f01239c000
@ -4,6 +4,7 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
|
|||||||
use packjt
|
use packjt
|
||||||
use packjt77
|
use packjt77
|
||||||
use julian
|
use julian
|
||||||
|
parameter (NQU1RKS=203514677)
|
||||||
integer*8 n47,n58,now
|
integer*8 n47,n58,now
|
||||||
integer*1 xin(0:49) !Packed message as 7-bit symbols
|
integer*1 xin(0:49) !Packed message as 7-bit symbols
|
||||||
logical*1 bMoreCQs,bSendMsg
|
logical*1 bMoreCQs,bSendMsg
|
||||||
@ -19,6 +20,8 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
|
|||||||
|
|
||||||
i0=index(line,'/')
|
i0=index(line,'/')
|
||||||
i3=0 !Default to i3=0, standard message
|
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
|
! Split the command line into words
|
||||||
w=' '
|
w=' '
|
||||||
@ -50,9 +53,9 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
|
|||||||
|
|
||||||
now=itime8()/30
|
now=itime8()/30
|
||||||
now=30*now
|
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
|
if(w(1)(1:3).eq.'CQ ') then
|
||||||
i3=3
|
i3=3
|
||||||
@ -70,8 +73,6 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
|
|||||||
|
|
||||||
call pack28(w(1),n28) !Fox call
|
call pack28(w(1),n28) !Fox call
|
||||||
write(msgbits(1:28),'(b28.28)') n28
|
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.
|
! Default report is RR73 if we're also sending a free text message.
|
||||||
if(bSendMsg) msgbits(141:160)='11111111111111111111'
|
if(bSendMsg) msgbits(141:160)='11111111111111111111'
|
||||||
@ -138,6 +139,15 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
|
|||||||
endif
|
endif
|
||||||
if(bMoreCQs) msgbits(306:306)='1'
|
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)
|
read(msgbits,1004) xin(0:46)
|
||||||
1004 format(47b7)
|
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
|
xin=xin(49:0:-1) !Reverse the symbol order
|
||||||
! NB: CRC is now in first three symbols, fox call in the last four.
|
! NB: CRC is now in first three symbols, fox call in the last four.
|
||||||
|
|
||||||
read(msgbits(327:329),'(b3)') i3
|
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine sfox_pack
|
end subroutine sfox_pack
|
||||||
|
@ -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
|
use packjt77
|
||||||
|
parameter (NQU1RKS=203514677)
|
||||||
integer*1 x(0:49)
|
integer*1 x(0:49)
|
||||||
integer*8 n58
|
integer*8 n58
|
||||||
logical success
|
logical success
|
||||||
@ -15,7 +16,7 @@ subroutine sfox_unpack(nutc,x,nsnr,f0,dt0,foxcall,nsignature)
|
|||||||
data c/' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ/'/
|
data c/' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ/'/
|
||||||
|
|
||||||
ncq=0
|
ncq=0
|
||||||
if (nsignature.eq.0) then
|
if (notp.eq.0) then
|
||||||
use_otp = .FALSE.
|
use_otp = .FALSE.
|
||||||
else
|
else
|
||||||
use_otp = .TRUE.
|
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(327:329),'(b6)') i3 !Message type
|
||||||
read(msgbits(1:28),'(b28)') n28 !Standard Fox call
|
read(msgbits(1:28),'(b28)') n28 !Standard Fox call
|
||||||
call unpack28(n28,foxcall,success)
|
call unpack28(n28,foxcall,success)
|
||||||
! print*,'aa',i3,foxcall
|
|
||||||
|
|
||||||
if(i3.eq.1) then !Compound Fox callsign
|
if(i3.eq.1) then !Compound Fox callsign
|
||||||
! read(msgbits(87:101),'(b15)') n15
|
! 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
|
if(freeTextMsg(i:i).ne.'.') exit
|
||||||
freeTextMsg(i:i)=' '
|
freeTextMsg(i:i)=' '
|
||||||
enddo
|
enddo
|
||||||
! print*,'aa1 ',freeTextMsg
|
|
||||||
write(*,1100) nutc,nsnr,dt0,nint(f0),freeTextMsg
|
write(*,1100) nutc,nsnr,dt0,nint(f0),freeTextMsg
|
||||||
1100 format(i6.6,i4,f5.1,i5,1x,"~",2x,a)
|
1100 format(i6.6,i4,f5.1,i5,1x,"~",2x,a)
|
||||||
else if(i3.eq.3) then !CQ FoxCall Grid
|
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
|
j=281
|
||||||
iz=4 !Max number of reports
|
iz=4 !Max number of reports
|
||||||
if(i3.eq.2) j=141
|
if(i3.eq.2) j=141
|
||||||
! print*,'aa2',j,iz
|
|
||||||
do i=1,iz !Extract the reports
|
do i=1,iz !Extract the reports
|
||||||
read(msgbits(j:j+4),'(b5)') n
|
read(msgbits(j:j+4),'(b5)') n
|
||||||
if(n.eq.31) then
|
if(n.eq.31) then
|
||||||
@ -79,27 +77,22 @@ subroutine sfox_unpack(nutc,x,nsnr,f0,dt0,foxcall,nsignature)
|
|||||||
1006 format(i3.2)
|
1006 format(i3.2)
|
||||||
if(crpt(i)(1:1).eq.' ') crpt(i)(1:1)='+'
|
if(crpt(i)(1:1).eq.' ') crpt(i)(1:1)='+'
|
||||||
endif
|
endif
|
||||||
! print*,'aa3',i,n,crpt(i)
|
|
||||||
j=j+5
|
j=j+5
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
! Unpack Hound callsigns and format user-level messages:
|
! Unpack Hound callsigns and format user-level messages:
|
||||||
iz=9 !Max number of hound calls
|
iz=9 !Max number of hound calls
|
||||||
if(i3.eq.2 .or. i3.eq.3) iz=4
|
if(i3.eq.2 .or. i3.eq.3) iz=4
|
||||||
! print*,'bb',i3,iz
|
|
||||||
! print*,msgbits
|
|
||||||
do i=1,iz
|
do i=1,iz
|
||||||
j=28*i + 1
|
j=28*i + 1
|
||||||
read(msgbits(j:j+27),'(b28)') n28
|
read(msgbits(j:j+27),'(b28)') n28
|
||||||
call unpack28(n28,c13,success)
|
call unpack28(n28,c13,success)
|
||||||
! print*,'cc',i,j,n28
|
if(n28.eq.0 .or. n28.eq.NQU1RKS) cycle
|
||||||
if(n28.eq.0) cycle
|
|
||||||
msg(i)=trim(c13)//' '//trim(foxcall)
|
msg(i)=trim(c13)//' '//trim(foxcall)
|
||||||
if(msg(i)(1:3).eq.'CQ ') then
|
if(msg(i)(1:3).eq.'CQ ') then
|
||||||
ncq=ncq+1
|
ncq=ncq+1
|
||||||
else
|
else
|
||||||
if(i3.eq.2) then
|
if(i3.eq.2) then
|
||||||
! print*,'dd',i,crpt(i)
|
|
||||||
msg(i)=trim(msg(i))//' '//crpt(i)
|
msg(i)=trim(msg(i))//' '//crpt(i)
|
||||||
else
|
else
|
||||||
if(i.le.5) msg(i)=trim(msg(i))//' RR73'
|
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
|
write(*,1100) nutc,nsnr,dt0,nint(f0),'CQ '//foxcall
|
||||||
endif
|
endif
|
||||||
|
|
||||||
100 read(msgbits(307:326),'(b20)') nsignature
|
100 read(msgbits(307:326),'(b20)') notp
|
||||||
! print*,'i3:',i3
|
|
||||||
if (use_otp) then
|
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)
|
write(*,1100) nutc,nsnr,dt0,nint(f0),'$VERIFY$ '//trim(foxcall)//' '//trim(ssignature)
|
||||||
endif
|
endif
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user