diff options
| author | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
| commit | c25cbdf6fb6d946175f4335fab77bfea601b56db (patch) | |
| tree | 6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /lib/qra/q65/q65_encoding_modules.f90 | |
| parent | 71f5689252c9f13e70e1c24856904475b2307809 (diff) | |
| parent | 0685fcada9f95fe90f70b387cd7d757da8209624 (diff) | |
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'lib/qra/q65/q65_encoding_modules.f90')
| -rw-r--r-- | lib/qra/q65/q65_encoding_modules.f90 | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/lib/qra/q65/q65_encoding_modules.f90 b/lib/qra/q65/q65_encoding_modules.f90 index 4988dd4d..3f749d5b 100644 --- a/lib/qra/q65/q65_encoding_modules.f90 +++ b/lib/qra/q65/q65_encoding_modules.f90 @@ -164,10 +164,10 @@ subroutine get_q65crc12(mc2,ncrc1,ncrc2) end subroutine get_q65crc12 -subroutine get_q65_tones(msg37,codeword,itone) +subroutine get_q65_tones(msg37,codeword,itone,msgsent,success) use packjt77 implicit none - character*37 msg37 + character*37 msg37,msgsent character*77 c77 character*6 c6 integer codeword(65) @@ -175,16 +175,36 @@ subroutine get_q65_tones(msg37,codeword,itone) integer message(15) integer shortcodeword(63) integer itone(85) - integer i,j,k + integer i,j,k,ios,pack_status,ng15 integer*1 mbits(90) integer i3,n3,ncrc1,ncrc2 + logical success,unpk77_success data sync/1,9,12,13,15,22,23,26,27,33,35,38,46,50,55,60,62,66,69,74,76,85/ i3=-1 n3=-1 - call pack77(msg37,i3,n3,c77) + c77=' ' + codeword=0 + itone=0 + msgsent='*** bad message *** ' + success=.false. + call pack77_legacy_truncating_fallback(msg37,i3,n3,c77, & + status=pack_status) + if(pack_status.ne.PACK77_STATUS_ENCODED) return + read(c77(60:74),'(b15)',iostat=ios) ng15 + if(ios.ne.0) return + if(ng15.eq.32373) c77(60:74)='111111010010011' !Message is RR73 + call unpack77(c77,0,msgsent,unpk77_success) + if(.not.unpk77_success) then + msgsent='*** bad message *** ' + return + endif mbits=0 - read(c77,'(77i1)') mbits(1:77) + read(c77,'(77i1)',iostat=ios) mbits(1:77) + if(ios.ne.0) then + msgsent='*** bad message *** ' + return + endif ! Message is 77 bits long. Add a 0 bit to create a 78-bit message and pad with ! 12 zeros to create 90-bit mbit array for CRC calculation. @@ -216,6 +236,7 @@ subroutine get_q65_tones(msg37,codeword,itone) itone(i)=shortcodeword(k)+1 endif enddo + success=.true. end subroutine get_q65_tones end module q65_encoding |
