SVN r8568
This commit is contained in:
@@ -1,139 +0,0 @@
|
||||
module ft8_decode
|
||||
|
||||
type :: ft8_decoder
|
||||
procedure(ft8_decode_callback), pointer :: callback
|
||||
contains
|
||||
procedure :: decode
|
||||
end type ft8_decoder
|
||||
|
||||
abstract interface
|
||||
subroutine ft8_decode_callback (this,sync,snr,dt,freq,decoded,nap,qual)
|
||||
import ft8_decoder
|
||||
implicit none
|
||||
class(ft8_decoder), intent(inout) :: this
|
||||
real, intent(in) :: sync
|
||||
integer, intent(in) :: snr
|
||||
real, intent(in) :: dt
|
||||
real, intent(in) :: freq
|
||||
character(len=22), intent(in) :: decoded
|
||||
integer, intent(in) :: nap
|
||||
real, intent(in) :: qual
|
||||
end subroutine ft8_decode_callback
|
||||
end interface
|
||||
|
||||
contains
|
||||
|
||||
subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, &
|
||||
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lapon,napwid,mycall12, &
|
||||
mygrid6,hiscall12,hisgrid6)
|
||||
! use wavhdr
|
||||
use timer_module, only: timer
|
||||
include 'fsk4hf/ft8_params.f90'
|
||||
! type(hdr) h
|
||||
|
||||
class(ft8_decoder), intent(inout) :: this
|
||||
procedure(ft8_decode_callback) :: callback
|
||||
real s(NH1,NHSYM)
|
||||
real sbase(NH1)
|
||||
real candidate(3,200)
|
||||
real dd(15*12000)
|
||||
logical, intent(in) :: lapon,nagain
|
||||
logical newdat,lsubtract,ldupe,bcontest
|
||||
character*12 mycall12, hiscall12
|
||||
character*6 mygrid6,hisgrid6
|
||||
integer*2 iwave(15*12000)
|
||||
integer apsym(KK)
|
||||
character datetime*13,message*22
|
||||
character*22 allmessages(100)
|
||||
integer allsnrs(100)
|
||||
save s,dd
|
||||
|
||||
bcontest=iand(nexp_decode,128).ne.0
|
||||
this%callback => callback
|
||||
write(datetime,1001) nutc !### TEMPORARY ###
|
||||
1001 format("000000_",i6.6)
|
||||
|
||||
call ft8apset(mycall12,mygrid6,hiscall12,hisgrid6,bcontest,apsym,iaptype)
|
||||
dd=iwave
|
||||
ndecodes=0
|
||||
allmessages=' '
|
||||
allsnrs=0
|
||||
ifa=nfa
|
||||
ifb=nfb
|
||||
if(nagain) then
|
||||
ifa=nfqso-10
|
||||
ifb=nfqso+10
|
||||
endif
|
||||
|
||||
! For now:
|
||||
! ndepth=1: no subtraction, 1 pass, belief propagation only
|
||||
! ndepth=2: subtraction, 3 passes, belief propagation only
|
||||
! ndepth=3: subtraction, 3 passes, bp+osd
|
||||
if(ndepth.eq.1) npass=1
|
||||
if(ndepth.ge.2) npass=3
|
||||
do ipass=1,npass
|
||||
newdat=.true. ! Is this a problem? I hijacked newdat.
|
||||
syncmin=1.5
|
||||
if(ipass.eq.1) then
|
||||
lsubtract=.true.
|
||||
if(ndepth.eq.1) lsubtract=.false.
|
||||
elseif(ipass.eq.2) then
|
||||
n2=ndecodes
|
||||
if(ndecodes.eq.0) cycle
|
||||
lsubtract=.true.
|
||||
elseif(ipass.eq.3) then
|
||||
if((ndecodes-n2).eq.0) cycle
|
||||
lsubtract=.false.
|
||||
endif
|
||||
|
||||
call timer('sync8 ',0)
|
||||
call sync8(dd,ifa,ifb,syncmin,nfqso,s,candidate,ncand,sbase)
|
||||
call timer('sync8 ',1)
|
||||
do icand=1,ncand
|
||||
sync=candidate(3,icand)
|
||||
f1=candidate(1,icand)
|
||||
xdt=candidate(2,icand)
|
||||
xbase=10.0**(0.1*(sbase(nint(f1/3.125))-40.0))
|
||||
nsnr0=min(99,nint(10.0*log10(sync) - 25.5)) !### empirical ###
|
||||
call timer('ft8b ',0)
|
||||
call ft8b(dd,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,napwid, &
|
||||
lsubtract,nagain,iaptype,mygrid6,bcontest,sync,f1,xdt,xbase, &
|
||||
apsym,nharderrors,dmin,nbadcrc,iappass,iera,message,xsnr)
|
||||
nsnr=nint(xsnr)
|
||||
xdt=xdt-0.5
|
||||
hd=nharderrors+dmin
|
||||
call timer('ft8b ',1)
|
||||
if(nbadcrc.eq.0) then
|
||||
! call jtmsg(message,iflag)
|
||||
if(bcontest) call fix_contest_msg(mygrid6,message)
|
||||
! if(iand(iflag,31).ne.0) message(22:22)='?'
|
||||
ldupe=.false.
|
||||
do id=1,ndecodes
|
||||
if(message.eq.allmessages(id).and.nsnr.le.allsnrs(id)) ldupe=.true.
|
||||
enddo
|
||||
if(.not.ldupe) then
|
||||
ndecodes=ndecodes+1
|
||||
allmessages(ndecodes)=message
|
||||
allsnrs(ndecodes)=nsnr
|
||||
endif
|
||||
! write(81,1004) nutc,ncand,icand,ipass,iaptype,iappass, &
|
||||
! nharderrors,dmin,hd,min(sync,999.0),nint(xsnr), &
|
||||
! xdt,nint(f1),message
|
||||
!1004 format(i6.6,2i4,3i2,i3,3f6.1,i4,f6.2,i5,2x,a22)
|
||||
! flush(81)
|
||||
if(.not.ldupe .and. associated(this%callback)) then
|
||||
qual=1.0-(nharderrors+dmin)/60.0 ! scale qual to [0.0,1.0]
|
||||
call this%callback(sync,nsnr,xdt,f1,message,iaptype,qual)
|
||||
endif
|
||||
endif
|
||||
enddo
|
||||
! h=default_header(12000,NMAX)
|
||||
! open(10,file='subtract.wav',status='unknown',access='stream')
|
||||
! iwave=nint(dd)
|
||||
! write(10) h,iwave
|
||||
! close(10)
|
||||
enddo
|
||||
return
|
||||
end subroutine decode
|
||||
|
||||
end module ft8_decode
|
||||
@@ -1,119 +0,0 @@
|
||||
// Status=review
|
||||
.Main Window:
|
||||
- Select *JT9+JT65* on the *Mode* menu.
|
||||
- Toggle the *Tx mode* button to read *Tx JT65*, and set the Tx and Rx
|
||||
frequencies to 1718 Hz.
|
||||
- Double-click on *Erase* to clear both text windows.
|
||||
|
||||
.Wide Graph Settings:
|
||||
|
||||
- *Bins/Pixel* = 7
|
||||
- *JT65 .... JT9* = 2500
|
||||
- Adjust the width of the Wide Graph window so that the upper
|
||||
frequency limit is approximately 4000 Hz.
|
||||
|
||||
.Open a Wave File:
|
||||
|
||||
- Select *File | Open* and navigate to +...\save\samples\JT9+JT65\130610_2343.wav+.
|
||||
The waterfall should look something like this:
|
||||
|
||||
//.130610_2343.wav Decode
|
||||
[[X14]]
|
||||
image::130610_2343-wav-80.png[align="left",alt="Wide Graph Decode 130610_2343"]
|
||||
|
||||
The position of the blue marker on the waterfall scale is
|
||||
set by the spinner control *JT65 nnnn JT9*, where nnnn is an audio
|
||||
frequency in Hz. In *JT9+JT65* mode the program will automatically
|
||||
decode JT9 signals only above this frequency. JT65 signals will be
|
||||
decoded over the full displayed frequency range.
|
||||
|
||||
JT9 signals appear in the *Cumulative* spectrum as nearly rectangular
|
||||
shapes about 16 Hz wide. They have no clearly visible sync tone like
|
||||
the one at the low-frequency edge of all JT65 signals. By convention
|
||||
the nominal frequency of both JT9 and JT65 signals is taken to be that
|
||||
of the lowest tone, at the left edge of its spectrum.
|
||||
|
||||
This sample file contains 17 decodable signals — nine in JT65 mode
|
||||
(flagged with the character # in the decoded text windows), and eight
|
||||
in JT9 mode (flagged with @). On multi-core computers the decoders
|
||||
for JT9 and JT65 modes run simultaneously, so their results will be
|
||||
interspersed. The *Band Activity* window contains all decodes (you
|
||||
might need to scroll back in the window to see some of them). A
|
||||
signal at the frequency specified by the green marker is given
|
||||
decoding priority, and its message is displayed also in the *Rx
|
||||
Frequency* window.
|
||||
|
||||
[[FigDecodes]]
|
||||
image::decodes.png[align="center"]
|
||||
|
||||
- Confirm that mouse-click behavior is similar to that described
|
||||
earlier, in <<TUT_EX1,Example 1>>. _WSJT-X_ automatically determines
|
||||
the mode of each JT9 or JT65 message.
|
||||
|
||||
TIP: When you double-click on a signal in the waterfall it will be
|
||||
properly decoded even if on the "`wrong`" side of the *JT65 nnnn JT9*
|
||||
marker. The Tx mode automatically switches to that of the decoded
|
||||
signal and the Rx and Tx frequency markers on the waterfall scale
|
||||
resize themselves accordingly. When selecting a JT65 signal, click on
|
||||
the sync tone at its left edge.
|
||||
|
||||
- Double-click on the waterfall near 815 Hz: a JT65 message
|
||||
originating from W7VP will be decoded and appear in the *Rx Frequency*
|
||||
window. Between the *UTC* and *Freq* columns on the decoded text line
|
||||
you will find *dB*, the measured signal-to-noise ratio, and *DT*, the
|
||||
signal's time offset in seconds relative to your computer clock.
|
||||
|
||||
[width="80%",align="center",cols="^10,2*^8,2*^10,54",options="header"]
|
||||
|===
|
||||
|UTC|dB|DT|Freq|Mode|Message
|
||||
|+2343+|+-7+|+0.3+|+815+|+#+|+KK4DSD W7VP -16+
|
||||
|===
|
||||
|
||||
- Double-click on the waterfall at 3196 Hz. The program will decode a
|
||||
JT9 message from IZ0MIT:
|
||||
|
||||
[width="80%",align="center",cols="^10,2*^8,2*^10,54",options="header"]
|
||||
|===
|
||||
|UTC|dB|DT|Freq|Mode|Message
|
||||
|+2343+|+-7+|+0.3+|+3196+|+@+|+WB8QPG IZ0MIT -11+
|
||||
|===
|
||||
|
||||
- Scroll back in the *Band Activity* window and double-click on the
|
||||
message `CQ DL7ACA JO40`. The program will set *Tx mode* to JT65 and Tx
|
||||
and Rx frequencies to that of DL7ACA, 975 Hz. If you had checked
|
||||
*Double-click on call sets Tx Enable* on the *Setup* menu, the program
|
||||
would configure itself to start a QSO with DL7ACA.
|
||||
|
||||
- Double-click on the decoded JT65 message `CQ TA4A KM37`. The program
|
||||
will set Tx mode to JT9 and the Rx and Tx frequencies to 3567 Hz. The
|
||||
program is now configured properly for a JT9 QSO with TA4A.
|
||||
|
||||
.Reopen the First Sample File:
|
||||
- Select *File | Open* and navigate to `...\save\samples\130418_1742.wav`.
|
||||
|
||||
Taking full advantage of the wide-band, dual-mode capability of
|
||||
_WSJT-X_ requires a receiver bandwidth of at least 4 kHz. These
|
||||
data were recorded with a much narrower Rx bandwidth, roughly 200 to
|
||||
2400 Hz. If you have no Rx filter wider than about 2.7 kHz, you will
|
||||
be using data like this. For best viewing, adjust *Bins/Pixel* and the
|
||||
width of the Wide Graph so that only the active part of the spectrum
|
||||
shows, say 200 to 2400 Hz. Re-open the example file after any change of
|
||||
*Bins/Pixel* or Wide Graph width, to refresh the waterfall.
|
||||
|
||||
The signals in this file are all JT9 signals. To decode them
|
||||
automatically in *JT9+JT65* mode you’ll need to move the *JT65 nnnn JT9*
|
||||
delimiter down to 1000 Hz or less.
|
||||
|
||||
.Waterfall Controls
|
||||
|
||||
Now is a good time to experiment with the *Start* control and the
|
||||
sliders controlling gain and zero-point of the waterfall and spectrum
|
||||
plots. *Start* determines the frequency displayed at the left side of
|
||||
the waterfall scale. Sliders set the baseline level and gain for the
|
||||
waterfall and the several types of spectra. Good starting values
|
||||
should be close to mid-scale. You might want to uncheck *Flatten*
|
||||
when adjusting the sliders. Re-open the wave file after each change,
|
||||
to see the new results.
|
||||
|
||||
IMPORTANT: When finished with this Tutorial, don’t forget to re-enter
|
||||
your own callsign as *My Call* on the *Settings | General* tab.
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user