summaryrefslogtreecommitdiff
path: root/lib/superfox/sftx.f90
diff options
context:
space:
mode:
Diffstat (limited to 'lib/superfox/sftx.f90')
-rw-r--r--lib/superfox/sftx.f9021
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/superfox/sftx.f90 b/lib/superfox/sftx.f90
index 78b5ca15..d629eb7d 100644
--- a/lib/superfox/sftx.f90
+++ b/lib/superfox/sftx.f90
@@ -17,22 +17,15 @@ program sftx
character*120 line !List of SuperFox message pieces
character*40 cmsg(5) !Old-style Fox messages
character*26 freeTextMsg
- character*2 arg
character*10 ckey
! character*9 foxkey
character*11 foxcall0,foxcall
logical*1 bMoreCQs,bSendMsg
- logical crc_ok
- real py(0:127,0:127) !Probabilities for received synbol values
- integer*8 n47
+ integer pack_error
integer itone(151) !SuperFox channel-symbol values
integer*1 xin(0:49) !Packed message as 7-bit symbols
- integer*1 xdec(0:49) !Decoded message
integer*1 y(0:127) !Encoded symbols as i*1 integers
- integer*1 ydec(0:127) !Decoded codeword
- integer*1 yy(0:10)
integer chansym0(127) !Transmitted symbols, data only
- integer chansym(127) !Received symbols, data only
integer isync(24) !Symbol numbers for sync tones
data isync/1,2,4,7,11,16,22,29,37,39,42,43,45,48,52,57,63,70,78,80, &
83,84,86,89/
@@ -70,15 +63,21 @@ program sftx
freeTextMsg=' '
bMoreCQs=cmsg(1)(40:40).eq.'1'
bSendMsg=cmsg(nslots)(39:39).eq.'1'
+ nDataSlots=nslots
if(bSendMsg) then
freeTextMsg=cmsg(nslots)(1:26)
- if(nslots.gt.2) nslots=2
+ nDataSlots=nslots-1
+ if(nDataSlots.gt.4) nDataSlots=4
endif
- call foxgen2(nslots,cmsg,line,foxcall) !Parse old-style Fox messages
+ call foxgen2(nDataSlots,cmsg,line,foxcall) !Parse old-style Fox messages
! Pack message information and CRC into xin(0:49)
- call sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
+ call sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin,pack_error)
+ if(pack_error.ne.0) then
+ itone=-99
+ go to 100
+ endif
call qpc_encode(y,xin) !Encode the message to 128 symbols
y=cshift(y,1) !Puncture the code by removing y(0)
y(127)=0