mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-05-03 14:54:02 -04:00
------------------------------------------------------------------------
r8085 | k9an | 2017-09-13 01:46:16 +0100 (Wed, 13 Sep 2017) | 1 line
Open up DT range to +/- 2.5 s for testing.
------------------------------------------------------------------------
r8086 | bsomervi | 2017-09-16 11:12:38 +0100 (Sat, 16 Sep 2017) | 1 line
Do not allow window manager events to close the astronomical data window
------------------------------------------------------------------------
r8087 | bsomervi | 2017-09-16 21:27:05 +0100 (Sat, 16 Sep 2017) | 4 lines
Fix regression in ADIF parser that caused failure with missing header
Improved robustness of the ADIF parser and re-factored to more
idiomatic C++.
------------------------------------------------------------------------
r8088 | bsomervi | 2017-09-16 21:27:13 +0100 (Sat, 16 Sep 2017) | 1 line
Update band limits as per ADIF 3.0.6 specification
------------------------------------------------------------------------
r8089 | bsomervi | 2017-09-16 21:27:20 +0100 (Sat, 16 Sep 2017) | 1 line
Use a single definition of band limits (Bands class)
------------------------------------------------------------------------
r8090 | bsomervi | 2017-09-16 21:27:33 +0100 (Sat, 16 Sep 2017) | 5 lines
Add button to the decoded text window context menu to erase the contents
Right-click either decoded text window to erase its contents. The
"Erase" button on the main UI still operates as before although it is
implemented differently now.
------------------------------------------------------------------------
r8091 | bsomervi | 2017-09-16 23:20:51 +0100 (Sat, 16 Sep 2017) | 1 line
Correct the actions taken when clearing decodes windows
------------------------------------------------------------------------
r8092 | bsomervi | 2017-09-16 23:20:59 +0100 (Sat, 16 Sep 2017) | 8 lines
Restore functionality of sending .WAV playback decodes to UDP
Extended the Decode and WSPRDecode UDP messages with an "off air"
boolean field indicating the decode was derived from a .WAV fle
playback rather than an on air reception.
Extended reference applications to use the new off air decode message
field.
------------------------------------------------------------------------
r8093 | k9an | 2017-09-17 16:34:32 +0100 (Sun, 17 Sep 2017) | 1 line
Experimental tweak to FT8 decoder. Try a second symbol metric if
the first one fails - currently configured to use max-amplitude
and max-log.
------------------------------------------------------------------------
r8094 | k9an | 2017-09-17 21:43:30 +0100 (Sun, 17 Sep 2017) | 1 line
Restore the use of max-amplitude for ap passes.
------------------------------------------------------------------------
r8095 | k1jt | 2017-09-18 16:42:14 +0100 (Mon, 18 Sep 2017) | 2 lines
Allow specialized use of "x2 Tone Spacing" in FT8 mode.
------------------------------------------------------------------------
r8096 | k1jt | 2017-09-18 16:47:29 +0100 (Mon, 18 Sep 2017) | 2 lines
Allow X2 tone spacing also in JT9 (slow) modes.
------------------------------------------------------------------------
r8097 | k1jt | 2017-09-18 21:42:18 +0100 (Mon, 18 Sep 2017) | 2 lines
Change CRLF line endings to *nix style.
------------------------------------------------------------------------
r8098 | k1jt | 2017-09-19 17:04:10 +0100 (Tue, 19 Sep 2017) | 2 lines
Add a missing step to description of the Frequency Calibration procedure.
------------------------------------------------------------------------
r8099 | k1jt | 2017-09-20 17:31:04 +0100 (Wed, 20 Sep 2017) | 1 line
Insert a link to FT8_Operating_Tips.pdf.
------------------------------------------------------------------------
r8100 | k1jt | 2017-09-20 20:11:04 +0100 (Wed, 20 Sep 2017) | 3 lines
As an experiment, move "NA VHF Contest Mode" checkbox to main screen and
query operator if d>10000 km.
------------------------------------------------------------------------
r8101 | k1jt | 2017-09-20 20:19:47 +0100 (Wed, 20 Sep 2017) | 2 lines
Correct a tool-tip typo.
------------------------------------------------------------------------
r8102 | bsomervi | 2017-09-22 13:31:01 +0100 (Fri, 22 Sep 2017) | 1 line
UI tweaks to improve portability between platforms and font size changes
------------------------------------------------------------------------
r8103 | bsomervi | 2017-09-22 16:36:24 +0100 (Fri, 22 Sep 2017) | 5 lines
Extend UDP Reply message with keyboard modifiers
This allows UDP servers to emulate keyboard modified double-clicks on
decoded messages, E.g. ALT+double-click for replying to a CQ or QRZ
call without changing ones Tx frequency offset.
------------------------------------------------------------------------
r8104 | bsomervi | 2017-09-22 16:49:42 +0100 (Fri, 22 Sep 2017) | 1 line
Updated AD1C cty.dat file (21st Sept 2017)
------------------------------------------------------------------------
r8105 | k1jt | 2017-09-22 18:38:51 +0100 (Fri, 22 Sep 2017) | 2 lines
Another attempt at eliminating confusion when NA VHF Contest Mode is in use.
------------------------------------------------------------------------
r8106 | k9an | 2017-09-22 21:36:52 +0100 (Fri, 22 Sep 2017) | 1 line
Make sure that fastGrph is properly initialized.
------------------------------------------------------------------------
r8107 | bsomervi | 2017-09-22 23:08:41 +0100 (Fri, 22 Sep 2017) | 1 line
Improve performance of the UDP reference application message_aggregator
------------------------------------------------------------------------
r8108 | bsomervi | 2017-09-22 23:08:49 +0100 (Fri, 22 Sep 2017) | 1 line
Fix a regression in processing incoming Reply UDP messages
------------------------------------------------------------------------
r8109 | bsomervi | 2017-09-22 23:08:56 +0100 (Fri, 22 Sep 2017) | 4 lines
Better handling of worked before and country name display
Appended text is added at a fixed column unless the message overlaps
in which case the appended information floats to thr right.
------------------------------------------------------------------------
r8110 | bsomervi | 2017-09-22 23:09:04 +0100 (Fri, 22 Sep 2017) | 4 lines
Restore printing of MSK144 decode quality information
Now that a way of dealing with worked before and country information
without losing this information has been found.
------------------------------------------------------------------------
r8111 | bsomervi | 2017-09-22 23:09:11 +0100 (Fri, 22 Sep 2017) | 5 lines
Fix an issue with truncated free text messages being generated
This is an edge case when working a call like RI9F/GM4WJS where it is
not possible to confirm receipt of the full compound callsign in a Tx5
73 message as "RI9F/GM4WJS 73" is 14 characters.
------------------------------------------------------------------------
r8112 | bsomervi | 2017-09-23 19:09:29 +0100 (Sat, 23 Sep 2017) | 1 line
Tidy up some ugly code
------------------------------------------------------------------------
r8113 | bsomervi | 2017-09-23 19:09:37 +0100 (Sat, 23 Sep 2017) | 1 line
Clean up some main window UI layout
------------------------------------------------------------------------
r8114 | k9an | 2017-09-23 20:39:42 +0100 (Sat, 23 Sep 2017) | 1 line
Comment out some diagnostic writes.
------------------------------------------------------------------------
r8115 | k9an | 2017-09-23 20:56:45 +0100 (Sat, 23 Sep 2017) | 1 line
Add some text for section 13.3 of the User Guide.
------------------------------------------------------------------------
r8116 | k9an | 2017-09-23 21:01:31 +0100 (Sat, 23 Sep 2017) | 1 line
Minor change to new_features.adoc.
------------------------------------------------------------------------
r8117 | bsomervi | 2017-09-23 23:02:24 +0100 (Sat, 23 Sep 2017) | 1 line
Minor additions to MSK144 phase eq docs
------------------------------------------------------------------------
r8118 | k9an | 2017-09-23 23:32:06 +0100 (Sat, 23 Sep 2017) | 1 line
Fix up Table 2 caption.
------------------------------------------------------------------------
r8119 | bsomervi | 2017-09-24 22:14:10 +0100 (Sun, 24 Sep 2017) | 1 line
Fix issues processing free text 73 messages
------------------------------------------------------------------------
r8120 | k1jt | 2017-09-25 18:02:52 +0100 (Mon, 25 Sep 2017) | 3 lines
First tests of "RR73 NOW ..." and "NIL NOW ..." (i3bit=1, 2) messages in FT8.
DO NOT USE THIS FEATURE ON THE AIR!
------------------------------------------------------------------------
r8121 | k1jt | 2017-09-25 20:21:25 +0100 (Mon, 25 Sep 2017) | 2 lines
Make bDXped a member variable, default to false.
------------------------------------------------------------------------
r8122 | bsomervi | 2017-09-26 00:38:19 +0100 (Tue, 26 Sep 2017) | 1 line
Fix regression in handling double-clicked CQ and QRZ calls
------------------------------------------------------------------------
r8123 | bsomervi | 2017-09-26 00:38:27 +0100 (Tue, 26 Sep 2017) | 1 line
Fix a regression handling compound calls in 73 messages
------------------------------------------------------------------------
r8124 | k1jt | 2017-09-27 13:26:33 +0100 (Wed, 27 Sep 2017) | 2 lines
Additions to Section 13.3 of WSJT-X User Guide: "Phase Equalkization".
------------------------------------------------------------------------
r8125 | k1jt | 2017-09-27 13:39:50 +0100 (Wed, 27 Sep 2017) | 31 lines
Experimental new behavior for "Lock Tx=Rx" and for clicking on waterfall and decoded text.
1. Checkbox "Lock Tx=Rx" is now labeled "Lock Tx Freq", and its meaning is
quite different. If checked, the audio Tx frequency cannot be changed.
It's like the "Lock" function on some transceivers.
2. Clicking on the Wide Graph waterfall and on lines of decoded text now
behave as follows:
Click on Action
---------------------------------------------------------------------
Waterfall: Click to set Rx frequency
Shift-click to set Tx frequency
Ctrl-click to set Rx and Tx frequencies
If Lock Tx Freq is checked, Tx freq does not move
Double-click to set Rx frequency and decode there
Decoded Text: Double-click to copy transmitting callsign to DX Call
and locator to DX Grid; change Rx frequency to decoded
signal's frequency; generate standard messages.
Tx frequency is not changed unless Ctrl is held down
and Lock Tx Freq not checked.
If this experimental behavior is adopted, some descriptions in the
User Guide and Special Mouse Commands will need to be updated.
3. Starting to implement a new function on the Tools menu,
"Solve for calibration parameters". This is not yet finished;
DO NOT USE in its present form.
------------------------------------------------------------------------
r8126 | k1jt | 2017-09-27 13:50:21 +0100 (Wed, 27 Sep 2017) | 2 lines
Add missing routine.
------------------------------------------------------------------------
r8127 | k1jt | 2017-09-28 02:35:09 +0100 (Thu, 28 Sep 2017) | 1 line
Functional 'Solve for calibration parameters' on Tools menu.
------------------------------------------------------------------------
r8128 | k1jt | 2017-09-28 13:30:52 +0100 (Thu, 28 Sep 2017) | 1 line
dummy
------------------------------------------------------------------------
r8129 | k9an | 2017-09-28 16:00:57 +0100 (Thu, 28 Sep 2017) | 1 line
Correct a typo in the docs.
------------------------------------------------------------------------
r8130 | k1jt | 2017-09-28 16:05:41 +0100 (Thu, 28 Sep 2017) | 1 line
Minor edits in User Guide.
------------------------------------------------------------------------
r8131 | k1jt | 2017-09-28 16:09:46 +0100 (Thu, 28 Sep 2017) | 3 lines
Fix two ways that Loxk Tx Freq could be circumvented; display Echo Graph
automatically when Echo mode is started; clean up display of FreqCal parameters.
------------------------------------------------------------------------
r8132 | k1jt | 2017-09-28 16:46:36 +0100 (Thu, 28 Sep 2017) | 2 lines
Clean up the display of "Controls" checkbox on Wide Graph.
------------------------------------------------------------------------
r8133 | k1jt | 2017-09-28 16:55:24 +0100 (Thu, 28 Sep 2017) | 2 lines
Display "NIL NOW ", etc., only for test cases.
------------------------------------------------------------------------
r8134 | k1jt | 2017-09-28 20:51:04 +0100 (Thu, 28 Sep 2017) | 2 lines
Add some FreqCal info to User Guide.
------------------------------------------------------------------------
r8135 | k1jt | 2017-09-29 00:34:13 +0100 (Fri, 29 Sep 2017) | 1 line
Move 'Controls' checkbox a few pixels to the right.
------------------------------------------------------------------------
r8136 | bsomervi | 2017-09-29 11:46:43 +0100 (Fri, 29 Sep 2017) | 1 line
Fix accidental regression in UDP Reply message handling
------------------------------------------------------------------------
r8137 | bsomervi | 2017-09-29 11:57:22 +0100 (Fri, 29 Sep 2017) | 1 line
Minor clarification for the User Guide waterfall controls description
------------------------------------------------------------------------
r8138 | k1jt | 2017-09-29 14:27:55 +0100 (Fri, 29 Sep 2017) | 2 lines
Minor change to make shift/ctrl double-click logic more consistent.
------------------------------------------------------------------------
r8139 | k1jt | 2017-09-29 14:47:26 +0100 (Fri, 29 Sep 2017) | 1 line
Remove a diagnostic qDebug().
------------------------------------------------------------------------
r8140 | k1jt | 2017-09-29 14:59:16 +0100 (Fri, 29 Sep 2017) | 2 lines
Additional instructions for using the FreqCal procedure.
------------------------------------------------------------------------
r8141 | k1jt | 2017-09-29 17:53:28 +0100 (Fri, 29 Sep 2017) | 2 lines
Many updates to User Guide, mostly to reflect changes in "click behavior".
------------------------------------------------------------------------
r8142 | k1jt | 2017-09-29 17:53:57 +0100 (Fri, 29 Sep 2017) | 1 line
Update mouse_sommands.txt.
------------------------------------------------------------------------
r8143 | k1jt | 2017-09-29 17:58:05 +0100 (Fri, 29 Sep 2017) | 3 lines
Previous commit message should have mentioned a fix to "stdmsg.f90" that was
preventing double-click on a JT65 "OOO" message from populating message fields.
------------------------------------------------------------------------
r8144 | k1jt | 2017-09-29 18:40:30 +0100 (Fri, 29 Sep 2017) | 2 lines
Add an option to enforce simplex operation (moving both Tx and Rx
frequency) when double-clicking on a decoded text line.
------------------------------------------------------------------------
r8145 | k1jt | 2017-09-30 14:56:33 +0100 (Sat, 30 Sep 2017) | 1 line
Fix a regression that prevented double-click on call from working as in r8123.
------------------------------------------------------------------------
r8146 | k1jt | 2017-09-30 18:48:46 +0100 (Sat, 30 Sep 2017) | 21 lines
Another try at optimizing the GUI for simplex and split behavior. Details below:
1. Checkbox "Double-click on call sets Tx and Rx freqs" has been removed
from the Settings -> General tab.
2. Checkbox "Lock Tx Freq" on main window is relabled "Hold Tx Freq".
3. Behavior now defaults to the "simplex" behavior in use up to code
revision r8123. In particular, double-clicking on decoded mesages
that do not contain your own call moves both Rx and Tx frequencies.
If the first callsign is your own call, only Rx freq moves.
4. If "Hold Tx Freq" is checked, double-clicking on decoded messages
moves the Rx frequency; Tx frequency is moved only if CTRL was held
down.
5. Clicking on the waterfall moves Rx and Tx frequencies as before:
Rx only on a simple click, Tx only on SHIFT-click, and both on
CTRL-click. This happens even if "Hold Tx Freq" is checked (which
is why this box is no longer labeled "Lock Tx Freq").
------------------------------------------------------------------------
r8147 | k1jt | 2017-09-30 20:25:01 +0100 (Sat, 30 Sep 2017) | 1 line
Fix behavior with double-click on 'CQ <AA-ZZ> <call> <grid>.'
------------------------------------------------------------------------
r8148 | k1jt | 2017-10-01 13:35:43 +0100 (Sun, 01 Oct 2017) | 1 line
Correct an improper disabling of TxFreqSpinBox.
------------------------------------------------------------------------
r8149 | k1jt | 2017-10-01 15:03:16 +0100 (Sun, 01 Oct 2017) | 1 line
Update mouse_commands.txt and tool tips.
------------------------------------------------------------------------
r8150 | k1jt | 2017-10-01 15:58:10 +0100 (Sun, 01 Oct 2017) | 1 line
Update 'blank line' band ID at 4*TRperiod/5.
------------------------------------------------------------------------
r8151 | bsomervi | 2017-10-01 22:43:59 +0100 (Sun, 01 Oct 2017) | 1 line
Fix an invalid iterator increment when there are no FreqCal frequencies
------------------------------------------------------------------------
r8152 | bsomervi | 2017-10-01 22:44:07 +0100 (Sun, 01 Oct 2017) | 1 line
Fix cty.dat lookups that were not honouring exact match flags
------------------------------------------------------------------------
r8153 | bsomervi | 2017-10-01 22:44:15 +0100 (Sun, 01 Oct 2017) | 6 lines
Add "Apply" button to calibration solution message box
Make calibration solution application iterative so that calibrations
can be applied sequentially if desired.
Tidy up calibration solution messages boxes and make i18n friendly.
------------------------------------------------------------------------
r8154 | k1jt | 2017-10-02 14:49:37 +0100 (Mon, 02 Oct 2017) | 2 lines
Update User Guide and "mouse_commands".
------------------------------------------------------------------------
r8155 | k1jt | 2017-10-02 15:15:15 +0100 (Mon, 02 Oct 2017) | 2 lines
Special DXpedition messages must not have the FreeText bit set.
------------------------------------------------------------------------
r8156 | k1jt | 2017-10-02 19:27:08 +0100 (Mon, 02 Oct 2017) | 2 lines
Add more on Copyright protections.
------------------------------------------------------------------------
r8157 | k1jt | 2017-10-02 19:33:17 +0100 (Mon, 02 Oct 2017) | 2 lines
Update the list of keyboard shortcuts.
------------------------------------------------------------------------
r8158 | k1jt | 2017-10-02 19:35:06 +0100 (Mon, 02 Oct 2017) | 2 lines
Minor edits.
------------------------------------------------------------------------
r8159 | k1jt | 2017-10-03 02:23:24 +0100 (Tue, 03 Oct 2017) | 1 line
Correct a misspelling; add quote marks; push 'About' to bottom of Tools menu.
------------------------------------------------------------------------
r8160 | k1jt | 2017-10-03 16:59:47 +0100 (Tue, 03 Oct 2017) | 2 lines
Add KA9Q to the copyright notice.
------------------------------------------------------------------------
r8161 | k1jt | 2017-10-04 14:14:51 +0100 (Wed, 04 Oct 2017) | 2 lines
Update an image; fix a typo.
------------------------------------------------------------------------
r8162 | k1jt | 2017-10-05 19:27:34 +0100 (Thu, 05 Oct 2017) | 2 lines
Fix a bug involving "firstcall contains mycall" but not equal to mycall.
------------------------------------------------------------------------
r8163 | bsomervi | 2017-10-06 17:18:17 +0100 (Fri, 06 Oct 2017) | 1 line
Add an accessor method to Configuration to get the current calibration parameters
------------------------------------------------------------------------
r8164 | bsomervi | 2017-10-06 17:18:25 +0100 (Fri, 06 Oct 2017) | 5 lines
Rename the fmt.all calibration measurements file after accepting a solution
This allows those who want to keep their calibration measurements
after finding a solution to calibrate their station. The fmt.all file
used to find and accept a solution is renamed to fmt.bak.
------------------------------------------------------------------------
r8165 | k1jt | 2017-10-13 15:36:10 +0100 (Fri, 13 Oct 2017) | 2 lines
Update the Tool Tip displayed for Frequency Calibration parameters.
------------------------------------------------------------------------
r8166 | bsomervi | 2017-10-13 23:34:10 +0100 (Fri, 13 Oct 2017) | 1 line
Fix an issue with editing IARU regions in the working frequencies table
------------------------------------------------------------------------
r8167 | bsomervi | 2017-10-13 23:34:21 +0100 (Fri, 13 Oct 2017) | 32 lines
Improved frequency calibration
Measure check box added to FreqCal mode, check to record to fmt.all
with current calibration correction disabled, uncheck to see the
impact of the current calibration parameters.
The fmt.all file is now optionally renamed to fmt.bak when a
calibration solution is accepted. This allows users to preserve an
fmt.all file that they might have edited for best fit.
A calibration procedure might proceed thus:-
1) select FreqCal mode,
2) step through suggested calibration test frequencies deleting those
that have no usable signal,
3) enable "Menu->Tools->Execute frequency calibration cycle" and check
that suitable signals are present,
4) select a suitable FTol and T/R period,
5) check "Measure" and let the cycle complete a few times to gather
data,
6) uncheck "Measure" to complete the data capture, optionally tidy the
fmt.all file with your favourite editor,
7) push "Menu->Tools->Solve for calibration parameters" and accept if
you like what you see,
8) sit back and admire your accurately frequency calibrated station.
------------------------------------------------------------------------
r8168 | bsomervi | 2017-10-13 23:34:36 +0100 (Fri, 13 Oct 2017) | 4 lines
Generic handling of keyboard modifiers via UDP and double-clicks
This change opens up all keyboard modifier options to UDP Reply
messages as well as double-clicks of decoded messages.
------------------------------------------------------------------------
r8169 | bsomervi | 2017-10-13 23:34:48 +0100 (Fri, 13 Oct 2017) | 3 lines
User guide updates for frequency calibration mode
Also some instances of non-italicized WSJT-X fixed.
------------------------------------------------------------------------
r8170 | k9an | 2017-10-14 02:02:38 +0100 (Sat, 14 Oct 2017) | 1 line
Don't open the false_decodes.txt file.
------------------------------------------------------------------------
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx-1.8@8171 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
438 lines
13 KiB
Fortran
438 lines
13 KiB
Fortran
subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,napwid, &
|
|
lsubtract,nagain,iaptype,mygrid6,bcontest,sync0,f1,xdt,xbase,apsym, &
|
|
nharderrors,dmin,nbadcrc,ipass,iera,message,xsnr)
|
|
|
|
use timer_module, only: timer
|
|
include 'ft8_params.f90'
|
|
parameter(NRECENT=10,NP2=2812)
|
|
character message*22,msgsent*22
|
|
character*12 recent_calls(NRECENT)
|
|
character*6 mygrid6
|
|
logical bcontest
|
|
real a(5)
|
|
real s1(0:7,ND),s2(0:7,NN),s1sort(8*ND)
|
|
real ps(0:7),psl(0:7)
|
|
real bmeta(3*ND),bmetb(3*ND),bmetap(3*ND)
|
|
real llr(3*ND),llra(3*ND),llr0(3*ND),llr1(3*ND),llrap(3*ND) !Soft symbols
|
|
real dd0(15*12000)
|
|
integer*1 decoded(KK),apmask(3*ND),cw(3*ND)
|
|
integer*1 msgbits(KK)
|
|
integer apsym(KK)
|
|
integer mcq(28),mde(28),mrrr(16),m73(16),mrr73(16)
|
|
integer itone(NN)
|
|
integer indxs1(8*ND)
|
|
integer icos7(0:6),ip(1)
|
|
integer nappasses(0:5) ! the number of decoding passes to use for each QSO state
|
|
integer naptypes(0:5,4) ! (nQSOProgress, decoding pass) maximum of 4 passes for now
|
|
complex cd0(3200)
|
|
complex ctwk(32)
|
|
complex csymb(32)
|
|
logical first,newdat,lsubtract,lapon,nagain
|
|
equivalence (s1,s1sort)
|
|
data icos7/2,5,6,0,4,1,3/
|
|
data mcq/1,1,1,1,1,0,1,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,1,1,0,0,1/
|
|
data mrrr/0,1,1,1,1,1,1,0,1,1,0,0,1,1,1,1/
|
|
data m73/0,1,1,1,1,1,1,0,1,1,0,1,0,0,0,0/
|
|
data mde/1,1,1,1,1,1,1,1,0,1,1,0,0,1,0,0,0,0,0,1,1,1,0,1,0,0,0,1/
|
|
data mrr73/0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,1/
|
|
data first/.true./
|
|
save nappasses,naptypes
|
|
|
|
if(first) then
|
|
mcq=2*mcq-1
|
|
mde=2*mde-1
|
|
mrrr=2*mrrr-1
|
|
m73=2*m73-1
|
|
mrr73=2*mrr73-1
|
|
nappasses(0)=2
|
|
nappasses(1)=2
|
|
nappasses(2)=2
|
|
nappasses(3)=4
|
|
nappasses(4)=4
|
|
nappasses(5)=3
|
|
|
|
! iaptype
|
|
!------------------------
|
|
! 1 CQ ??? ???
|
|
! 2 MyCall ??? ???
|
|
! 3 MyCall DxCall ???
|
|
! 4 MyCall DxCall RRR
|
|
! 5 MyCall DxCall 73
|
|
! 6 MyCall DxCall RR73
|
|
! 7 ??? DxCall ???
|
|
|
|
naptypes(0,1:4)=(/1,2,0,0/)
|
|
naptypes(1,1:4)=(/2,3,0,0/)
|
|
naptypes(2,1:4)=(/2,3,0,0/)
|
|
naptypes(3,1:4)=(/3,4,5,6/)
|
|
naptypes(4,1:4)=(/3,4,5,6/)
|
|
naptypes(5,1:4)=(/3,1,2,0/) !?
|
|
first=.false.
|
|
endif
|
|
|
|
max_iterations=30
|
|
nharderrors=-1
|
|
fs2=12000.0/NDOWN
|
|
dt2=1.0/fs2
|
|
twopi=8.0*atan(1.0)
|
|
delfbest=0.
|
|
ibest=0
|
|
|
|
call timer('ft8_down',0)
|
|
call ft8_downsample(dd0,newdat,f1,cd0) !Mix f1 to baseband and downsample
|
|
call timer('ft8_down',1)
|
|
|
|
i0=nint((xdt+0.5)*fs2) !Initial guess for start of signal
|
|
smax=0.0
|
|
do idt=i0-8,i0+8 !Search over +/- one quarter symbol
|
|
call sync8d(cd0,idt,ctwk,0,sync)
|
|
if(sync.gt.smax) then
|
|
smax=sync
|
|
ibest=idt
|
|
endif
|
|
enddo
|
|
xdt2=ibest*dt2 !Improved estimate for DT
|
|
|
|
! Now peak up in frequency
|
|
i0=nint(xdt2*fs2)
|
|
smax=0.0
|
|
do ifr=-5,5 !Search over +/- 2.5 Hz
|
|
delf=ifr*0.5
|
|
dphi=twopi*delf*dt2
|
|
phi=0.0
|
|
do i=1,32
|
|
ctwk(i)=cmplx(cos(phi),sin(phi))
|
|
phi=mod(phi+dphi,twopi)
|
|
enddo
|
|
call sync8d(cd0,i0,ctwk,1,sync)
|
|
if( sync .gt. smax ) then
|
|
smax=sync
|
|
delfbest=delf
|
|
endif
|
|
enddo
|
|
a=0.0
|
|
a(1)=-delfbest
|
|
call twkfreq1(cd0,NP2,fs2,a,cd0)
|
|
xdt=xdt2
|
|
f1=f1+delfbest !Improved estimate of DF
|
|
|
|
call sync8d(cd0,i0,ctwk,2,sync)
|
|
|
|
j=0
|
|
do k=1,NN
|
|
i1=ibest+(k-1)*32
|
|
csymb=cmplx(0.0,0.0)
|
|
if( i1.ge.1 .and. i1+31 .le. NP2 ) csymb=cd0(i1:i1+31)
|
|
call four2a(csymb,32,1,-1,1)
|
|
s2(0:7,k)=abs(csymb(1:8))/1e3
|
|
enddo
|
|
|
|
! sync quality check
|
|
is1=0
|
|
is2=0
|
|
is3=0
|
|
do k=1,7
|
|
ip=maxloc(s2(:,k))
|
|
if(icos7(k-1).eq.(ip(1)-1)) is1=is1+1
|
|
ip=maxloc(s2(:,k+36))
|
|
if(icos7(k-1).eq.(ip(1)-1)) is2=is2+1
|
|
ip=maxloc(s2(:,k+72))
|
|
if(icos7(k-1).eq.(ip(1)-1)) is3=is3+1
|
|
enddo
|
|
! hard sync sum - max is 21
|
|
nsync=is1+is2+is3
|
|
if(nsync .le. 6) then ! bail out
|
|
nbadcrc=1
|
|
return
|
|
endif
|
|
|
|
j=0
|
|
do k=1,NN
|
|
if(k.le.7) cycle
|
|
if(k.ge.37 .and. k.le.43) cycle
|
|
if(k.gt.72) cycle
|
|
j=j+1
|
|
s1(0:7,j)=s2(0:7,k)
|
|
enddo
|
|
|
|
call indexx(s1sort,8*ND,indxs1)
|
|
xmeds1=s1sort(indxs1(nint(0.5*8*ND)))
|
|
s1=s1/xmeds1
|
|
|
|
do j=1,ND
|
|
i4=3*j-2
|
|
i2=3*j-1
|
|
i1=3*j
|
|
! Max amplitude
|
|
ps=s1(0:7,j)
|
|
r1=max(ps(1),ps(3),ps(5),ps(7))-max(ps(0),ps(2),ps(4),ps(6))
|
|
r2=max(ps(2),ps(3),ps(6),ps(7))-max(ps(0),ps(1),ps(4),ps(5))
|
|
r4=max(ps(4),ps(5),ps(6),ps(7))-max(ps(0),ps(1),ps(2),ps(3))
|
|
bmeta(i4)=r4
|
|
bmeta(i2)=r2
|
|
bmeta(i1)=r1
|
|
bmetap(i4)=r4
|
|
bmetap(i2)=r2
|
|
bmetap(i1)=r1
|
|
! Max log metric
|
|
psl=log(ps)
|
|
r1=max(psl(1),psl(3),psl(5),psl(7))-max(psl(0),psl(2),psl(4),psl(6))
|
|
r2=max(psl(2),psl(3),psl(6),psl(7))-max(psl(0),psl(1),psl(4),psl(5))
|
|
r4=max(psl(4),psl(5),psl(6),psl(7))-max(psl(0),psl(1),psl(2),psl(3))
|
|
bmetb(i4)=r4
|
|
bmetb(i2)=r2
|
|
bmetb(i1)=r1
|
|
|
|
! Metric for Cauchy noise
|
|
! r1=log(ps(1)**3+ps(3)**3+ps(5)**3+ps(7)**3)- &
|
|
! log(ps(0)**3+ps(2)**3+ps(4)**3+ps(6)**3)
|
|
! r2=log(ps(2)**3+ps(3)**3+ps(6)**3+ps(7)**3)- &
|
|
! log(ps(0)**3+ps(1)**3+ps(4)**3+ps(5)**3)
|
|
! r4=log(ps(4)**3+ps(5)**3+ps(6)**3+ps(7)**3)- &
|
|
! log(ps(0)**3+ps(1)**3+ps(2)**3+ps(3)**3)
|
|
! Metric for AWGN, no fading
|
|
! bscale=2.5
|
|
! b0=bessi0(bscale*ps(0))
|
|
! b1=bessi0(bscale*ps(1))
|
|
! b2=bessi0(bscale*ps(2))
|
|
! b3=bessi0(bscale*ps(3))
|
|
! b4=bessi0(bscale*ps(4))
|
|
! b5=bessi0(bscale*ps(5))
|
|
! b6=bessi0(bscale*ps(6))
|
|
! b7=bessi0(bscale*ps(7))
|
|
! r1=log(b1+b3+b5+b7)-log(b0+b2+b4+b6)
|
|
! r2=log(b2+b3+b6+b7)-log(b0+b1+b4+b5)
|
|
! r4=log(b4+b5+b6+b7)-log(b0+b1+b2+b3)
|
|
|
|
if(nQSOProgress .eq. 0 .or. nQSOProgress .eq. 5) then
|
|
! When bits 88:115 are set as ap bits, bit 115 lives in symbol 39 along
|
|
! with no-ap bits 116 and 117. Take care of metrics for bits 116 and 117.
|
|
if(j.eq.39) then ! take care of bits that live in symbol 39
|
|
if(apsym(28).lt.0) then
|
|
bmetap(i2)=max(ps(2),ps(3))-max(ps(0),ps(1))
|
|
bmetap(i1)=max(ps(1),ps(3))-max(ps(0),ps(2))
|
|
else
|
|
bmetap(i2)=max(ps(6),ps(7))-max(ps(4),ps(5))
|
|
bmetap(i1)=max(ps(5),ps(7))-max(ps(4),ps(6))
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
! When bits 116:143 are set as ap bits, bit 115 lives in symbol 39 along
|
|
! with ap bits 116 and 117. Take care of metric for bit 115.
|
|
! if(j.eq.39) then ! take care of bit 115
|
|
! iii=2*(apsym(29)+1)/2 + (apsym(30)+1)/2 ! known values of bits 116 & 117
|
|
! if(iii.eq.0) bmetap(i4)=ps(4)-ps(0)
|
|
! if(iii.eq.1) bmetap(i4)=ps(5)-ps(1)
|
|
! if(iii.eq.2) bmetap(i4)=ps(6)-ps(2)
|
|
! if(iii.eq.3) bmetap(i4)=ps(7)-ps(3)
|
|
! endif
|
|
|
|
! bit 144 lives in symbol 48 and will be 1 if it is set as an ap bit.
|
|
! take care of metrics for bits 142 and 143
|
|
if(j.eq.48) then ! bit 144 is always 1
|
|
bmetap(i4)=max(ps(5),ps(7))-max(ps(1),ps(3))
|
|
bmetap(i2)=max(ps(3),ps(7))-max(ps(1),ps(5))
|
|
endif
|
|
|
|
! bit 154 lives in symbol 52 and will be 0 if it is set as an ap bit
|
|
! take care of metrics for bits 155 and 156
|
|
if(j.eq.52) then ! bit 154 will be 0 if it is set as an ap bit.
|
|
bmetap(i2)=max(ps(2),ps(3))-max(ps(0),ps(1))
|
|
bmetap(i1)=max(ps(1),ps(3))-max(ps(0),ps(2))
|
|
endif
|
|
|
|
enddo
|
|
|
|
call normalizebmet(bmeta,3*ND)
|
|
call normalizebmet(bmetb,3*ND)
|
|
call normalizebmet(bmetap,3*ND)
|
|
|
|
scalefac=2.83
|
|
llr0=scalefac*bmeta
|
|
llr1=scalefac*bmetb
|
|
llra=scalefac*bmetap ! llr's for use with ap
|
|
apmag=scalefac*(maxval(abs(bmetap))*1.01)
|
|
|
|
! pass #
|
|
!------------------------------
|
|
! 1 regular decoding
|
|
! 2 erase 24
|
|
! 3 erase 48
|
|
! 4 ap pass 1
|
|
! 5 ap pass 2
|
|
! 6 ap pass 3
|
|
! 7 ap pass 4, etc.
|
|
|
|
if(lapon) then
|
|
npasses=4+nappasses(nQSOProgress)
|
|
else
|
|
npasses=4
|
|
endif
|
|
|
|
do ipass=1,npasses
|
|
|
|
llr=llr0
|
|
if(ipass.eq.2) llr=llr1
|
|
if(ipass.eq.3) llr(1:24)=0.
|
|
if(ipass.eq.4) llr(1:48)=0.
|
|
if(ipass.le.4) then
|
|
apmask=0
|
|
llrap=llr
|
|
iaptype=0
|
|
endif
|
|
|
|
if(ipass .gt. 4) then
|
|
iaptype=naptypes(nQSOProgress,ipass-4)
|
|
if(iaptype.ge.3 .and. (abs(f1-nfqso).gt.napwid .and. abs(f1-nftx).gt.napwid) ) cycle
|
|
if(iaptype.eq.1 .or. iaptype.eq.2 ) then ! AP,???,???
|
|
apmask=0
|
|
apmask(88:115)=1 ! first 28 bits are AP
|
|
apmask(144)=1 ! not free text
|
|
llrap=llr
|
|
if(iaptype.eq.1) llrap(88:115)=apmag*mcq
|
|
if(iaptype.eq.2) llrap(88:115)=apmag*apsym(1:28)
|
|
llrap(116:117)=llra(116:117)
|
|
llrap(142:143)=llra(142:143)
|
|
llrap(144)=-apmag
|
|
endif
|
|
if(iaptype.eq.3) then ! mycall, dxcall, ???
|
|
apmask=0
|
|
apmask(88:115)=1 ! mycall
|
|
apmask(116:143)=1 ! hiscall
|
|
apmask(144)=1 ! not free text
|
|
llrap=llr
|
|
llrap(88:143)=apmag*apsym(1:56)
|
|
llrap(144)=-apmag
|
|
endif
|
|
if(iaptype.eq.4 .or. iaptype.eq.5 .or. iaptype.eq.6) then
|
|
apmask=0
|
|
apmask(88:115)=1 ! mycall
|
|
apmask(116:143)=1 ! hiscall
|
|
apmask(144:159)=1 ! RRR or 73 or RR73
|
|
llrap=llr
|
|
llrap(88:143)=apmag*apsym(1:56)
|
|
if(iaptype.eq.4) llrap(144:159)=apmag*mrrr
|
|
if(iaptype.eq.5) llrap(144:159)=apmag*m73
|
|
if(iaptype.eq.6) llrap(144:159)=apmag*mrr73
|
|
endif
|
|
if(iaptype.eq.7) then ! ???, dxcall, ???
|
|
apmask=0
|
|
apmask(116:143)=1 ! hiscall
|
|
apmask(144)=1 ! not free text
|
|
llrap=llr
|
|
llrap(115)=llra(115)
|
|
llrap(116:143)=apmag*apsym(29:56)
|
|
llrap(144)=-apmag
|
|
endif
|
|
endif
|
|
|
|
cw=0
|
|
call timer('bpd174 ',0)
|
|
call bpdecode174(llrap,apmask,max_iterations,decoded,cw,nharderrors, &
|
|
niterations)
|
|
call timer('bpd174 ',1)
|
|
dmin=0.0
|
|
if(ndepth.eq.3 .and. nharderrors.lt.0) then
|
|
ndeep=3
|
|
if(abs(nfqso-f1).le.napwid .or. abs(nftx-f1).le.napwid) then
|
|
if((ipass.eq.3 .or. ipass.eq.4) .and. .not.nagain) then
|
|
ndeep=3
|
|
else
|
|
ndeep=4
|
|
endif
|
|
endif
|
|
if(nagain) ndeep=5
|
|
call timer('osd174 ',0)
|
|
call osd174(llrap,apmask,ndeep,decoded,cw,nharderrors,dmin)
|
|
call timer('osd174 ',1)
|
|
endif
|
|
nbadcrc=1
|
|
message=' '
|
|
xsnr=-99.0
|
|
if(count(cw.eq.0).eq.174) cycle !Reject the all-zero codeword
|
|
!### if(any(decoded(73:75).ne.0)) cycle !Reject if any of the 3 extra bits is nonzero
|
|
if(nharderrors.ge.0 .and. nharderrors+dmin.lt.60.0 .and. &
|
|
.not.(sync.lt.2.0 .and. nharderrors.gt.35) .and. &
|
|
.not.(ipass.gt.2 .and. nharderrors.gt.39) .and. &
|
|
.not.(ipass.eq.4 .and. nharderrors.gt.30) &
|
|
) then
|
|
call chkcrc12a(decoded,nbadcrc)
|
|
else
|
|
nharderrors=-1
|
|
cycle
|
|
endif
|
|
!###
|
|
i3bit=4*decoded(73) + 2*decoded(74) + decoded(75)
|
|
iFreeText=decoded(57)
|
|
! if(nbadcrc.eq.0) write(*,3001) nharderrors,nbadcrc,i3bit
|
|
!3001 format('A',3i5)
|
|
!###
|
|
if(nbadcrc.eq.0) then
|
|
call extractmessage174(decoded,message,ncrcflag,recent_calls,nrecent)
|
|
call genft8(message,mygrid6,bcontest,i3bit,msgsent,msgbits,itone)
|
|
if(i3bit.eq.1 .and. iFreeText.eq.0) message(21:21)='1'
|
|
if(i3bit.eq.2 .and. iFreeText.eq.0) message(21:21)='2'
|
|
if(lsubtract) call subtractft8(dd0,itone,f1,xdt2)
|
|
xsig=0.0
|
|
xnoi=0.0
|
|
do i=1,79
|
|
xsig=xsig+s2(itone(i),i)**2
|
|
ios=mod(itone(i)+4,7)
|
|
xnoi=xnoi+s2(ios,i)**2
|
|
enddo
|
|
xsnr=0.001
|
|
if(xnoi.gt.0 .and. xnoi.lt.xsig) xsnr=xsig/xnoi-1.0
|
|
xsnr=10.0*log10(xsnr)-27.0
|
|
xsnr2=db(xsig/xbase - 1.0) - 32.0
|
|
! write(52,3052) f1,xdt,xsig,xnoi,xbase,xsnr,xsnr2
|
|
!3052 format(7f10.2)
|
|
if(.not.nagain) xsnr=xsnr2
|
|
if(xsnr .lt. -24.0) xsnr=-24.0
|
|
return
|
|
endif
|
|
enddo
|
|
|
|
return
|
|
end subroutine ft8b
|
|
|
|
subroutine normalizebmet(bmet,n)
|
|
real bmet(n)
|
|
|
|
bmetav=sum(bmet)/real(n)
|
|
bmet2av=sum(bmet*bmet)/real(n)
|
|
var=bmet2av-bmetav*bmetav
|
|
if( var .gt. 0.0 ) then
|
|
bmetsig=sqrt(var)
|
|
else
|
|
bmetsig=sqrt(bmet2av)
|
|
endif
|
|
bmet=bmet/bmetsig
|
|
return
|
|
end subroutine normalizebmet
|
|
|
|
|
|
function bessi0(x)
|
|
! From Numerical Recipes
|
|
real bessi0,x
|
|
double precision p1,p2,p3,p4,p5,p6,p7,q1,q2,q3,q4,q5,q6,q7,q8,q9,y
|
|
save p1,p2,p3,p4,p5,p6,p7,q1,q2,q3,q4,q5,q6,q7,q8,q9
|
|
data p1,p2,p3,p4,p5,p6,p7/1.0d0,3.5156229d0,3.0899424d0,1.2067492d0, &
|
|
0.2659732d0,0.360768d-1,0.45813d-2/
|
|
data q1,q2,q3,q4,q5,q6,q7,q8,q9/0.39894228d0,0.1328592d-1, &
|
|
0.225319d-2,-0.157565d-2,0.916281d-2,-0.2057706d-1, &
|
|
0.2635537d-1,-0.1647633d-1,0.392377d-2/
|
|
|
|
if (abs(x).lt.3.75) then
|
|
y=(x/3.75)**2
|
|
bessi0=p1+y*(p2+y*(p3+y*(p4+y*(p5+y*(p6+y*p7)))))
|
|
else
|
|
ax=abs(x)
|
|
y=3.75/ax
|
|
bessi0=(exp(ax)/sqrt(ax))*(q1+y*(q2+y*(q3+y*(q4 &
|
|
+y*(q5+y*(q6+y*(q7+y*(q8+y*q9))))))))
|
|
endif
|
|
return
|
|
end function bessi0
|
|
|