Merged master 8748
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,421 +0,0 @@
|
||||
subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
|
||||
!$ use omp_lib
|
||||
use prog_args
|
||||
use timer_module, only: timer
|
||||
use jt4_decode
|
||||
use jt65_decode
|
||||
use jt9_decode
|
||||
use ft8_decode
|
||||
|
||||
include 'jt9com.f90'
|
||||
include 'timer_common.inc'
|
||||
|
||||
type, extends(jt4_decoder) :: counting_jt4_decoder
|
||||
integer :: decoded
|
||||
end type counting_jt4_decoder
|
||||
|
||||
type, extends(jt65_decoder) :: counting_jt65_decoder
|
||||
integer :: decoded
|
||||
end type counting_jt65_decoder
|
||||
|
||||
type, extends(jt9_decoder) :: counting_jt9_decoder
|
||||
integer :: decoded
|
||||
end type counting_jt9_decoder
|
||||
|
||||
type, extends(ft8_decoder) :: counting_ft8_decoder
|
||||
integer :: decoded
|
||||
end type counting_ft8_decoder
|
||||
|
||||
real ss(184,NSMAX)
|
||||
logical baddata,newdat65,newdat9,single_decode,bVHF,bad0,newdat
|
||||
integer*2 id2(NTMAX*12000)
|
||||
type(params_block) :: params
|
||||
real*4 dd(NTMAX*12000)
|
||||
save
|
||||
type(counting_jt4_decoder) :: my_jt4
|
||||
type(counting_jt65_decoder) :: my_jt65
|
||||
type(counting_jt9_decoder) :: my_jt9
|
||||
type(counting_ft8_decoder) :: my_ft8
|
||||
|
||||
! initialize decode counts
|
||||
my_jt4%decoded = 0
|
||||
my_jt65%decoded = 0
|
||||
my_jt9%decoded = 0
|
||||
my_ft8%decoded = 0
|
||||
|
||||
single_decode=iand(params%nexp_decode,32).ne.0
|
||||
bVHF=iand(params%nexp_decode,64).ne.0
|
||||
if(mod(params%nranera,2).eq.0) ntrials=10**(params%nranera/2)
|
||||
if(mod(params%nranera,2).eq.1) ntrials=3*10**(params%nranera/2)
|
||||
if(params%nranera.eq.0) ntrials=0
|
||||
|
||||
nfail=0
|
||||
10 if (params%nagain) then
|
||||
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown', &
|
||||
position='append',iostat=ios)
|
||||
else
|
||||
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown', &
|
||||
iostat=ios)
|
||||
end if
|
||||
if(ios.ne.0) then
|
||||
nfail=nfail+1
|
||||
if(nfail.le.3) then
|
||||
call sleep_msec(100)
|
||||
go to 10
|
||||
endif
|
||||
endif
|
||||
|
||||
if(params%nmode.eq.8) then
|
||||
! We're in FT8 mode
|
||||
call timer('decft8 ',0)
|
||||
newdat=params%newdat
|
||||
call my_ft8%decode(ft8_decoded,id2,params%nfqso, &
|
||||
newdat,params%nutc,params%nfa, &
|
||||
params%nfb,logical(params%nagain), &
|
||||
params%ndepth,params%nsubmode)
|
||||
call timer('decft8 ',1)
|
||||
go to 800
|
||||
endif
|
||||
|
||||
rms=sqrt(dot_product(float(id2(300000:310000)), &
|
||||
float(id2(300000:310000)))/10000.0)
|
||||
if(rms.lt.2.0) go to 800
|
||||
|
||||
! Zap data at start that might come from T/R switching transient?
|
||||
nadd=100
|
||||
k=0
|
||||
bad0=.false.
|
||||
do i=1,240
|
||||
sq=0.
|
||||
do n=1,nadd
|
||||
k=k+1
|
||||
sq=sq + float(id2(k))**2
|
||||
enddo
|
||||
rms=sqrt(sq/nadd)
|
||||
if(rms.gt.10000.0) then
|
||||
bad0=.true.
|
||||
kbad=k
|
||||
rmsbad=rms
|
||||
endif
|
||||
enddo
|
||||
if(bad0) then
|
||||
nz=min(NTMAX*12000,kbad+100)
|
||||
! id2(1:nz)=0 ! temporarily disabled as it can breaak the JT9 decoder, maybe others
|
||||
endif
|
||||
|
||||
if(params%nmode.eq.4 .or. params%nmode.eq.65) open(14,file=trim(temp_dir)// &
|
||||
'/avemsg.txt',status='unknown')
|
||||
if(params%nmode.eq.164) open(17,file=trim(temp_dir)//'/red.dat', &
|
||||
status='unknown')
|
||||
|
||||
if(params%nmode.eq.4) then
|
||||
jz=52*nfsample
|
||||
if(params%newdat) then
|
||||
if(nfsample.eq.12000) call wav11(id2,jz,dd)
|
||||
if(nfsample.eq.11025) dd(1:jz)=id2(1:jz)
|
||||
endif
|
||||
call my_jt4%decode(jt4_decoded,dd,jz,params%nutc,params%nfqso, &
|
||||
params%ntol,params%emedelay,params%dttol,logical(params%nagain), &
|
||||
params%ndepth,logical(params%nclearave),params%minsync, &
|
||||
params%minw,params%nsubmode,params%mycall,params%hiscall, &
|
||||
params%hisgrid,params%nlist,params%listutc,jt4_average)
|
||||
go to 800
|
||||
endif
|
||||
|
||||
npts65=52*12000
|
||||
if(params%nmode.eq.164) npts65=54*12000
|
||||
if(baddata(id2,npts65)) then
|
||||
nsynced=0
|
||||
ndecoded=0
|
||||
go to 800
|
||||
endif
|
||||
|
||||
ntol65=params%ntol !### is this OK? ###
|
||||
newdat65=params%newdat
|
||||
newdat9=params%newdat
|
||||
|
||||
!$call omp_set_dynamic(.true.)
|
||||
!$omp parallel sections num_threads(2) copyin(/timer_private/) shared(ndecoded) if(.true.) !iif() needed on Mac
|
||||
|
||||
!$omp section
|
||||
if(params%nmode.eq.65 .or. params%nmode.eq.164 .or. &
|
||||
(params%nmode.eq.(65+9) .and. params%ntxmode.eq.65)) then
|
||||
! We're in JT65 or QRA64 mode, or should do JT65 first
|
||||
|
||||
if(newdat65) dd(1:npts65)=id2(1:npts65)
|
||||
nf1=params%nfa
|
||||
nf2=params%nfb
|
||||
call timer('jt65a ',0)
|
||||
call my_jt65%decode(jt65_decoded,dd,npts65,newdat65,params%nutc, &
|
||||
nf1,nf2,params%nfqso,ntol65,params%nsubmode,params%minsync, &
|
||||
logical(params%nagain),params%n2pass,logical(params%nrobust), &
|
||||
ntrials,params%naggressive,params%ndepth,params%emedelay, &
|
||||
logical(params%nclearave),params%mycall,params%hiscall, &
|
||||
params%hisgrid,params%nexp_decode)
|
||||
call timer('jt65a ',1)
|
||||
|
||||
else if(params%nmode.eq.9 .or. (params%nmode.eq.(65+9) .and. params%ntxmode.eq.9)) then
|
||||
! We're in JT9 mode, or should do JT9 first
|
||||
call timer('decjt9 ',0)
|
||||
call my_jt9%decode(jt9_decoded,ss,id2,params%nfqso, &
|
||||
newdat9,params%npts8,params%nfa,params%nfsplit,params%nfb, &
|
||||
params%ntol,params%nzhsym,logical(params%nagain),params%ndepth, &
|
||||
params%nmode,params%nsubmode,params%nexp_decode)
|
||||
call timer('decjt9 ',1)
|
||||
endif
|
||||
|
||||
!$omp section
|
||||
if(params%nmode.eq.(65+9)) then !Do the other mode (we're in dual mode)
|
||||
if (params%ntxmode.eq.9) then
|
||||
if(newdat65) dd(1:npts65)=id2(1:npts65)
|
||||
nf1=params%nfa
|
||||
nf2=params%nfb
|
||||
call timer('jt65a ',0)
|
||||
call my_jt65%decode(jt65_decoded,dd,npts65,newdat65,params%nutc, &
|
||||
nf1,nf2,params%nfqso,ntol65,params%nsubmode,params%minsync, &
|
||||
logical(params%nagain),params%n2pass,logical(params%nrobust), &
|
||||
ntrials,params%naggressive,params%ndepth,params%emedelay, &
|
||||
logical(params%nclearave),params%mycall,params%hiscall, &
|
||||
params%hisgrid,params%nexp_decode)
|
||||
call timer('jt65a ',1)
|
||||
else
|
||||
call timer('decjt9 ',0)
|
||||
call my_jt9%decode(jt9_decoded,ss,id2,params%nfqso, &
|
||||
newdat9,params%npts8,params%nfa,params%nfsplit,params%nfb, &
|
||||
params%ntol,params%nzhsym,logical(params%nagain), &
|
||||
params%ndepth,params%nmode,params%nsubmode,params%nexp_decode)
|
||||
call timer('decjt9 ',1)
|
||||
end if
|
||||
endif
|
||||
|
||||
!$omp end parallel sections
|
||||
|
||||
! JT65 is not yet producing info for nsynced, ndecoded.
|
||||
800 ndecoded = my_jt4%decoded + my_jt65%decoded + my_jt9%decoded + my_ft8%decoded
|
||||
write(*,1010) nsynced,ndecoded
|
||||
1010 format('<DecodeFinished>',2i4)
|
||||
call flush(6)
|
||||
close(13)
|
||||
if(params%nmode.eq.4 .or. params%nmode.eq.65) close(14)
|
||||
|
||||
return
|
||||
|
||||
contains
|
||||
|
||||
subroutine jt4_decoded(this,snr,dt,freq,have_sync,sync,is_deep, &
|
||||
decoded0,qual,ich,is_average,ave)
|
||||
implicit none
|
||||
class(jt4_decoder), intent(inout) :: this
|
||||
integer, intent(in) :: snr
|
||||
real, intent(in) :: dt
|
||||
integer, intent(in) :: freq
|
||||
logical, intent(in) :: have_sync
|
||||
logical, intent(in) :: is_deep
|
||||
character(len=1), intent(in) :: sync
|
||||
character(len=22), intent(in) :: decoded0
|
||||
real, intent(in) :: qual
|
||||
integer, intent(in) :: ich
|
||||
logical, intent(in) :: is_average
|
||||
integer, intent(in) :: ave
|
||||
|
||||
character*22 decoded
|
||||
character*3 cflags
|
||||
|
||||
if(ich.eq.-99) stop !Silence compiler warning
|
||||
if (have_sync) then
|
||||
decoded=decoded0
|
||||
cflags=' '
|
||||
if(decoded.ne.' ') cflags='f '
|
||||
if(is_deep) then
|
||||
cflags(1:2)='d1'
|
||||
write(cflags(3:3),'(i1)') min(int(qual),9)
|
||||
if(qual.ge.10.0) cflags(3:3)='*'
|
||||
if(qual.lt.3.0) decoded(22:22)='?'
|
||||
endif
|
||||
if(is_average) then
|
||||
write(cflags(2:2),'(i1)') min(ave,9)
|
||||
if(ave.ge.10) cflags(2:2)='*'
|
||||
endif
|
||||
write(*,1000) params%nutc,snr,dt,freq,sync,decoded,cflags
|
||||
1000 format(i4.4,i4,f5.1,i5,1x,'$',a1,1x,a22,1x,a3)
|
||||
else
|
||||
write(*,1000) params%nutc,snr,dt,freq
|
||||
end if
|
||||
|
||||
select type(this)
|
||||
type is (counting_jt4_decoder)
|
||||
this%decoded = this%decoded + 1
|
||||
end select
|
||||
end subroutine jt4_decoded
|
||||
|
||||
subroutine jt4_average (this, used, utc, sync, dt, freq, flip)
|
||||
implicit none
|
||||
class(jt4_decoder), intent(inout) :: this
|
||||
logical, intent(in) :: used
|
||||
integer, intent(in) :: utc
|
||||
real, intent(in) :: sync
|
||||
real, intent(in) :: dt
|
||||
integer, intent(in) :: freq
|
||||
logical, intent(in) :: flip
|
||||
character(len=1) :: cused, csync
|
||||
|
||||
cused = '.'
|
||||
csync = '*'
|
||||
if (used) cused = '$'
|
||||
if (flip) csync = '$'
|
||||
write(14,1000) cused,utc,sync,dt,freq,csync
|
||||
1000 format(a1,i5.4,f6.1,f6.2,i6,1x,a1)
|
||||
end subroutine jt4_average
|
||||
|
||||
subroutine jt65_decoded(this,sync,snr,dt,freq,drift,nflip,width, &
|
||||
decoded0,ft,qual,nsmo,nsum,minsync)
|
||||
|
||||
use jt65_decode
|
||||
implicit none
|
||||
|
||||
class(jt65_decoder), intent(inout) :: this
|
||||
real, intent(in) :: sync
|
||||
integer, intent(in) :: snr
|
||||
real, intent(in) :: dt
|
||||
integer, intent(in) :: freq
|
||||
integer, intent(in) :: drift
|
||||
integer, intent(in) :: nflip
|
||||
real, intent(in) :: width
|
||||
character(len=22), intent(in) :: decoded0
|
||||
integer, intent(in) :: ft
|
||||
integer, intent(in) :: qual
|
||||
integer, intent(in) :: nsmo
|
||||
integer, intent(in) :: nsum
|
||||
integer, intent(in) :: minsync
|
||||
|
||||
integer i,nft
|
||||
logical is_deep,is_average
|
||||
character decoded*22,csync*2,cflags*3
|
||||
|
||||
if(width.eq.-9999.0) stop !Silence compiler warning
|
||||
!$omp critical(decode_results)
|
||||
decoded=decoded0
|
||||
cflags=' '
|
||||
is_deep=ft.eq.2
|
||||
|
||||
if(ft.ge.80) then !QRA64 mode
|
||||
nft=ft-100
|
||||
csync=': '
|
||||
if(sync-3.4.ge.float(minsync) .or. nft.ge.0) csync=':*'
|
||||
if(nft.lt.0) then
|
||||
write(*,1009) params%nutc,snr,dt,freq,csync,decoded
|
||||
else
|
||||
write(*,1009) params%nutc,snr,dt,freq,csync,decoded,nft
|
||||
1009 format(i4.4,i4,f5.1,i5,1x,a2,1x,a22,i2)
|
||||
endif
|
||||
write(13,1011) params%nutc,nint(sync),snr,dt,float(freq),drift, &
|
||||
decoded,nft
|
||||
1011 format(i4.4,i4,i5,f6.2,f8.0,i4,3x,a22,' QRA64',i3)
|
||||
go to 100
|
||||
endif
|
||||
|
||||
if(ft.eq.0 .and. minsync.ge.0 .and. int(sync).lt.minsync) then
|
||||
write(*,1010) params%nutc,snr,dt,freq
|
||||
else
|
||||
is_average=nsum.ge.2
|
||||
if(bVHF .and. ft.gt.0) then
|
||||
cflags='f '
|
||||
if(is_deep) then
|
||||
cflags(1:2)='d1'
|
||||
write(cflags(3:3),'(i1)') min(qual,9)
|
||||
if(qual.ge.10) cflags(3:3)='*'
|
||||
if(qual.lt.3) decoded(22:22)='?'
|
||||
endif
|
||||
if(is_average) then
|
||||
write(cflags(2:2),'(i1)') min(nsum,9)
|
||||
if(nsum.ge.10) cflags(2:2)='*'
|
||||
endif
|
||||
endif
|
||||
csync='# '
|
||||
i=0
|
||||
if(bVHF .and. nflip.ne.0 .and. &
|
||||
sync.ge.max(0.0,float(minsync))) then
|
||||
csync='#*'
|
||||
if(nflip.eq.-1) then
|
||||
csync='##'
|
||||
if(decoded.ne.' ') then
|
||||
do i=22,1,-1
|
||||
if(decoded(i:i).ne.' ') exit
|
||||
enddo
|
||||
if(i.gt.18) i=18
|
||||
decoded(i+2:i+4)='OOO'
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
write(*,1010) params%nutc,snr,dt,freq,csync,decoded,cflags
|
||||
1010 format(i4.4,i4,f5.1,i5,1x,a2,1x,a22,1x,a3)
|
||||
endif
|
||||
write(13,1012) params%nutc,nint(sync),snr,dt,float(freq),drift, &
|
||||
decoded,ft,nsum,nsmo
|
||||
1012 format(i4.4,i4,i5,f6.2,f8.0,i4,3x,a22,' JT65',3i3)
|
||||
|
||||
100 call flush(6)
|
||||
|
||||
!$omp end critical(decode_results)
|
||||
select type(this)
|
||||
type is (counting_jt65_decoder)
|
||||
this%decoded = this%decoded + 1
|
||||
end select
|
||||
end subroutine jt65_decoded
|
||||
|
||||
subroutine jt9_decoded (this, sync, snr, dt, freq, drift, decoded)
|
||||
use jt9_decode
|
||||
implicit none
|
||||
|
||||
class(jt9_decoder), intent(inout) :: this
|
||||
real, intent(in) :: sync
|
||||
integer, intent(in) :: snr
|
||||
real, intent(in) :: dt
|
||||
real, intent(in) :: freq
|
||||
integer, intent(in) :: drift
|
||||
character(len=22), intent(in) :: decoded
|
||||
|
||||
!$omp critical(decode_results)
|
||||
write(*,1000) params%nutc,snr,dt,nint(freq),decoded
|
||||
1000 format(i4.4,i4,f5.1,i5,1x,'@ ',1x,a22)
|
||||
write(13,1002) params%nutc,nint(sync),snr,dt,freq,drift,decoded
|
||||
1002 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a22,' JT9')
|
||||
call flush(6)
|
||||
!$omp end critical(decode_results)
|
||||
select type(this)
|
||||
type is (counting_jt9_decoder)
|
||||
this%decoded = this%decoded + 1
|
||||
end select
|
||||
end subroutine jt9_decoded
|
||||
|
||||
subroutine ft8_decoded (this,sync,snr,dt,freq,nbadcrc,decoded)
|
||||
use ft8_decode
|
||||
implicit none
|
||||
|
||||
class(ft8_decoder), intent(inout) :: this
|
||||
real, intent(in) :: sync
|
||||
integer, intent(in) :: snr
|
||||
real, intent(in) :: dt
|
||||
real, intent(in) :: freq
|
||||
integer, intent(in) :: nbadcrc
|
||||
character(len=22), intent(in) :: decoded
|
||||
|
||||
if(nbadcrc.eq.0) then
|
||||
write(*,1000) params%nutc,snr,dt,nint(freq),decoded
|
||||
1000 format(i6.6,i4,f5.1,i5,' ~ ',1x,a22)
|
||||
write(13,1002) params%nutc,nint(sync),snr,dt,freq,0,decoded
|
||||
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a22,' FT8')
|
||||
call flush(6)
|
||||
call flush(13)
|
||||
endif
|
||||
|
||||
select type(this)
|
||||
type is (counting_ft8_decoder)
|
||||
this%decoded = this%decoded + 1
|
||||
end select
|
||||
|
||||
return
|
||||
end subroutine ft8_decoded
|
||||
|
||||
end subroutine multimode_decoder
|
||||
@@ -0,0 +1,74 @@
|
||||
// Status=review
|
||||
|
||||
_WSJT-X_ is a computer program designed to facilitate basic amateur
|
||||
radio communication using very weak signals. The first four letters in
|
||||
the program name stand for "`**W**eak **S**ignal communication by
|
||||
K1**JT**,`" while the suffix "`-X`" indicates that _WSJT-X_ started as
|
||||
an extended and experimental branch of the program
|
||||
_WSJT_.
|
||||
|
||||
_WSJT-X_ Version 1.9 offers nine different protocols or modes: *FT8*,
|
||||
*JT4*, *JT9*, *JT65*, *QRA64*, *ISCAT*, *MSK144*, *WSPR*, and *Echo*.
|
||||
The first five are designed for making reliable QSOs under extreme
|
||||
weak-signal conditions. They use nearly identical message structure
|
||||
and source encoding. JT65 and QRA64 were designed for EME
|
||||
("`moonbounce`") on the VHF/UHF bands and have also proven very
|
||||
effective for worldwide QRP communication on the HF bands. QRA64 has
|
||||
a number of advantages over JT65, including better performance on the
|
||||
very weakest signals. We imagine that over time it may replace JT65
|
||||
for EME use. JT9 was originally designed for the LF, MF, and lower HF
|
||||
bands. Its submode JT9A is 2 dB more sensitive than JT65 while using
|
||||
less than 10% of the bandwidth. JT4 offers a wide variety of tone
|
||||
spacings and has proven highly effective for EME on microwave bands up
|
||||
to 24 GHz. These four "`slow`" modes use one-minute timed sequences
|
||||
of alternating transmission and reception, so a minimal QSO takes four
|
||||
to six minutes — two or three transmissions by each station, one
|
||||
sending in odd UTC minutes and the other even. FT8 is operationally
|
||||
similar but four times faster (15-second T/R sequences) and less
|
||||
sensitive by a few dB. On the HF bands, world-wide QSOs are possible
|
||||
with any of these modes using power levels of a few watts (or even
|
||||
milliwatts) and compromise antennas. On VHF bands and higher, QSOs
|
||||
are possible (by EME and other propagation types) at signal levels 10
|
||||
to 15 dB below those required for CW.
|
||||
|
||||
*ISCAT*, *MSK144*, and optionally submodes *JT9E-H* are "`fast`"
|
||||
protocols designed to take advantage of brief signal enhancements from
|
||||
ionized meteor trails, aircraft scatter, and other types of scatter
|
||||
propagation. These modes use timed sequences of 5, 10, 15, or 30 s
|
||||
duration. User messages are transmitted repeatedly at high rate (up
|
||||
to 250 characters per second, for MSK144) to make good use of the
|
||||
shortest meteor-trail reflections or "`pings`". ISCAT uses free-form
|
||||
messages up to 28 characters long, while MSK144 uses the same
|
||||
structured messages as the slow modes and optionally an abbreviated
|
||||
format with hashed callsigns.
|
||||
|
||||
*WSPR* (pronounced "`whisper`") stands for **W**eak **S**ignal
|
||||
**P**ropagation **R**eporter. The WSPR protocol was designed for probing
|
||||
potential propagation paths using low-power transmissions. WSPR
|
||||
messages normally carry the transmitting station’s callsign, grid
|
||||
locator, and transmitter power in dBm, and they can be decoded at
|
||||
signal-to-noise ratios as low as -28 dB in a 2500 Hz bandwidth. WSPR
|
||||
users with internet access can automatically upload reception
|
||||
reports to a central database called {wsprnet} that provides a mapping
|
||||
facility, archival storage, and many other features.
|
||||
|
||||
*Echo* mode allows you to detect and measure your own station's echoes
|
||||
from the moon, even if they are far below the audible threshold.
|
||||
|
||||
_WSJT-X_ provides spectral displays for receiver passbands as wide as
|
||||
5 kHz, flexible rig control for nearly all modern radios used by
|
||||
amateurs, and a wide variety of special aids such as automatic Doppler
|
||||
tracking for EME QSOs and Echo testing. The program runs equally well
|
||||
on Windows, Macintosh, and Linux systems, and installation packages
|
||||
are available for all three platforms.
|
||||
|
||||
*Version Numbers:* _WSJT-X_ release numbers have major, minor, and
|
||||
patch numbers separated by periods: for example, _WSJT-X_ Version
|
||||
1.9.0. Temporary "`beta`" release candidates are sometimes made in
|
||||
advance of a new general-availability release, in order to obtain user
|
||||
feedback. For example, version 1.9.0-rc1, 1.9.0-rc2, etc., would
|
||||
be beta releases leading up to the final release of v1.9.0.
|
||||
Release candidates should be used _only_ during a short testing
|
||||
period. They carry an implied obligation to provide feedback to the
|
||||
program development group. Candidate releases should not be used on
|
||||
the air after a full release with the same number has been made.
|
||||
@@ -0,0 +1,62 @@
|
||||
Here are the "displayWidgets()" strings for WSJT-X modes
|
||||
|
||||
1 2 3
|
||||
012345678901234567890123456789012
|
||||
----------------------------------------------
|
||||
JT4 111010000000111000110000000000000
|
||||
JT4/VHF 111110010010111110111100000000000
|
||||
JT9 111010000000111000010000000000001
|
||||
JT9/VHF 111110101000111110010000000000000
|
||||
JT9+JT65 111010000001111000010000000000001
|
||||
JT65 111010000000111000010000000000001
|
||||
JT65/VHF 111110010000111110101100010000000
|
||||
QRA64 111110010110111110000000001000000
|
||||
ISCAT 100111000000000110000000000000000
|
||||
MSK144 101111110100000000010001000010000
|
||||
WSPR 000000000000000001010000000000000
|
||||
Echo 000000000000000000000010000000000
|
||||
FCal 001101000000000000000000000001000
|
||||
FT8 111010000100111000010000100100001
|
||||
FT8/VHF 111010000100111000010000100110001
|
||||
FT8/Fox 111010000100111000010000000000100
|
||||
FT8/Hound 111010000100111000010000000000110
|
||||
----------------------------------------------
|
||||
1 2 3
|
||||
012345678901234567890123456789012
|
||||
|
||||
----------------------------------------------
|
||||
Mapping of column numbers to widgets
|
||||
----------------------------------------------
|
||||
0. txFirstCheckbox
|
||||
1. TxFreqSpinBox
|
||||
2. RxFreqSpinBox
|
||||
3. sbFtol
|
||||
4. rptSpinBox
|
||||
5. sbTR
|
||||
6. sbCQTxFreq, cbCQTx
|
||||
7. cbShMsgs
|
||||
8. cbFast9
|
||||
9. cbAutoSeq
|
||||
10. cbTx6
|
||||
11. pbTxMode
|
||||
12. pbR2T
|
||||
13. pbT2R
|
||||
14. cbHoldTxFreq
|
||||
15. sbSubmode
|
||||
16. syncSpinBox
|
||||
17. WSPR_Controls_Widget
|
||||
18. ClrAvgButton
|
||||
19. Fast/Normal/Deep
|
||||
20. Include Avg
|
||||
21. Include Deep Search
|
||||
22. Echo Graph
|
||||
23. cbSWL
|
||||
24. AP FT8
|
||||
25. AP JT65
|
||||
26. AP DX Call
|
||||
27. cbFirst
|
||||
28. cbVHFcontest
|
||||
29. measure_check_box
|
||||
30. labDXped
|
||||
31. cbRxAll
|
||||
32. cbCQonly
|
||||
@@ -0,0 +1,162 @@
|
||||
#include "Radio.hpp"
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
#include <QString>
|
||||
#include <QChar>
|
||||
#include <QRegularExpression>
|
||||
|
||||
namespace Radio
|
||||
{
|
||||
namespace
|
||||
{
|
||||
double constexpr MHz_factor {1.e6};
|
||||
int constexpr frequency_precsion {6};
|
||||
|
||||
// very loose validation - callsign must contain a letter next to
|
||||
// a number
|
||||
QRegularExpression valid_callsign_regexp {R"(\d[[:alpha:]]|[[:alpha:]]\d)"};
|
||||
|
||||
// suffixes that are often used and should not be interpreted as a
|
||||
// DXCC Entity prefix used as a suffix
|
||||
QRegularExpression non_prefix_suffix {R"(\A([0-9AMPQR]|QRP|F[DF]|[AM]M|L[HT]|LGT)\z)"};
|
||||
}
|
||||
|
||||
|
||||
Frequency frequency (QVariant const& v, int scale, bool * ok, QLocale const& locale)
|
||||
{
|
||||
double value {0.};
|
||||
if (QVariant::String == v.type ())
|
||||
{
|
||||
value = locale.toDouble (v.value<QString> (), ok);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = v.toDouble ();
|
||||
if (ok) *ok = true;
|
||||
}
|
||||
value *= std::pow (10., scale);
|
||||
if (ok)
|
||||
{
|
||||
if (value < 0. || value > std::numeric_limits<Frequency>::max ())
|
||||
{
|
||||
value = 0.;
|
||||
*ok = false;
|
||||
}
|
||||
}
|
||||
return std::llround (value);
|
||||
}
|
||||
|
||||
FrequencyDelta frequency_delta (QVariant const& v, int scale, bool * ok, QLocale const& locale)
|
||||
{
|
||||
double value {0.};
|
||||
if (QVariant::String == v.type ())
|
||||
{
|
||||
value = locale.toDouble (v.value<QString> (), ok);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = v.toDouble ();
|
||||
if (ok) *ok = true;
|
||||
}
|
||||
value *= std::pow (10., scale);
|
||||
if (ok)
|
||||
{
|
||||
if (value < -std::numeric_limits<Frequency>::max ()
|
||||
|| value > std::numeric_limits<Frequency>::max ())
|
||||
{
|
||||
value = 0.;
|
||||
*ok = false;
|
||||
}
|
||||
}
|
||||
return std::llround (value);
|
||||
}
|
||||
|
||||
|
||||
QString frequency_MHz_string (Frequency f, QLocale const& locale)
|
||||
{
|
||||
return locale.toString (f / MHz_factor, 'f', frequency_precsion);
|
||||
}
|
||||
|
||||
QString frequency_MHz_string (FrequencyDelta d, QLocale const& locale)
|
||||
{
|
||||
return locale.toString (d / MHz_factor, 'f', frequency_precsion);
|
||||
}
|
||||
|
||||
QString pretty_frequency_MHz_string (Frequency f, QLocale const& locale)
|
||||
{
|
||||
auto f_string = locale.toString (f / MHz_factor, 'f', frequency_precsion);
|
||||
return f_string.insert (f_string.size () - 3, QChar::Nbsp);
|
||||
}
|
||||
|
||||
QString pretty_frequency_MHz_string (double f, int scale, QLocale const& locale)
|
||||
{
|
||||
auto f_string = locale.toString (f / std::pow (10., scale - 6), 'f', frequency_precsion);
|
||||
return f_string.insert (f_string.size () - 3, QChar::Nbsp);
|
||||
}
|
||||
|
||||
QString pretty_frequency_MHz_string (FrequencyDelta d, QLocale const& locale)
|
||||
{
|
||||
auto d_string = locale.toString (d / MHz_factor, 'f', frequency_precsion);
|
||||
return d_string.insert (d_string.size () - 3, QChar::Nbsp);
|
||||
}
|
||||
|
||||
bool is_callsign (QString const& callsign)
|
||||
{
|
||||
return callsign.contains (valid_callsign_regexp);
|
||||
}
|
||||
|
||||
bool is_compound_callsign (QString const& callsign)
|
||||
{
|
||||
return callsign.contains ('/');
|
||||
}
|
||||
|
||||
// split on first '/' and return the larger portion or the whole if
|
||||
// there is no '/'
|
||||
QString base_callsign (QString callsign)
|
||||
{
|
||||
auto slash_pos = callsign.indexOf ('/');
|
||||
if (slash_pos >= 0)
|
||||
{
|
||||
auto right_size = callsign.size () - slash_pos - 1;
|
||||
if (right_size>= slash_pos)
|
||||
{
|
||||
callsign = callsign.mid (slash_pos + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
callsign = callsign.left (slash_pos);
|
||||
}
|
||||
}
|
||||
return callsign.toUpper ();
|
||||
}
|
||||
|
||||
// analyze the callsign and determine the effective prefix, returns
|
||||
// the full call if no valid prefix (or prefix as a suffix) is specified
|
||||
QString effective_prefix (QString callsign)
|
||||
{
|
||||
auto prefix = callsign.toUpper ();
|
||||
auto slash_pos = callsign.indexOf ('/');
|
||||
if (slash_pos >= 0)
|
||||
{
|
||||
auto right_size = callsign.size () - slash_pos - 1;
|
||||
if (right_size >= slash_pos) // naive call is longer than
|
||||
// prefix/suffix algorithm
|
||||
{
|
||||
prefix = callsign.left (slash_pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
prefix = callsign.mid (slash_pos + 1);
|
||||
if (prefix.contains (non_prefix_suffix))
|
||||
{
|
||||
prefix = callsign.left (slash_pos); // ignore
|
||||
// non-prefix
|
||||
// suffixes
|
||||
}
|
||||
}
|
||||
}
|
||||
return prefix;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<table cellspacing=1>
|
||||
<tr><td><b>F1 </b></td><td>Online User's Guide</td></tr>
|
||||
<tr><td><b>Shift+F1 </b></td><td>Copyright Notice</td></tr>
|
||||
<tr><td><b>Ctrl+F1 </b></td><td>About WSJT-X</td></tr>
|
||||
<tr><td><b>F2 </b></td><td>Open settings window</td></tr>
|
||||
<tr><td><b>F3 </b></td><td>Display keyboard shortcuts</td></tr>
|
||||
<tr><td><b>F4 </b></td><td>Clear DX Call, DX Grid, Tx messages 1-4</td></tr>
|
||||
<tr><td><b>Alt+F4 </b></td><td>Exit program</td></tr>
|
||||
<tr><td><b>F5 </b></td><td>Display special mouse commands</td></tr>
|
||||
<tr><td><b>F6 </b></td><td>Open next file in directory</td></tr>
|
||||
<tr><td><b>Shift+F6 </b></td><td>Decode all remaining files in directrory</td></tr>
|
||||
<tr><td><b>F7 </b></td><td>Display Message Averaging window</td></tr>
|
||||
<tr><td><b>F11 </b></td><td>Move Rx frequency down 1 Hz</td></tr>
|
||||
<tr><td><b>Ctrl+F11 </b></td><td>Move identical Rx and Tx frequencies down 1 Hz</td></tr>
|
||||
<tr><td><b>Shift+F11 </b></td><td>Move Tx frequency down 60 Hz</td></tr>
|
||||
<tr><td><b>F12 </b></td><td>Move Rx frequency up 1 Hz</td></tr>
|
||||
<tr><td><b>Ctrl+F12 </b></td><td>Move identical Rx and Tx frequencies up 1 Hz</td></tr>
|
||||
<tr><td><b>Shift+F12 </b></td><td>Move Tx frequency up 60 Hz</td></tr>
|
||||
<tr><td><b>Alt+1-6 </b></td><td>Set now transmission to this number on Tab 1</td></tr>
|
||||
<tr><td><b>Ctl+1-6 </b></td><td>Set next transmission to this number on Tab 1</td></tr>
|
||||
<tr><td><b>Alt+D </b></td><td>Decode again at QSO frequency</td></tr>
|
||||
<tr><td><b>Shift+D </b></td><td>Full decode (both windows)</td></tr>
|
||||
<tr><td><b>Ctrl+E </b></td><td>Turn on TX even/1st</td></tr>
|
||||
<tr><td><b>Shift+E </b></td><td>Turn off TX even/1st</td></tr>
|
||||
<tr><td><b>Alt+E </b></td><td>Erase</td></tr>
|
||||
<tr><td><b>Ctrl+F </b></td><td>Edit the free text message box</td></tr>
|
||||
<tr><td><b>Alt+G </b></td><td>Generate standard messages</td></tr>
|
||||
<tr><td><b>Alt+H </b></td><td>Halt Tx</td></tr>
|
||||
<tr><td><b>Ctrl+L </b></td><td>Lookup callsign in database, generate standard messages</td></tr>
|
||||
<tr><td><b>Alt+M </b></td><td>Monitor</td></tr>
|
||||
<tr><td><b>Alt+N </b></td><td>Enable Tx</td></tr>
|
||||
<tr><td><b>Ctrl+O </b></td><td>Open a .wav file</td></tr>
|
||||
<tr><td><b>Alt+Q </b></td><td>Log QSO</td></tr>
|
||||
<tr><td><b>Alt+S </b></td><td>Stop monitoring</td></tr>
|
||||
<tr><td><b>Alt+T </b></td><td>Tune</td></tr>
|
||||
<tr><td><b>Alt+V </b></td><td>Save the most recently completed *.wav file</td></tr>
|
||||
</table>
|
||||
Reference in New Issue
Block a user