mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 12:23:37 -05:00
1. General code cleanup. Most compiler warning messages have been silenced.
2. "/A" added to list of optional callsign suffixes. 3. Improved algorithm for measuring error in soundcard sample rates. 4. Optional 5-sec shift of input data, to catch some clock errors. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@274 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
daa2ffd27a
commit
8c9ed820c8
@ -6,6 +6,7 @@
|
||||
3V8BB,JM56ER,EME,,,,,06/02
|
||||
3V8SS,JM55GX,EME,,Expedition,,144: 16JXX and 1kw,12/05
|
||||
3Y0X,EC41RE,EME,,Expedition,,144: 4x 9el 350W,02/06
|
||||
4F2KWT,PK06,EME,,
|
||||
4J1FS,KP40,,,Expedition,,,1990
|
||||
4N7AX,KN05PC,,,,,144: 200 W 2x10el 9BVtx1500/rx3000lpm DSP,08/00
|
||||
4O4AR,JN94AS,,,=YU4AR,,144: TR9130 250W 10el PA0MS-ant PreampUHER 15,11/02
|
||||
|
@ -107,8 +107,9 @@ wsjt6: @NEEDPORTAUDIO@ Audio.so #wsjt.spec
|
||||
# ${PYTHON} c:\python23\installer\Build.py wsjt.spec
|
||||
# ${RM} wsjt6
|
||||
|
||||
#
|
||||
#
|
||||
deep65.o: deep65.F
|
||||
$(FC) -c -O0 -Wall deep65.F
|
||||
|
||||
Audio.so: $(OBJS2C) $(OBJS3C) $(OBJS2F77) $(SRCS2F90) $(AUDIOSRCS)
|
||||
${F2PY} -c --quiet --opt="-O ${CFLAGS} \
|
||||
-fno-second-underscore" $(OBJS2C) $(OBJS2F77) -m Audio \
|
||||
|
27
Makefile.win
27
Makefile.win
@ -2,8 +2,10 @@
|
||||
!include <dfinc.mak> #Some definitions for Compaq Visual Fortran
|
||||
gcc = cl
|
||||
FC = df
|
||||
#To do bounds checking (with useless reports) put "/check:all" in the
|
||||
# --opt= line below (line 56, more or less ...)
|
||||
#FFLAGS = /traceback /check:all
|
||||
FFLAGS = /traceback /fast
|
||||
FFLAGS = /traceback /fast /nologo
|
||||
|
||||
all: JT65code.exe WSJT6.EXE
|
||||
|
||||
@ -16,7 +18,7 @@ OBJS1 = JT65code.obj nchar.obj grid2deg.obj packmsg.obj packtext.obj \
|
||||
wrapkarn.obj
|
||||
|
||||
JT65code.exe: $(OBJS1)
|
||||
$(FC) /exe:JT65code.exe $(OBJS1)
|
||||
$(FC) $(FFLAGS) /exe:JT65code.exe $(OBJS1)
|
||||
|
||||
|
||||
OBJS2C = init_rs.o encode_rs.o decode_rs.o jtaudio.o
|
||||
@ -51,7 +53,8 @@ WSJT6.EXE: Audio.pyd wsjt.spec
|
||||
Audio.pyd: $(OBJS2C) $(SRCS2F90) $(SRCS2F77) $(SRCS2C)
|
||||
python f2py.py -c \
|
||||
--quiet --"fcompiler=compaqv" \
|
||||
--opt="/traceback /fast /fpp /define:Win32 /define:USE_PORTAUDIO" \
|
||||
--opt="/nologo /traceback /warn:errors /fast /fpp /define:Win32 \
|
||||
/define:USE_PORTAUDIO" \
|
||||
$(OBJS2C) \
|
||||
-lwinmm -lpa -llibsamplerate \
|
||||
-m Audio \
|
||||
@ -63,31 +66,31 @@ wsjt.spec: wsjt.py astro.py g.py options.py palettes.py smeter.py specjt.py
|
||||
--tk --onefile wsjt.py
|
||||
|
||||
jtaudio.o: jtaudio.c
|
||||
cl /c /DWin32 /Fojtaudio.o jtaudio.c
|
||||
$(CC) /nologo /c /DWin32 /Fojtaudio.o jtaudio.c
|
||||
|
||||
init_rs.obj: init_rs.c
|
||||
$(CC) /c /DBIGSYM=1 init_rs.c
|
||||
$(CC) /nologo /c /DBIGSYM=1 init_rs.c
|
||||
|
||||
init_rs.o: init_rs.obj
|
||||
$(CC) /c /DBIGSYM=1 /Foinit_rs.o init_rs.c
|
||||
$(CC) /nologo /c /DBIGSYM=1 /Foinit_rs.o init_rs.c
|
||||
|
||||
encode_rs.obj: encode_rs.c
|
||||
$(CC) /c /DBIGSYM=1 encode_rs.c
|
||||
$(CC) /nologo /c /DBIGSYM=1 encode_rs.c
|
||||
|
||||
encode_rs.o: encode_rs.c
|
||||
$(CC) /c /DBIGSYM=1 /Foencode_rs.o encode_rs.c
|
||||
$(CC) /nologo /c /DBIGSYM=1 /Foencode_rs.o encode_rs.c
|
||||
|
||||
decode_rs.obj: decode_rs.c
|
||||
$(CC) /c /DBIGSYM=1 decode_rs.c
|
||||
$(CC) /nologo /c /DBIGSYM=1 decode_rs.c
|
||||
|
||||
decode_rs.o: decode_rs.c
|
||||
$(CC) /c /DBIGSYM=1 /Ox /Zd /Fodecode_rs.o decode_rs.c
|
||||
$(CC) /nologo /c /DBIGSYM=1 /Ox /Zd /Fodecode_rs.o decode_rs.c
|
||||
|
||||
wrapkarn.obj: wrapkarn.c
|
||||
$(CC) /c /DWin32=1 wrapkarn.c
|
||||
$(CC) /nologo /c /DWin32=1 wrapkarn.c
|
||||
|
||||
igray.obj: igray.c
|
||||
$(CC) /c /DWin32=1 igray.c
|
||||
$(CC) /nologo /c /DWin32=1 igray.c
|
||||
|
||||
.PHONY : clean
|
||||
|
||||
|
@ -1,11 +1,8 @@
|
||||
subroutine abc441(msg,nmsg,itone,ndits)
|
||||
|
||||
character msg*28,msg2*29
|
||||
character msg*28
|
||||
integer itone(84)
|
||||
integer lookup(0:91)
|
||||
integer codeword4(4,0:42)
|
||||
integer codeword7(7,0:42)
|
||||
character c*1
|
||||
character cc*43
|
||||
data cc/' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.,?/#$'/
|
||||
data lookup/13, 15, 17, 46, 47, 45, 44, 12, 11, 14, &
|
||||
|
4
astro.F
4
astro.F
@ -7,10 +7,6 @@ C Computes astronomical quantities for display in JT65, CW, and EME Echo mode.
|
||||
C NB: may want to smooth the Tsky map to 10 degrees or so.
|
||||
|
||||
character*80 AppDir,fname
|
||||
character*240 Display
|
||||
character*14 d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15
|
||||
character*14 d1a,d2a,d3a
|
||||
character*2 crlf
|
||||
character*6 MyGrid,HisGrid
|
||||
logical first,ltsky
|
||||
real LST
|
||||
|
@ -10,7 +10,6 @@ subroutine astro0(nyear,month,nday,uth8,nfreq,grid,cauxra,cauxdec, &
|
||||
|
||||
character grid*6
|
||||
character*9 cauxra,cauxdec
|
||||
real*8 utch8
|
||||
real*8 AzSun8,ElSun8,AzMoon8,ElMoon8,AzMoonB8,ElMoonB8,AzAux8,ElAux8
|
||||
real*8 dbMoon8,RAMoon8,DecMoon8,HA8,Dgrd8,xnr8,dfdt,dfdt0
|
||||
real*8 sd8,poloffset8
|
||||
|
@ -7,7 +7,6 @@ subroutine audio_init(ndin,ndout)
|
||||
external a2d,decode1
|
||||
#endif
|
||||
|
||||
integer*2 a(225000) !Pixel values for 750 x 300 array
|
||||
integer brightness,contrast
|
||||
include 'gcom1.f90'
|
||||
include 'gcom2.f90'
|
||||
|
@ -1,5 +1,5 @@
|
||||
subroutine avemsg65(mseg,mode65,ndepth,decoded,nused,
|
||||
+ nq1,nq2,neme,nsked,flip,mycall,hiscall,hisgrid,qual,
|
||||
+ nq1,nq2,neme,nsked,mycall,hiscall,hisgrid,qual,
|
||||
+ ns,ncount)
|
||||
|
||||
C Decodes averaged JT65 data for the specified segment (mseg=1 or 2).
|
||||
@ -36,7 +36,7 @@ C Compute the average of all flagged spectra for this segment.
|
||||
enddo
|
||||
|
||||
nadd=nused*mode65
|
||||
call extract(s3,nadd,ndepth,ncount,decoded) !Extract the message
|
||||
call extract(s3,nadd,ncount,decoded) !Extract the message
|
||||
if(ncount.lt.0) decoded=' '
|
||||
|
||||
nqual=0
|
||||
@ -48,6 +48,9 @@ C Possibly should pass nadd=nused, also:
|
||||
nqual=qual
|
||||
if(nqual.lt.nq1) deepmsg=' '
|
||||
if(nqual.ge.nq1 .and. nqual.lt.nq2) deepmsg(19:19)='?'
|
||||
else
|
||||
deepmsg=' '
|
||||
qual=0.
|
||||
endif
|
||||
if(ncount.lt.0) decoded=deepmsg
|
||||
|
||||
|
2
avesp2.f
2
avesp2.f
@ -1,4 +1,4 @@
|
||||
subroutine avesp2(dat,jza,nadd,f0,mode,NFreeze,MouseDF,
|
||||
subroutine avesp2(dat,jza,nadd,mode,NFreeze,MouseDF,
|
||||
+ DFTolerance,fzap)
|
||||
|
||||
real dat(jza)
|
||||
|
@ -9,7 +9,7 @@ subroutine decode1(iarg)
|
||||
use dflib
|
||||
#endif
|
||||
|
||||
character sending0*28,fcum*80,mode0*6,cshort*11
|
||||
character sending0*28,mode0*6,cshort*11
|
||||
integer sendingsh0
|
||||
|
||||
include 'gcom1.f90'
|
||||
|
@ -5,7 +5,6 @@ subroutine decode2
|
||||
! Get data and parameters from gcom, then call the decoders
|
||||
|
||||
character fnamex*24
|
||||
integer*2 d2d(30*11025)
|
||||
|
||||
include 'gcom1.f90'
|
||||
include 'gcom2.f90'
|
||||
|
21
decode3.F90
21
decode3.F90
@ -5,12 +5,9 @@ subroutine decode3(d2,jz,istart,filename)
|
||||
use dfport
|
||||
#endif
|
||||
|
||||
integer*2 d2(jz),d2d(60*11025)
|
||||
real*8 sq
|
||||
integer*2 d2(jz),d2d(65*11025)
|
||||
character*24 filename
|
||||
character FileID*40
|
||||
character mycall0*12,hiscall0*12,hisgrid0*6
|
||||
logical savefile
|
||||
include 'gcom1.f90'
|
||||
include 'gcom2.f90'
|
||||
|
||||
@ -51,10 +48,20 @@ subroutine decode3(d2,jz,istart,filename)
|
||||
endif
|
||||
|
||||
open(23,file=appdir(:lenappdir)//'/CALL3.TXT',status='unknown')
|
||||
if(nadd5.eq.1) then
|
||||
nzero=5*11025
|
||||
do i=jz,nzero+1,-1
|
||||
d2d(i)=d2d(i-nzero)
|
||||
enddo
|
||||
do i=1,nzero
|
||||
d2d(i)=0
|
||||
enddo
|
||||
jz=min(60*11025,jz+nzero)
|
||||
endif
|
||||
call wsjt1(d2d,jz,istart,samfacin,FileID,ndepth,MinSigdB, &
|
||||
NQRN,DFTolerance,NSaveCum,MouseButton,NClearAve, &
|
||||
nMode,NFreeze,NAFC,NZap,AppDir,utcdate,mode441,mode65, &
|
||||
MyCall,HisCall,HisGrid,neme,nsked,naggressive,ntx2,s2, &
|
||||
NQRN,DFTolerance,MouseButton,NClearAve, &
|
||||
nMode,NFreeze,NAFC,NZap,mode65, &
|
||||
MyCall,HisCall,HisGrid,neme,nsked,ntx2,s2, &
|
||||
ps0,npkept,lumsg,basevb,rmspower,nslim2,psavg,ccf,Nseg, &
|
||||
MouseDF,NAgain,LDecoded,nspecial,ndf,ss1,ss2)
|
||||
close(23)
|
||||
|
@ -1,5 +1,5 @@
|
||||
subroutine decode65(dat,npts,dtx,dfx,flip,ndepth,neme,nsked,
|
||||
+ nsnr,mycall,hiscall,hisgrid,mode65,nafc,decoded,ncount,
|
||||
+ mycall,hiscall,hisgrid,mode65,nafc,decoded,ncount,
|
||||
+ deepmsg,qual)
|
||||
|
||||
C Decodes JT65 data, assuming that DT and DF have already been determined.
|
||||
@ -31,7 +31,7 @@ C Compute spectra of the channel symbols
|
||||
enddo
|
||||
nadd=mode65
|
||||
|
||||
call extract(s3,nadd,ndepth,ncount,decoded) !Extract the message
|
||||
call extract(s3,nadd,ncount,decoded) !Extract the message
|
||||
qual=0.
|
||||
if(ndepth.ge.1) call deep65(s3,mode65,neme,
|
||||
+ nsked,flip,mycall,hiscall,hisgrid,deepmsg,qual)
|
||||
|
15
deep65.F
15
deep65.F
@ -13,6 +13,10 @@
|
||||
integer ncode(63,2*MAXCALLS + 2 + MAXRPT)
|
||||
real pp(2*MAXCALLS + 2 + MAXRPT)
|
||||
common/tmp9/ mrs(63),mrs2(63)
|
||||
#ifdef Win32
|
||||
C This prevents some optimizations that break this subroutine.
|
||||
volatile p1,p2,bias
|
||||
#endif
|
||||
|
||||
data neme0/-99/
|
||||
data rpt/'-01','-02','-03','-04','-05',
|
||||
@ -92,7 +96,8 @@ C Insert CQ message unless sync=OOO (flip=-1).
|
||||
endif
|
||||
enddo
|
||||
if(nsked.eq.1) go to 20
|
||||
10 enddo
|
||||
10 continue
|
||||
enddo
|
||||
20 ntot=k
|
||||
neme0=neme
|
||||
|
||||
@ -129,14 +134,6 @@ C Insert CQ message unless sync=OOO (flip=-1).
|
||||
if(mode65.eq.1) bias=max(1.12*p2,0.335)
|
||||
if(mode65.eq.2) bias=max(1.08*p2,0.405)
|
||||
if(mode65.ge.4) bias=max(1.04*p2,0.505)
|
||||
|
||||
|
||||
C This is really weird, but do not remove the following statements!
|
||||
! write(77,*) mode65,bias,p1,p2
|
||||
! rewind 77
|
||||
! rewind 23
|
||||
call sleepqqq(1)
|
||||
|
||||
qual=100.0*(p1-bias)
|
||||
decoded=' '
|
||||
c=' '
|
||||
|
@ -1,9 +1,8 @@
|
||||
subroutine extract(s3,nadd,ndepth,ncount,decoded)
|
||||
subroutine extract(s3,nadd,ncount,decoded)
|
||||
|
||||
real s3(64,63)
|
||||
character decoded*22
|
||||
integer*1 dat1(12)
|
||||
integer dat(63),era(51),dat4(12),indx(63)
|
||||
integer era(51),dat4(12),indx(63)
|
||||
integer mrsym(63),mr2sym(63),mrprob(63),mr2prob(63)
|
||||
logical first
|
||||
data first/.true./,nsec1/0/
|
||||
@ -23,9 +22,6 @@
|
||||
ndec=1
|
||||
nemax=30
|
||||
maxe=8
|
||||
! if(ndepth.ge.2) ndec=1
|
||||
! if(ndepth.eq.2) xlambda=13.0
|
||||
! if(ndepth.eq.3) xlambda=15.0
|
||||
xlambda=15.0
|
||||
|
||||
if(ndec.eq.1) then
|
||||
|
56
fivehz.F90
56
fivehz.F90
@ -14,8 +14,10 @@ subroutine fivehz
|
||||
use dfport
|
||||
#endif
|
||||
|
||||
parameter (NTRING=64)
|
||||
real*8 tt1(0:NTRING-1)
|
||||
real*8 tstart,tstop,t60
|
||||
logical first,txtime,debug
|
||||
logical first,txtime,debug,filled
|
||||
integer ptt
|
||||
integer TxOKz
|
||||
real*8 fs,fsample,tt,tt0,u
|
||||
@ -40,23 +42,37 @@ subroutine fivehz
|
||||
ibuf00=-99
|
||||
ncall=-1
|
||||
tt0=tt
|
||||
u=0.1d0
|
||||
u=0.05d0
|
||||
fsample=11025.d0
|
||||
maxms=0
|
||||
mfsample=110250
|
||||
filled=.false.
|
||||
endif
|
||||
|
||||
if(txdelay.lt.0.2d0) txdelay=0.2d0
|
||||
|
||||
! Measure average sampling frequency over a recent interval
|
||||
|
||||
ncall=ncall+1
|
||||
if(ncall.eq.9) tt0=tt
|
||||
if(ncall.ge.10 .and. mod(ncall,2).eq.1) then
|
||||
fs=(ncall-9)*2048.d0/(tt-tt0)
|
||||
if(ncall.eq.9) then
|
||||
tt0=tt
|
||||
ntt0=0
|
||||
ntt1=0
|
||||
tt1(ntt1)=tt
|
||||
endif
|
||||
! if(ncall.ge.10 .and. mod(ncall,2).eq.1) then
|
||||
if(ncall.ge.10) then
|
||||
ntt1=iand(ntt1+1,NTRING-1)
|
||||
tt1(ntt1)=tt
|
||||
if(ntt1.eq.NTRING-1) filled=.true.
|
||||
if(filled) ntt0=iand(ntt1+1,NTRING-1)
|
||||
if(mod(ncall,2).eq.1) then
|
||||
nd=ntt1-ntt0
|
||||
if(nd.lt.0) nd=nd+NTRING
|
||||
fs=nd*2048.d0/(tt1(ntt1)-tt1(ntt0))
|
||||
fsample=u*fs + (1.d0-u)*fsample
|
||||
mfsample=nint(10.d0*fsample)
|
||||
endif
|
||||
endif
|
||||
|
||||
if(trperiod.le.0) trperiod=30
|
||||
tx1=0.0 !Time to start a TX sequence
|
||||
@ -180,7 +196,9 @@ subroutine fivehztx
|
||||
use dfport
|
||||
#endif
|
||||
|
||||
logical first
|
||||
parameter (NTRING=64)
|
||||
real*8 tt1(0:NTRING-1)
|
||||
logical first,filled
|
||||
real*8 fs,fsample,tt,tt0,u
|
||||
include 'gcom1.f90'
|
||||
data first/.true./
|
||||
@ -195,18 +213,34 @@ subroutine fivehztx
|
||||
ncall=-1
|
||||
fsample=11025.d0
|
||||
nsec0=-999
|
||||
u=0.1d0
|
||||
u=0.05d0
|
||||
mfsample2=110250
|
||||
tt0=tt
|
||||
filled=.false.
|
||||
endif
|
||||
|
||||
! Measure average sampling frequency over a recent interval
|
||||
ncall=ncall+1
|
||||
if(ncall.eq.9) tt0=tt
|
||||
if(ncall.ge.10 .and. mod(ncall,2).eq.1) then
|
||||
fs=(ncall-9)*2048.d0/(tt-tt0)
|
||||
if(ncall.eq.9) then
|
||||
tt0=tt
|
||||
ntt0=0
|
||||
ntt1=0
|
||||
tt1(ntt1)=tt
|
||||
endif
|
||||
if(ncall.ge.10) then
|
||||
ntt1=iand(ntt1+1,NTRING-1)
|
||||
tt1(ntt1)=tt
|
||||
if(ntt1.eq.NTRING-1) filled=.true.
|
||||
if(filled) ntt0=iand(ntt1+1,NTRING-1)
|
||||
if(mod(ncall,2).eq.1) then
|
||||
nd=ntt1-ntt0
|
||||
if(nd.lt.0) nd=nd+NTRING
|
||||
fs=nd*2048.d0/(tt1(ntt1)-tt1(ntt0))
|
||||
fsample=u*fs + (1.d0-u)*fsample
|
||||
mfsample2=nint(10.d0*fsample)
|
||||
endif
|
||||
endif
|
||||
|
||||
return
|
||||
end subroutine fivehztx
|
||||
|
||||
|
@ -20,6 +20,7 @@ integer nrestart !True if transmission should restart GUI,SoundIn
|
||||
integer ntr !Are we in 2nd sequence? SoundIn
|
||||
integer nmsg !Length of Tx message SoundIn
|
||||
integer nsave !Which files to save? GUI
|
||||
integer nadd5 !Prepend 5 sec of 0's before decoding? GUI
|
||||
integer dftolerance !DF tolerance (Hz) GUI
|
||||
logical LDecoded !Was a message decoded? Decoder
|
||||
logical rxdone !Has the Rx sequence finished? SoundIn,Decoder
|
||||
@ -85,7 +86,7 @@ character*12 pttport
|
||||
|
||||
common/gcom2/ps0(431),psavg(450),s2(64,3100),ccf(-5:540), &
|
||||
green(500),ngreen,dgain,iter,ndecoding,ndecoding0,mousebutton, &
|
||||
ndecdone,npingtime,ierr,lauto,mantx,nrestart,ntr,nmsg,nsave, &
|
||||
ndecdone,npingtime,ierr,lauto,mantx,nrestart,ntr,nmsg,nsave,nadd5, &
|
||||
dftolerance,LDecoded,rxdone,monitoring,nzap,nsavecum,minsigdb, &
|
||||
nclearave,nfreeze,nafc,nmode,mode65,nclip,ndebug,nblank,nport, &
|
||||
mousedf,neme,nsked,naggressive,ntx2,nslim2,nagain,nsavelast, &
|
||||
|
2
gencw.f
2
gencw.f
@ -5,7 +5,7 @@
|
||||
integer*2 iwave(NMAX)
|
||||
integer TRPeriod
|
||||
|
||||
integer*1 idat(5000),idat1(460),idat2(200),i1
|
||||
integer*1 idat(5000),idat1(460),idat2(200)
|
||||
real*8 dt,t,twopi,pha,dpha,tdit,samfac
|
||||
data twopi/6.283185307d0/
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
if(k.ge.1 .and. k.le.NZ) then
|
||||
iz=index(pfx(k),' ') - 1
|
||||
callsign=pfx(k)(1:iz)//'/'//callsign
|
||||
else if(k.ge.401 .and. k.le.411) then
|
||||
else if(k.ge.401 .and. k.le.400+NZ2) then
|
||||
iz=index(callsign,' ') - 1
|
||||
callsign=callsign(1:iz)//'/'//sfx(k-400)
|
||||
else if(k.eq.449) then
|
||||
|
19
jtaudio.c
19
jtaudio.c
@ -1,5 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include <portaudio.h>
|
||||
#include <string.h>
|
||||
|
||||
void fivehz_();
|
||||
void fivehztx_();
|
||||
void addnoise_(short int *n);
|
||||
|
||||
// Definition of structure pointing to the audio data
|
||||
typedef struct
|
||||
@ -66,7 +71,6 @@ static int SoundIn( void *inputBuffer, void *outputBuffer,
|
||||
{
|
||||
paTestData *data = (paTestData*)userData;
|
||||
short *in = (short*)inputBuffer;
|
||||
short *wptr = (short*)outputBuffer;
|
||||
unsigned int i;
|
||||
static int n0;
|
||||
static int ia=0;
|
||||
@ -99,8 +103,8 @@ static int SoundIn( void *inputBuffer, void *outputBuffer,
|
||||
// if((inputBuffer==NULL) & (ncall>2) & (stime>stime0)) {
|
||||
if((statusFlags!=0) & (ncall>2) & (stime>stime0)) {
|
||||
if(*data->ndebug)
|
||||
printf("Status flags %d at Tsec = %7.1f s, DT = %7.1f\n",stime,
|
||||
stime-stime0);
|
||||
printf("Status flags %d at Tsec = %7.1f s, DT = %7.1f\n",
|
||||
statusFlags,stime,stime-stime0);
|
||||
stime0=stime;
|
||||
}
|
||||
|
||||
@ -134,7 +138,6 @@ static int SoundOut( void *inputBuffer, void *outputBuffer,
|
||||
void *userData )
|
||||
{
|
||||
paTestData *data = (paTestData*)userData;
|
||||
short *in = (short*)inputBuffer;
|
||||
short *wptr = (short*)outputBuffer;
|
||||
unsigned int i,n;
|
||||
static short int n2;
|
||||
@ -202,9 +205,9 @@ int jtaudio_(int *ndevin, int *ndevout, short y1[], short y2[],
|
||||
PaStream *outstream;
|
||||
PaStreamParameters inputParameters;
|
||||
PaStreamParameters outputParameters;
|
||||
PaStreamInfo *streamInfo;
|
||||
// PaStreamInfo *streamInfo;
|
||||
|
||||
int i,nfs,ndin,ndout;
|
||||
int nfs,ndin,ndout;
|
||||
PaError err1,err2,err2a,err3,err3a;
|
||||
double dnfs;
|
||||
|
||||
@ -318,11 +321,11 @@ error:
|
||||
int padevsub_(int *numdev, int *ndefin, int *ndefout,
|
||||
int nchin[], int nchout[])
|
||||
{
|
||||
int i,j,n;
|
||||
int i;
|
||||
int numDevices;
|
||||
const PaDeviceInfo *pdi;
|
||||
PaError err;
|
||||
PaHostApiInfo *hostapi;
|
||||
// PaHostApiInfo *hostapi;
|
||||
|
||||
Pa_Initialize();
|
||||
|
||||
|
2
longx.f
2
longx.f
@ -1,5 +1,5 @@
|
||||
subroutine longx(dat,npts0,ps,DFTolerance,noffset,
|
||||
+ msg,msglen,bauderr,MouseButton)
|
||||
+ msg,msglen,bauderr)
|
||||
|
||||
C Look for 441-baud modulation, synchronize to it, and decode message.
|
||||
C Longest allowed data analysis is 1 second.
|
||||
|
@ -1,11 +1,9 @@
|
||||
subroutine mtdecode(dat,jz,s2,nchan,nz,MinSigdB,MinWidth,
|
||||
+ NQRN,DFTolerance,istart,pick,MouseButton,NSaveCum,
|
||||
+ cfile6,ps0)
|
||||
subroutine mtdecode(dat,jz,nz,MinSigdB,MinWidth,
|
||||
+ NQRN,DFTolerance,istart,pick,cfile6,ps0)
|
||||
|
||||
C Decode Multi-Tone FSK441 mesages.
|
||||
|
||||
real dat(jz) !Raw audio data
|
||||
real s2(nchan,nz) !2d spectrum of data
|
||||
integer NQRN
|
||||
integer DFTolerance
|
||||
logical pick
|
||||
@ -101,7 +99,7 @@ C Compute average spectrum of this ping.
|
||||
C Decode the message.
|
||||
msg=' '
|
||||
call longx(dat(jj),jjz,ps,DFTolerance,noffset,msg,
|
||||
+ msglen,bauderr,MouseButton)
|
||||
+ msglen,bauderr)
|
||||
qrnlimit=4.4*1.5**(5.0-NQRN)
|
||||
if(NQRN.eq.0) qrnlimit=99.
|
||||
if(msglen.eq.0) go to 100
|
||||
|
4
pfx.f
4
pfx.f
@ -1,9 +1,9 @@
|
||||
parameter (NZ=338) !Total number of prefixes
|
||||
parameter (NZ2=11) !Total number of suffixes
|
||||
parameter (NZ2=12) !Total number of suffixes
|
||||
character*1 sfx(NZ2)
|
||||
character*5 pfx(NZ)
|
||||
|
||||
data sfx/'P','0','1','2','3','4','5','6','7','8','9'/
|
||||
data sfx/'P','0','1','2','3','4','5','6','7','8','9','A'/
|
||||
data pfx/
|
||||
+ '1A ','1S ','3A ','3B6 ','3B8 ','3B9 ','3C ','3C0 ',
|
||||
+ '3D2 ','3D2C ','3D2R ','3DA ','3V ','3W ','3X ','3Y ',
|
||||
|
6
spec.f90
6
spec.f90
@ -11,13 +11,7 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
|
||||
! Output:
|
||||
integer*2 a(225000) !Pixel values for 750 x 300 array
|
||||
|
||||
real psa(750) !Grand average spectrum
|
||||
real ref(750) !Ref spect: smoothed ave of lower half
|
||||
real birdie(750) !Spec (with birdies) for plot, in dB
|
||||
real variance(750) !Variance in each spectral channel
|
||||
|
||||
real a0(225000) !Save the last 300 spectra
|
||||
integer*2 idat(11025) !Sound data, read from file
|
||||
integer nstep(5)
|
||||
integer b0,c0
|
||||
real x(4096) !Data for FFT
|
||||
|
3
sync65.f
3
sync65.f
@ -1,4 +1,4 @@
|
||||
subroutine sync65(dat,jz,DFTolerance,NFreeze,NAFC,MouseDF,
|
||||
subroutine sync65(dat,jz,DFTolerance,NFreeze,MouseDF,
|
||||
+ mode65,dtx,dfx,snrx,snrsync,ccfblue,ccfred,flip,width)
|
||||
|
||||
C Synchronizes JT65 data, finding the best-fit DT and DF.
|
||||
@ -15,7 +15,6 @@ C NB: at this stage, submodes ABC are processed in the same way.
|
||||
real ccfblue(-5:540) !CCF with pseudorandom sequence
|
||||
real ccfred(-224:224) !Peak of ccfblue, as function of freq
|
||||
real tmp(450)
|
||||
integer itry(100)
|
||||
save
|
||||
|
||||
C Do FFTs of symbol length, stepped by half symbols. Note that we have
|
||||
|
35
wsjt.py
35
wsjt.py
@ -884,22 +884,16 @@ def decdsec(event):
|
||||
ldsec.configure(text='Dsec '+str(0.1*idsec),bg=bg)
|
||||
Audio.gcom1.ndsec=idsec
|
||||
|
||||
###------------------------------------------------------ incrdsec
|
||||
##def incrdsec(event):
|
||||
## global irdsec
|
||||
## irdsec=irdsec+5
|
||||
## bg='red'
|
||||
## if irdsec==0: bg='white'
|
||||
## lrdsec.configure(text='RDsec '+str(0.1*irdsec),bg=bg)
|
||||
##
|
||||
###------------------------------------------------------ decrdsec
|
||||
##def decrdsec(event):
|
||||
## global irdsec
|
||||
## irdsec=irdsec-5
|
||||
## bg='red'
|
||||
## if irdsec==0: bg='white'
|
||||
## lrdsec.configure(text='RDsec '+str(0.1*irdsec),bg=bg)
|
||||
##
|
||||
#------------------------------------------------------ toggle_shift
|
||||
def toggle_shift(event):
|
||||
Audio.gcom2.nadd5=1-Audio.gcom2.nadd5
|
||||
if Audio.gcom2.nadd5:
|
||||
bg='red'
|
||||
lshift.configure(text='Shift 5.0',bg=bg)
|
||||
else:
|
||||
bg='white'
|
||||
lshift.configure(text='Shift 0.0',bg=bg)
|
||||
|
||||
#------------------------------------------------------ inctrperiod
|
||||
def inctrperiod(event):
|
||||
global ncwtrperiod
|
||||
@ -1874,14 +1868,11 @@ Button(f5b,text='Defaults',command=defaults,padx=1,pady=1).grid(column=0,
|
||||
row=3,sticky='EW')
|
||||
ldsec=Label(f5b, bg='white', fg='black', text='Dsec 0.0', width=8, relief=RIDGE)
|
||||
ldsec.grid(column=0,row=4,ipadx=3,padx=2,pady=5,sticky='EW')
|
||||
#lrdsec=Label(f5b, bg='white', fg='black', text='RDsec 0.0', width=8, relief=RIDGE)
|
||||
#lrdsec.grid(column=1,row=4,ipadx=3,padx=2,pady=5,sticky='EW')
|
||||
lshift=Label(f5b, bg='white', fg='black', text='Shift 0.0', width=8, relief=RIDGE)
|
||||
lshift.grid(column=1,row=4,ipadx=3,padx=2,pady=5,sticky='EW')
|
||||
Widget.bind(ldsec,'<Button-1>',incdsec)
|
||||
Widget.bind(ldsec,'<Button-3>',decdsec)
|
||||
#Widget.bind(lrdsec,'<Button-1>',incrdsec)
|
||||
#Widget.bind(lrdsec,'<Button-3>',decrdsec)
|
||||
#Widget.bind(lrdsec,'<Button-1>',stub)
|
||||
#Widget.bind(lrdsec,'<Button-3>',stub)
|
||||
Widget.bind(lshift,'<Button-1>',toggle_shift)
|
||||
|
||||
f5b.pack(side=LEFT,expand=0,fill=BOTH)
|
||||
|
||||
|
26
wsjt1.F
26
wsjt1.F
@ -1,7 +1,7 @@
|
||||
subroutine wsjt1(d,jz0,istart,samfacin,FileID,ndepth,MinSigdB,
|
||||
+ NQRN,DFTolerance,NSaveCum,MouseButton,NClearAve,
|
||||
+ Mode,NFreeze,NAFC,NZap,AppDir,utcdate,mode441,mode65,
|
||||
+ MyCall,HisCall,HisGrid,neme,nsked,naggressive,ntx2,s2,
|
||||
+ NQRN,DFTolerance,MouseButton,NClearAve,
|
||||
+ Mode,NFreeze,NAFC,NZap,mode65,
|
||||
+ MyCall,HisCall,HisGrid,neme,nsked,ntx2,s2,
|
||||
+ ps0,npkept,lumsg,basevb,rmspower,nslim2,psavg,ccf,Nseg,
|
||||
+ MouseDF,NAgain,LDecoded,nspecial,ndf,ss1,ss2)
|
||||
|
||||
@ -13,10 +13,7 @@
|
||||
integer MinSigdB !Minimum ping strength, dB
|
||||
integer NQRN !QRN rejection parameter
|
||||
integer DFTolerance !Defines DF search range
|
||||
integer NSaveCum !Set to 1 if cumulative file is to be saved
|
||||
integer NSyncOK !Set to 1 if JT65 file synchronized OK
|
||||
character AppDir*80 !Installation directory for WSJT
|
||||
character*12 utcdate
|
||||
character*12 mycall
|
||||
character*12 hiscall
|
||||
character*6 hisgrid
|
||||
@ -48,14 +45,11 @@
|
||||
integer*1 dtmp
|
||||
character msg3*3
|
||||
character cfile6*6
|
||||
character fname*99,fcum*99
|
||||
logical lcum
|
||||
integer indx(100)
|
||||
character*90 line
|
||||
character*24 today
|
||||
|
||||
common/avecom/dat(NP2),labdat,jza,modea
|
||||
common/avecom2/f0a
|
||||
common/ccom/nline,tping(100),line(100)
|
||||
common/limcom/ nslim2a
|
||||
common/clipcom/ nclip
|
||||
@ -130,7 +124,7 @@ C Intentionally degrade SNR by -nclip dB.
|
||||
if(mode.ne.2 .and. nzap.ne.0) then
|
||||
nfrz=NFreeze
|
||||
if(mode.eq.1) nfrz=0
|
||||
if(jz.gt.100000) call avesp2(dat,jz,2,f0a,mode,nfrz,MouseDF,
|
||||
if(jz.gt.100000) call avesp2(dat,jz,2,mode,nfrz,MouseDF,
|
||||
+ DFTolerance,fzap)
|
||||
nadd=1
|
||||
call bzap(dat,jz,nadd,mode,fzap)
|
||||
@ -186,7 +180,7 @@ C Intentionally degrade SNR by -nclip dB.
|
||||
jz=jz2
|
||||
nadd=1
|
||||
fzap(1)=0.
|
||||
if(nzap.eq.1) call avesp2(dat,jz,nadd,f0a,mode,NFreeze,MouseDF,
|
||||
if(nzap.eq.1) call avesp2(dat,jz,nadd,mode,NFreeze,MouseDF,
|
||||
+ DFTolerance,fzap)
|
||||
if(nzap.eq.1.and.nstest.eq.0) call bzap(dat,jz,nadd,mode,fzap)
|
||||
|
||||
@ -202,7 +196,7 @@ C Intentionally degrade SNR by -nclip dB.
|
||||
+ NClearAve,MinSigdB,DFTolerance,NFreeze,NAFC,mode65,Nseg,
|
||||
+ MouseDF,NAgain,ndepth,neme,nsked,
|
||||
+ mycall,hiscall,hisgrid,lumsg,lcum,nspecial,ndf,
|
||||
+ nstest,dfsh,iderrsh,idriftsh,snrsh,
|
||||
+ nstest,dfsh,snrsh,
|
||||
+ NSyncOK,ccf,psavg,ndiag,nwsh)
|
||||
goto 900
|
||||
endif
|
||||
@ -224,7 +218,6 @@ C Intentionally degrade SNR by -nclip dB.
|
||||
call synct(dat,jz,jstart,f0,smax)
|
||||
call syncf1(dat,jz,jstart,f0,NFreeze,DFTolerance,smax,red)
|
||||
|
||||
f0a=f0
|
||||
do i=1,512
|
||||
ccf(i-6)=dB(red(i))
|
||||
enddo
|
||||
@ -253,8 +246,6 @@ C Call the decoder if DF is in range or Freeze is off.
|
||||
+ NFixLen,lcum,f0,lumsg,npkept,yellow)
|
||||
endif
|
||||
|
||||
if(npkept.eq.0) f0a=0.
|
||||
|
||||
if(pick) then
|
||||
do i=1,216
|
||||
ps0(i)=yellow0(i)
|
||||
@ -289,9 +280,8 @@ C Look for single-tone messages
|
||||
if(nline.gt.nline0) STfound=.true. !ST message(s) found
|
||||
|
||||
C Now the multi-tone decoding
|
||||
call mtdecode(dat,jz,s2,nchan,nz,MinSigdB,MinWidth,
|
||||
+ NQRN,DFTolerance,istart,pick,MouseButton,NSaveCum,
|
||||
+ cfile6,ps0)
|
||||
call mtdecode(dat,jz,nz,MinSigdB,MinWidth,
|
||||
+ NQRN,DFTolerance,istart,pick,cfile6,ps0)
|
||||
|
||||
npkept=nline !Number of pings that were kept
|
||||
smax=0.
|
||||
|
16
wsjt65.f
16
wsjt65.f
@ -1,7 +1,7 @@
|
||||
subroutine wsjt65(dat,npts,cfile6,NClearAve,MinSigdB,
|
||||
+ DFTolerance,NFreeze,NAFC,mode65,Nseg,MouseDF,NAgain,
|
||||
+ ndepth,neme,nsked,mycall,hiscall,hisgrid,
|
||||
+ lumsg,lcum,nspecial,ndf,nstest,dfsh,iderrsh,idriftsh,
|
||||
+ lumsg,lcum,nspecial,ndf,nstest,dfsh,
|
||||
+ snrsh,NSyncOK,ccfblue,ccfred,ndiag,nwsh)
|
||||
|
||||
C Orchestrates the process of decoding JT65 messages, using data that
|
||||
@ -13,18 +13,15 @@ C already been done.
|
||||
logical first
|
||||
logical lcum
|
||||
character decoded*22,cfile6*6,special*5,cooo*3
|
||||
character*22 avemsg1,avemsg2,deepmsg,deepbest
|
||||
character*22 avemsg1,avemsg2,deepmsg
|
||||
character*67 line,ave1,ave2
|
||||
character*1 csync,c1
|
||||
character*12 mycall
|
||||
character*12 hiscall
|
||||
character*6 hisgrid
|
||||
real ccfblue(-5:540),ccfred(-224:224)
|
||||
real ftrack(126)
|
||||
logical lmid
|
||||
integer itf(2,9)
|
||||
include 'avecom.h'
|
||||
common/avecom2/f0a
|
||||
data first/.true./,ns10/0/,ns20/0/
|
||||
data itf/0,0, 1,0, -1,0, 0,-1, 0,1, 1,-1, 1,1, -1,-1, -1,1/
|
||||
save
|
||||
@ -56,7 +53,7 @@ C already been done.
|
||||
endif
|
||||
|
||||
C Attempt to synchronize: look for sync tone, get DF and DT.
|
||||
call sync65(dat,npts,DFTolerance,NFreeze,NAFC,MouseDF,
|
||||
call sync65(dat,npts,DFTolerance,NFreeze,MouseDF,
|
||||
+ mode65,dtx,dfx,snrx,snrsync,ccfblue,ccfred,flip,width)
|
||||
f0=1270.46 + dfx
|
||||
csync=' '
|
||||
@ -115,7 +112,7 @@ C If we get here, we have achieved sync!
|
||||
endif
|
||||
|
||||
call decode65(dat,npts,dtx,dfx,flip,ndepth,neme,nsked,
|
||||
+ nsnr,mycall,hiscall,hisgrid,mode65,nafc,decoded,
|
||||
+ mycall,hiscall,hisgrid,mode65,nafc,decoded,
|
||||
+ ncount,deepmsg,qual)
|
||||
if(ncount.eq.-999) qual=0 !Bad data
|
||||
200 kvqual=0
|
||||
@ -156,10 +153,10 @@ C Write decoded msg unless this is an "Exclude" request:
|
||||
if(MinSigdB.lt.99) write(lumsg,1011) line
|
||||
|
||||
if(nsave.ge.1) call avemsg65(1,mode65,ndepth,avemsg1,nused1,
|
||||
+ nq1,nq2,neme,nsked,flip,mycall,hiscall,hisgrid,qual1,
|
||||
+ nq1,nq2,neme,nsked,mycall,hiscall,hisgrid,qual1,
|
||||
+ ns1,ncount1)
|
||||
if(nsave.ge.1) call avemsg65(2,mode65,ndepth,avemsg2,nused2,
|
||||
+ nq1,nq2,neme,nsked,flip,mycall,hiscall,hisgrid,qual2,
|
||||
+ nq1,nq2,neme,nsked,mycall,hiscall,hisgrid,qual2,
|
||||
+ ns2,ncount2)
|
||||
nqual1=qual1
|
||||
nqual2=qual2
|
||||
@ -208,7 +205,6 @@ C If Monitor segment #2 is available, write that line also
|
||||
call flushqqq(12)
|
||||
|
||||
800 if(lumsg.ne.6) end file 11
|
||||
f0a=f0
|
||||
|
||||
900 continue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user