Merged master 8748

This commit is contained in:
Jordan Sherer
2018-08-05 11:33:30 -04:00
parent 8f8772f1bd
commit 62899069bf
1095 changed files with 31298 additions and 367679 deletions
@@ -1,100 +0,0 @@
#include "logbook.h"
#include <QDebug>
#include <QFontMetrics>
#include <QStandardPaths>
#include <QDir>
namespace
{
auto logFileName = "wsjtx_log.adi";
auto countryFileName = "cty.dat";
}
void LogBook::init()
{
QDir dataPath {QStandardPaths::writableLocation (QStandardPaths::DataLocation)};
QString countryDataFilename;
if (dataPath.exists (countryFileName))
{
// User override
countryDataFilename = dataPath.absoluteFilePath (countryFileName);
}
else
{
countryDataFilename = QString {":/"} + countryFileName;
}
_countries.init(countryDataFilename);
_countries.load();
_worked.init(_countries.getCountryNames());
_log.init(dataPath.absoluteFilePath (logFileName));
_log.load();
_setAlreadyWorkedFromLog();
/*
int QSOcount = _log.getCount();
int count = _worked.getWorkedCount();
qDebug() << QSOcount << "QSOs and" << count << "countries worked in file" << logFilename;
*/
// QString call = "ok1ct";
// QString countryName;
// bool callWorkedBefore,countryWorkedBefore;
// match(/*in*/call, /*out*/ countryName,callWorkedBefore,countryWorkedBefore);
// qDebug() << countryName;
}
void LogBook::_setAlreadyWorkedFromLog()
{
QList<QString> calls = _log.getCallList();
QString c;
foreach(c,calls)
{
QString countryName = _countries.find(c);
if (countryName.length() > 0)
{
_worked.setAsWorked(countryName);
//qDebug() << countryName << " worked " << c;
}
}
}
void LogBook::match(/*in*/const QString call,
/*out*/ QString &countryName,
bool &callWorkedBefore,
bool &countryWorkedBefore) const
{
if (call.length() > 0)
{
QString currentMode = "JT9"; // JT65 == JT9 in ADIF::match()
QString currentBand = ""; // match any band
callWorkedBefore = _log.match(call,currentBand,currentMode);
countryName = _countries.find(call);
if (countryName.length() > 0) // country was found
countryWorkedBefore = _worked.getHasWorked(countryName);
else
{
countryName = "where?"; //error: prefix not found
countryWorkedBefore = false;
}
}
//qDebug() << "Logbook:" << call << ":" << countryName << "Cty B4:" << countryWorkedBefore << "call B4:" << callWorkedBefore;
}
void LogBook::addAsWorked(const QString call, const QString band, const QString mode, const QString date)
{
//qDebug() << "adding " << call << " as worked";
_log.add(call,band,mode,date);
QString countryName = _countries.find(call);
if (countryName.length() > 0)
_worked.setAsWorked(countryName);
}
@@ -1,104 +0,0 @@
=== AP Decoding
The _WSJT-X_ decoders for QRA64 and FT8 include optional procedures
that use naturally accumulating information during a minimal QSO.
This _a priori_ (AP) information increases sensitivity of the decoder
by up to 4 dB, at the cost of a slightly higher rate of false decodes.
For example: when you decide to answer a CQ, you already know your own
callsign and that of your potential QSO partner. The software
therefore "`knows`" what to expect for 57 of the 72 message bits (28
bits for each of two callsigns, 1 bit for message type) in the next
received message. The decoder's task can thus be reduced to
determining the remaining 15 bits of the message and ensuring that the
resulting solution is reliable.
AP decoding starts by setting AP bits to the hypothesized values, as
if they had been received correctly. We then determine whether the
remaining message and parity bits are consistent with the hypothesized
AP bits, with a specified level of confidence. Successful AP decodes
are labeled with an end-of-line indicator of the form `aP`, where `P`
is one of the single-digit AP decoding types listed in Table 1. For
example, `a2` indicates that the successful decode used MyCall as
hypothetically known information.
[[AP_INFO_TABLE]]
.AP information types
[width="35%",cols="h10,<m20",frame=topbot,options="header"]
|===============================================
|P | Message components
|1 | CQ &#160; &#160; ? &#160; &#160; ?
|2 | MyCall &#160; &#160; ? &#160; &#160; ?
|3 | MyCall DxCall &#160; &#160; ?
|4 | MyCall DxCall RRR
|5 | MyCall DxCall 73
|6 | MyCall DxCall RR73
|===============================================
If a codeword is found that is judged to have high (but not
overwhelmingly high) probability of being correct, a `?` character is
appended when the decoded message is displayed. To avoid misleading
spots of occasional false decodes, messages so marked are not
forwarded to {pskreporter}.
Table 2 lists the six possible QSO states that are tracked by the
_WSJT-X_ auto-sequencer, along with the type of AP decoding that would
be attempted in each state.
[[AP_DECODING_TYPES_TABLE]]
.AP decoding types for each QSO state
[width="35%",cols="h10,<m20",frame=topbot,options="header"]
|===========================================
|State |AP type
|CALLING | 1, 2
|REPLYING | 2, 3
|REPORT | 2, 3
|ROGER_REPORT | 3, 4, 5, 6
|ROGERS | 3, 4, 5, 6
|SIGNOFF | 3, 1, 2
|===========================================
=== Decoded Lines
Displayed information accompanying decoded messages generally includes UTC,
signal-to-noise ratio in dB, time offset DT in seconds, and
audio frequency in Hz. Some modes include additional information such
as frequency offset from nominal (DF), frequency drift (Drift or F1),
or distance (km or mi).
There may also be some cryptic characters with special meanings
summarized in the following Table:
[[DECODED_LINES_TABLE]]
.Notations used on decoded text lines
[width="50%",cols="h,3*^",frame=topbot,options="header"]
|===========================================
|Mode |Mode character|Sync character|End of line information
|FT8 | ~ | | ? &#160; aP
|JT4 | $ | *, # | f, fN, dNC
|JT9 | @ | |
|JT65 | # | |
|JT65 VHF| # | *, # | f, fN, dNC
|QRA64 | : | * | R
|ISCAT | | * | M N C T
|MSK144 | & | | N H E
|===========================================
Sync character::
`*` - Normal sync +
`#` - Alternate sync
End of line information::
`?` - Decoded with lower confidence +
`a` - Decoded with aid of some a priori (AP) information +
`C` - Confidence indicator [ISCAT and Deep Search; (0-9,*)] +
`d` - Deep Search algorithm +
`E` - Size of MSK eye diagram opening - if negative, the eye is closed +
`f` - Franke-Taylor or Fano algorithm +
`H` - Number of bit errors corrected +
`M` - Message length (characters) +
`N` - Number of Rx intervals or frames averaged +
`P` - Number indicating type of AP information (Table 1, above) +
`R` - Return code from QRA64 decoder +
`T` - Length of analyzed region (s)
@@ -1,74 +0,0 @@
=== Frequency Calibration
Many _WSJT-X_ capabilities depend on signal-detection bandwidths no
more than a few Hz. Frequency accuracy and stability are therefore
unusually important. We provide tools to enable accurate frequency
calibration of your radio, as well as precise frequency measurement of
on-the-air signals. The calibration procedure works by automatically
cycling your CAT-controlled radio through a series of preset
frequencies of carrier-based signals at reliably known frequencies,
measuring the error in dial frequency for each signal.
You will probably find it convenient to define and use a special
<<CONFIG-MENU,Configuration>> dedicated to frequency calibration.
Then complete the following steps, as appropriate for your system.
- Switch to FreqCal mode
- In the _Working Frequencies_ box on the *Settings -> Frequencies*
tab, delete any default frequencies for *FreqCal* mode that are not
relevant for your location. You may want to replace some of them with
reliably known frequencies receivable at your location.
TIP: We find major-city AM broadcast stations generally serve well as
frequency calibrators at the low frequency end of the spectrum. In
North America we also use the standard time-and-frequency broadcasts
of WWV at 2.500, 5.000, 10.000, 15.000, and 20.000 MHz, and CHU at
3.330, 7.850, and 14.670 MHz. Similar shortwave signals are available
in other parts of the world.
- During the calibration procedure, the radio's USB dial frequency is
offset 1500 Hz below each *FreqCal* entry in the default frequencies
list. As shown in the screen shot below, detected signal carriers
therefore appear at about 1500 Hz in the WSJT-X waterfall.
image::FreqCal.png[align="left",alt="FreqCal"]
With modern synthesized radios, small measured offsets from 1500 Hz
will exhibit a straight-line dependence on frequency. You can
approximate the calibration of your radio by simply dividing the
measured frequency offset (in Hz) at the highest reliable frequency by
the nominal frequency itself (in MHz). For example, the 20 MHz
measurement for WWV shown above produced a measured tone offset of
24.6 Hz, displayed in the _WSJT-X_ decoded text window. The resulting
calibration constant is 24.6/20=1.23 parts per million. This number
may be entered as *Slope* on the *settings -> Frequencies* tab.
A more precise calibration can be effected by fitting the intercept
and slope of a straight line to the whole sequence of calibration
measurements, as shown for these measurements in the graph plotted
below. Software tools for completing this task are included with the
_WSJT-X_ installation, and detailed instructions for their use are
available at https://physics.princeton.edu/pulsar/k1jt/FMT_User.pdf.
Using these tools and no specialized hardware beyond your
CAT-interfaced radio, you can calibrate the radio to better than 1 Hz
and compete very effectively in the ARRL's periodic Frequency
Measuring Tests.
image::FreqCal_Graph.png[align="left",alt="FreqCal_Graph"]
=== Reference Spectrum
WSJT-X provides a tool that can be used to determine the detailed
shape of your receiver's passband. Disconnect your antenna or tune to
a quiet frequency with no signals. With WSJT-X running in one of the
slow modes, select *Measure reference spectrum* from the *Tools* menu.
Wait for about a minute and then hit the *Stop* button. A file named
`refspec.dat` will appear in your log directory.
[ ... TBD ... ]
=== Equalization
[ ... TBD ... ]
@@ -1,64 +0,0 @@
// Status=review
The following buttons appear just under the decoded text windows on
the main screen:
//.Main UI
image::main-ui-controls.png[align="left",width=650,alt="Main UI Controls"]
* *Log QSO* raises a dialog window pre-filled with known information
about a QSO you have nearly completed. You can edit or add to this
information before clicking *OK* to log the QSO. If you check *Prompt
me to log QSO* on the *Settings -> Reporting* tab, the program will
raise the confirmation screen automatically when you send a message
containing +73+. *Start Date* and *Start Time* are set when you click
to send the *Tx 2* or *Tx 3* message, and backed up by one or two
sequence lengths, respectively. (Note that the actual start time may
have been earlier if repeats of early transmissions were required.)
End date and time are set when the *Log QSO* screen is invoked.
//.Log QSO Window
image::log-qso.png[align="center",alt="Log QSO"]
* *Stop* will terminate normal data acquisition in case you want to
freeze the waterfall or open and explore a previously recorded audio
file.
* *Monitor* toggles normal receive operation on or off. This button
is highlighted in green when the _WSJT-X_ is receiving. If you are
using CAT control, toggling *Monitor* OFF relinquishes control of the
rig; if *Monitor returns to last used frequency* is selected on the
*Settings | General* tab, toggling *Monitor* back ON will return to
the original frequency.
* *Erase* clears the right-hand decoded text window.
Double-clicking *Erase* clears both text windows.
TIP: Right-clicking on either text window brings up a context menu
with several options (including *Erase*) which operate on that window
alone.
* *Clear Avg* is present only in modes that support message averaging.
It provides a way to erase the accumulating information, thus
preparing to start a new average.
* *Decode* tells the program to repeat the decoding procedure at the
Rx frequency (green marker on waterfall scale), using the most recently
completed sequence of received data.
* *Enable Tx* toggles automatic T/R sequencing mode on or off and
highlights the button in red when ON. A transmission will start at
the beginning of the selected (odd or even) sequence, or immediately
if appropriate. Toggling the button to OFF during a transmission
allows the current transmission to finish.
* *Halt Tx* terminates a transmission immediately and disables
automatic T/R sequencing.
* *Tune* toggles the program into Tx mode and generates an unmodulated
carrier at the specified Tx frequency (red marker on waterfall scale).
This process is useful for adjusting an antenna tuner or tuning an
amplifier. The button is highlighted in red while *Tune* is active.
Toggle the button a second time or click *Halt Tx* to terminate the
*Tune* process. Note that activating *Tune* interrupts a receive
sequence and will prevent decoding during that sequence.