summaryrefslogtreecommitdiff
path: root/lib/superfox/sfoxsim.f90
diff options
context:
space:
mode:
Diffstat (limited to 'lib/superfox/sfoxsim.f90')
-rw-r--r--lib/superfox/sfoxsim.f907
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/superfox/sfoxsim.f90 b/lib/superfox/sfoxsim.f90
index 86f7019e..1b4bb9f2 100644
--- a/lib/superfox/sfoxsim.f90
+++ b/lib/superfox/sfoxsim.f90
@@ -11,6 +11,7 @@ program sfoxsim
type(hdr) h !Header for .wav file
logical*1 bMoreCQs !Include a CQ when space available?
logical*1 bSendMsg !Send a Free text message
+ integer pack_error
integer*2 iwave(NMAX) !Generated i*2 waveform
integer isync(24) !Indices of sync symbols
integer itone(151) !Symbol values, data and sync
@@ -112,7 +113,8 @@ program sfoxsim
! Generate a SuperFox message
nslots=5
call foxgen2(nslots,cmsg,line,foxcall) !Parse old-style Fox messages
- call sfox_pack(line,ckey,bMoreCQs,bSendMsg,text_msg,xin)
+ call sfox_pack(line,ckey,bMoreCQs,bSendMsg,text_msg,xin,pack_error)
+ if(pack_error.ne.0) error stop 'SuperFox pack failed'
call qpc_encode(y,xin)
y=cshift(y,1)
@@ -137,6 +139,7 @@ program sfoxsim
xdt=ran1(idum)-0.5
endif
! Generate cdat, the SuperFox waveform
+ cdat=0.
call sfox_gen_gfsk(chansym,f1,isync,itone,cdat)
crcvd=0.
@@ -156,7 +159,7 @@ program sfoxsim
nmin=(nsec-nhr*3600)/60
nsec=mod(nsec,60)
write(fname(8:13),'(3i2.2)') nhr,nmin,nsec
- open(10,file=trim(fname),access='stream',status='unknown')
+ open(10,file=trim(fname),access='stream',status='replace')
write(10) h,iwave(1:NMAX) !Save the .wav file
close(10)
enddo ! ifile