Merged master 8748
This commit is contained in:
@@ -1,214 +0,0 @@
|
||||
// Status=review
|
||||
=== Standard Exchange
|
||||
By longstanding tradition, a minimally valid QSO requires the exchange
|
||||
of callsigns, a signal report or some other information, and
|
||||
acknowledgments. _WSJT-X_ is designed to facilitate making such
|
||||
minimal QSOs using short, structured messages. The process works best
|
||||
if you use these formats and follow standard operating practices. The
|
||||
recommended basic QSO goes something like this:
|
||||
|
||||
CQ K1ABC FN42 #K1ABC calls CQ
|
||||
K1ABC G0XYZ IO91 #G0XYZ answers
|
||||
G0XYZ K1ABC –19 #K1ABC sends report
|
||||
K1ABC G0XYZ R-22 #G0XYZ sends R+report
|
||||
G0XYZ K1ABC RRR #K1ABC sends RRR
|
||||
K1ABC G0XYZ 73 #G0XYZ sends 73
|
||||
|
||||
*Standard messages* consist of two callsigns (or CQ, QRZ, or DE and
|
||||
one callsign) followed by the transmitting station’s grid locator, a
|
||||
signal report, R plus a signal report, or the final acknowledgements
|
||||
RRR or 73. These messages are compressed and encoded in a highly
|
||||
efficient and reliable way. In uncompressed form (as displayed
|
||||
on-screen) they may contain as many as 22 characters.
|
||||
|
||||
*Signal reports* are specified as signal-to-noise ratio (S/N) in dB,
|
||||
using a standard reference noise bandwidth of 2500 Hz. Thus, in the
|
||||
example message above, K1ABC is telling G0XYZ that his
|
||||
signal is 19 dB below the noise power in bandwidth 2500 Hz. In the
|
||||
message at 0004, G0XYZ acknowledges receipt of that report and
|
||||
responds with a –22 dB signal report. JT65 reports are constrained to
|
||||
lie in the range –30 to –1 dB, and values are significantly compressed
|
||||
above about -10 dB. JT9 supports the extended range –50 to +49 dB and
|
||||
assigns more reliable numbers to relatively strong signals.
|
||||
|
||||
NOTE: Signals become visible on the waterfall around S/N = –26 dB and
|
||||
audible (to someone with very good hearing) around –15 dB. Thresholds
|
||||
for decodability are around -20 dB for FT8, -23 dB for JT4, –25 dB for
|
||||
JT65, –27 dB for JT9.
|
||||
|
||||
NOTE: Several options are available for circumstances where fast QSOs
|
||||
are desirable. Double-click the *Tx1* control under _Now_ or _Next_
|
||||
to toggle use of the Tx2 message rather than Tx1 to start a QSO.
|
||||
Similarly, double-click the *Tx4* control to toggle between sending
|
||||
`RRR` and `RR73` in that message. The `RR73` message should be used
|
||||
only if you are reasonably confident that no repititions will be
|
||||
required.
|
||||
|
||||
=== Free-Text Messages
|
||||
|
||||
Users often add some friendly chit-chat at the end of a QSO.
|
||||
Free-format messages such as "`TNX ROBERT 73`" or "`5W VERT 73 GL`"
|
||||
are supported, up to a maximum of 13 characters, including spaces. In
|
||||
general you should avoid the character / in free-text messages, as the
|
||||
program may then try to interpret your construction as part of a
|
||||
compound callsign. It should be obvious that the JT4, JT9, and JT65
|
||||
protocols are not designed or well suited for extensive conversations
|
||||
or rag-chewing.
|
||||
|
||||
=== Auto-Sequencing
|
||||
|
||||
The slow modes JT4, JT9, JT65, and QRA64 allow nearly 10 seconds at
|
||||
the end of each one-minute receiving sequence -- enough time for you
|
||||
to inspect decoded messages and decide how to reply. The 15-second
|
||||
T/R cycles of FT8 allow only about two seconds for this task, which is
|
||||
often not enough. For this reason a basic auto-sequencing feature is
|
||||
offered. Check *Auto Seq* on the main window to enable this feature:
|
||||
|
||||
image::auto-seq.png[align="center",alt="AutoSeq"]
|
||||
|
||||
When calling CQ you may also choose to check the box *Call 1st*.
|
||||
_WSJT-X_ will then respond automatically to the first decoded
|
||||
responder to your CQ.
|
||||
|
||||
NOTE: When *Auto-Seq* is enabled the program de-activates *Enable Tx*
|
||||
at the end of each QSO. It is not intended that _WSJT-X_ should make
|
||||
fully automated QSOs.
|
||||
|
||||
=== VHF Contest Mode
|
||||
|
||||
A special *VHF Contest Mode* can be activated for FT8 and MSK144 modes
|
||||
by checking a box on the *Settings | Advanced* tab. This mode is
|
||||
configured especially for VHF contests in which four-character grid
|
||||
locators are the required exchange. When *Contest Mode* is active,
|
||||
the standard QSO sequence looks like this:
|
||||
|
||||
CQ K1ABC FN42
|
||||
K1ABC W9XYZ EN37
|
||||
W9XYZ K1ABC R FN42
|
||||
K1ABC W9XYZ RRR
|
||||
W9XYZ K1ABC 73
|
||||
|
||||
In contest circumstances K1ABC might choose to call CQ again rather
|
||||
than sending 73 for his third transmission.
|
||||
|
||||
IMPORTANT: Do not use VHF Contest Mode on an HF band or in conditions
|
||||
where worldwide propagation is available. See
|
||||
<<PROTOCOL_OVERVIEW,Protocol Specifications>> for further details.
|
||||
|
||||
[[COMP-CALL]]
|
||||
=== Compound Callsigns
|
||||
|
||||
Compound callsigns such as xx/K1ABC or K1ABC/x are handled in
|
||||
one of two possible ways:
|
||||
|
||||
.Messages containing Type 1 compound callsigns
|
||||
|
||||
A list of about 350 of the most common prefixes and suffixes can be
|
||||
displayed from the *Help* menu. A single compound callsign involving
|
||||
one item from this list can be used in place of the standard third
|
||||
word of a message (normally a locator, signal report, RRR, or 73).
|
||||
The following examples are all acceptable messages containing *Type 1*
|
||||
compound callsigns:
|
||||
|
||||
CQ ZA/K1ABC
|
||||
CQ K1ABC/4
|
||||
ZA/K1ABC G0XYZ
|
||||
G0XYZ K1ABC/4
|
||||
|
||||
The following messages are _not_ valid, because a third word is not
|
||||
permitted in any message containing a *Type 1* compound callsign:
|
||||
|
||||
ZA/K1ABC G0XYZ -22 #These messages are invalid; each would
|
||||
G0XYZ K1ABC/4 73 # be sent without its third "word"
|
||||
|
||||
A QSO between two stations using *Type 1* compound-callsign messages
|
||||
might look like this:
|
||||
|
||||
CQ ZA/K1ABC
|
||||
ZA/K1ABC G0XYZ
|
||||
G0XYZ K1ABC –19
|
||||
K1ABC G0XYZ R–22
|
||||
G0XYZ K1ABC RRR
|
||||
K1ABC G0XYZ 73
|
||||
|
||||
Notice that the full compound callsign is sent and received in the
|
||||
first two transmissions. After that, the operators omit the add-on
|
||||
prefix or suffix and use the standard structured messages.
|
||||
|
||||
.Type 2 Compound-Callsign Messages
|
||||
|
||||
Prefixes and suffixes _not_ found in the displayable short list are
|
||||
handled by using *Type 2* compound callsigns. In this case the
|
||||
compound callsign must be the second word in a two- or three-word
|
||||
message, and the first word must be CQ, DE, or QRZ. Prefixes can be 1
|
||||
to 4 characters, suffixes 1 to 3 characters. A third word conveying a
|
||||
locator, report, RRR, or 73 is permitted. The following are valid
|
||||
messages containing *Type 2* compound callsigns:
|
||||
|
||||
CQ W4/G0XYZ FM07
|
||||
QRZ K1ABC/VE6 DO33
|
||||
DE W4/G0XYZ FM18
|
||||
DE W4/G0XYZ -22
|
||||
DE W4/G0XYZ R-22
|
||||
DE W4/G0XYZ RRR
|
||||
DE W4/G0XYZ 73
|
||||
|
||||
In each case, the compound callsign is treated as *Type 2* because the
|
||||
add-on prefix or suffix is _not_ one of those in the fixed list. Note
|
||||
that a second callsign is never permissible in these messages.
|
||||
|
||||
NOTE: During a transmission your outgoing message is displayed in the
|
||||
first label on the *Status Bar* and shown exactly as another station
|
||||
will receive it. You can check to see that you are actually
|
||||
transmitting the message you wish to send.
|
||||
|
||||
QSOs involving *Type 2* compound callsigns might look like either
|
||||
of the following sequences:
|
||||
|
||||
CQ K1ABC/VE1 FN75
|
||||
K1ABC G0XYZ IO91
|
||||
G0XYZ K1ABC –19
|
||||
K1ABC G0XYZ R–22
|
||||
G0XYZ K1ABC RRR
|
||||
K1ABC/VE1 73
|
||||
|
||||
|
||||
CQ K1ABC FN42
|
||||
DE G0XYZ/W4 FM18
|
||||
G0XYZ K1ABC –19
|
||||
K1ABC G0XYZ R–22
|
||||
G0XYZ K1ABC RRR
|
||||
DE G0XYZ/W4 73
|
||||
|
||||
Operators with a compound callsign use its full form when calling CQ
|
||||
and possibly also in a 73 transmission, as may be required by
|
||||
licensing authorities. Other transmissions during a QSO may use the
|
||||
standard structured messages without callsign prefix or suffix.
|
||||
|
||||
TIP: If you are using a compound callsign, you may want to
|
||||
experiment with the option *Message generation for type 2 compound
|
||||
callsign holders* on the *Settings | General* tab, so that messages
|
||||
will be generated that best suit your needs.
|
||||
|
||||
=== Pre-QSO Checklist
|
||||
|
||||
Before attempting your first QSO with one of the WSJT modes, be sure
|
||||
to go through the <<TUTORIAL,Basic Operating Tutorial>> above as well
|
||||
as the following checklist:
|
||||
|
||||
- Your callsign and grid locator set to correct values
|
||||
|
||||
- PTT and CAT control (if used) properly configured and tested
|
||||
|
||||
- Computer clock properly synchronized to UTC within ±1 s
|
||||
|
||||
- Audio input and output devices configured for sample rate 48000 Hz,
|
||||
16 bits
|
||||
|
||||
- Radio set to *USB* (upper sideband) mode
|
||||
|
||||
- Radio filters centered and set to widest available passband (up to 5 kHz).
|
||||
|
||||
TIP: Remember that in many circumstances FT8, JT4, JT9, JT65, and WSPR
|
||||
do not require high power. Under most HF propagation conditions, QRP
|
||||
is the norm.
|
||||
@@ -0,0 +1,93 @@
|
||||
// -*- Mode: C++ -*-
|
||||
#ifndef ASTRO_H
|
||||
#define ASTRO_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QScopedPointer>
|
||||
|
||||
#include "Radio.hpp"
|
||||
|
||||
class QSettings;
|
||||
class Configuration;
|
||||
namespace Ui {
|
||||
class Astro;
|
||||
}
|
||||
|
||||
class Astro final
|
||||
: public QDialog
|
||||
{
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
using Frequency = Radio::Frequency;
|
||||
using FrequencyDelta = Radio::FrequencyDelta;
|
||||
|
||||
explicit Astro(QSettings * settings, Configuration const *, QWidget * parent = nullptr);
|
||||
~Astro ();
|
||||
|
||||
struct Correction
|
||||
{
|
||||
Correction ()
|
||||
: rx {0}
|
||||
, tx {0}
|
||||
{}
|
||||
Correction (Correction const&) = default;
|
||||
Correction& operator = (Correction const&) = default;
|
||||
|
||||
FrequencyDelta rx;
|
||||
FrequencyDelta tx;
|
||||
};
|
||||
Correction astroUpdate(QDateTime const& t,
|
||||
QString const& mygrid,
|
||||
QString const& hisgrid,
|
||||
Frequency frequency,
|
||||
bool dx_is_self,
|
||||
bool bTx,
|
||||
bool no_tx_QSY,
|
||||
int TR_period);
|
||||
|
||||
bool doppler_tracking () const;
|
||||
Q_SLOT void nominal_frequency (Frequency rx, Frequency tx);
|
||||
Q_SIGNAL void tracking_update () const;
|
||||
|
||||
protected:
|
||||
void hideEvent (QHideEvent *) override;
|
||||
void closeEvent (QCloseEvent *) override;
|
||||
|
||||
private slots:
|
||||
void on_rbConstFreqOnMoon_clicked();
|
||||
void on_rbFullTrack_clicked();
|
||||
void on_rbOwnEcho_clicked();
|
||||
void on_rbNoDoppler_clicked();
|
||||
void on_rbOnDxEcho_clicked(bool);
|
||||
void on_rbCallDx_clicked();
|
||||
void on_cbDopplerTracking_toggled(bool);
|
||||
|
||||
private:
|
||||
void read_settings ();
|
||||
void write_settings ();
|
||||
void check_split ();
|
||||
|
||||
QSettings * settings_;
|
||||
Configuration const * configuration_;
|
||||
QScopedPointer<Ui::Astro> ui_;
|
||||
|
||||
qint32 m_DopplerMethod;
|
||||
int m_dop;
|
||||
int m_dop00;
|
||||
int m_dx_two_way_dop;
|
||||
};
|
||||
|
||||
inline
|
||||
bool operator == (Astro::Correction const& lhs, Astro::Correction const& rhs)
|
||||
{
|
||||
return lhs.rx == rhs.rx && lhs.tx == rhs.tx;
|
||||
}
|
||||
|
||||
inline
|
||||
bool operator != (Astro::Correction const& lhs, Astro::Correction const& rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
#endif // ASTRO_H
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example of decoding a (7,4) Hamming code using exhaustive enumeration and
|
||||
# probability propagation, with an Additive White Gaussian Noise channel with
|
||||
# noise standard deviation of 0.5, for which Eb/N0 = 5.44 dB.
|
||||
#
|
||||
# Testing is done by transmitting zero blocks, which is sufficient because
|
||||
# both the channel and the decoding procedure are symmetrical. WARNING: But
|
||||
# things can easily become non-symmetrical with bugs, so this technique should
|
||||
# be used with caution, and only when necessary for performance reasons.
|
||||
# Decoding is done three times, once minimizing block error probability, once
|
||||
# minimizing bit error probability, and once by up to 200 iterations of
|
||||
# probability propagation.
|
||||
|
||||
set -e # Stop if an error occurs
|
||||
set -v # Echo commands as they are read
|
||||
|
||||
make-pchk ex-ham7a.pchk 3 7 0:0 0:3 0:4 0:5 1:1 1:3 1:4 1:6 2:2 2:4 2:5 2:6
|
||||
make-gen ex-ham7a.pchk ex-ham7a.gen dense
|
||||
transmit 7x100000 ex-ham7a.rec 1 awgn 0.5
|
||||
|
||||
# DECODE BY ENUMERATION TO MINIMIZE BLOCK ERROR PROBABILITY
|
||||
|
||||
decode ex-ham7a.pchk ex-ham7a.rec ex-ham7a.dec-blk awgn 0.5 \
|
||||
enum-block ex-ham7a.gen
|
||||
verify ex-ham7a.pchk ex-ham7a.dec-blk ex-ham7a.gen
|
||||
|
||||
# DECODE BY ENUMERATION TO MINIMIZE BIT ERROR PROBABILITY
|
||||
|
||||
decode ex-ham7a.pchk ex-ham7a.rec ex-ham7a.dec-bit awgn 0.5 \
|
||||
enum-bit ex-ham7a.gen
|
||||
verify ex-ham7a.pchk ex-ham7a.dec-bit ex-ham7a.gen
|
||||
|
||||
# DECODE BY PROBABILITY PROPAGATION
|
||||
|
||||
decode ex-ham7a.pchk ex-ham7a.rec ex-ham7a.dec-prp awgn 0.5 \
|
||||
prprp 200
|
||||
verify ex-ham7a.pchk ex-ham7a.dec-prp ex-ham7a.gen
|
||||
@@ -1,218 +0,0 @@
|
||||
#include "displaytext.h"
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QDateTime>
|
||||
#include <QTextCharFormat>
|
||||
#include <QTextCursor>
|
||||
#include <QTextBlock>
|
||||
|
||||
#include "qt_helpers.hpp"
|
||||
|
||||
#include "moc_displaytext.cpp"
|
||||
|
||||
DisplayText::DisplayText(QWidget *parent) :
|
||||
QTextEdit(parent)
|
||||
{
|
||||
setReadOnly (true);
|
||||
viewport ()->setCursor (Qt::ArrowCursor);
|
||||
setWordWrapMode (QTextOption::NoWrap);
|
||||
document ()->setMaximumBlockCount (5000); // max lines to limit heap usage
|
||||
}
|
||||
|
||||
void DisplayText::setContentFont(QFont const& font)
|
||||
{
|
||||
char_font_ = font;
|
||||
selectAll ();
|
||||
auto cursor = textCursor ();
|
||||
cursor.beginEditBlock ();
|
||||
auto char_format = cursor.charFormat ();
|
||||
char_format.setFont (char_font_);
|
||||
cursor.mergeCharFormat (char_format);
|
||||
cursor.clearSelection ();
|
||||
cursor.movePosition (QTextCursor::End);
|
||||
|
||||
// position so viewport scrolled to left
|
||||
cursor.movePosition (QTextCursor::Up);
|
||||
cursor.movePosition (QTextCursor::StartOfLine);
|
||||
cursor.endEditBlock ();
|
||||
|
||||
setTextCursor (cursor);
|
||||
ensureCursorVisible ();
|
||||
}
|
||||
|
||||
void DisplayText::mouseDoubleClickEvent(QMouseEvent *e)
|
||||
{
|
||||
bool ctrl = (e->modifiers() & Qt::ControlModifier);
|
||||
bool alt = (e->modifiers() & Qt::AltModifier);
|
||||
emit(selectCallsign(alt,ctrl));
|
||||
QTextEdit::mouseDoubleClickEvent(e);
|
||||
}
|
||||
|
||||
void DisplayText::insertLineSpacer(QString const& line)
|
||||
{
|
||||
appendText (line, "#d3d3d3");
|
||||
}
|
||||
|
||||
void DisplayText::appendText(QString const& text, QColor bg)
|
||||
{
|
||||
auto cursor = textCursor ();
|
||||
cursor.movePosition (QTextCursor::End);
|
||||
auto block_format = cursor.blockFormat ();
|
||||
block_format.setBackground (bg);
|
||||
if (0 == cursor.position ())
|
||||
{
|
||||
cursor.setBlockFormat (block_format);
|
||||
auto char_format = cursor.charFormat ();
|
||||
char_format.setFont (char_font_);
|
||||
cursor.setCharFormat (char_format);
|
||||
}
|
||||
else
|
||||
{
|
||||
cursor.insertBlock (block_format);
|
||||
}
|
||||
cursor.insertText (text);
|
||||
|
||||
// position so viewport scrolled to left
|
||||
cursor.movePosition (QTextCursor::StartOfLine);
|
||||
setTextCursor (cursor);
|
||||
ensureCursorVisible ();
|
||||
document ()->setMaximumBlockCount (document ()->maximumBlockCount ());
|
||||
}
|
||||
|
||||
|
||||
QString DisplayText::appendDXCCWorkedB4(QString message, QString const& callsign, QColor * bg,
|
||||
LogBook const& logBook, QColor color_CQ,
|
||||
QColor color_DXCC,
|
||||
QColor color_NewCall)
|
||||
{
|
||||
QString call = callsign;
|
||||
QString countryName;
|
||||
bool callWorkedBefore;
|
||||
bool countryWorkedBefore;
|
||||
|
||||
if(call.length()==2) {
|
||||
int i0=message.indexOf("CQ "+call);
|
||||
call=message.mid(i0+6,-1);
|
||||
i0=call.indexOf(" ");
|
||||
call=call.mid(0,i0);
|
||||
}
|
||||
if(call.length()<3) return message;
|
||||
if(!call.contains(QRegExp("[0-9]|[A-Z]"))) return message;
|
||||
|
||||
logBook.match(/*in*/call,/*out*/countryName,callWorkedBefore,countryWorkedBefore);
|
||||
int charsAvail = 48;
|
||||
|
||||
// the decoder (seems) to always generate 41 chars. For a normal CQ call, the last five are spaces
|
||||
// TODO this magic 37 characters is also referenced in MainWindow::doubleClickOnCall()
|
||||
int nmin=37;
|
||||
int i=message.indexOf(" CQ ");
|
||||
int k=message.mid(i+4,3).toInt();
|
||||
if(k>0 and k<999) nmin += 4;
|
||||
int s3 = message.indexOf(" ",nmin);
|
||||
if (s3 < nmin) s3 = nmin; // always want at least the characters to position 35
|
||||
s3 += 1; // convert the index into a character count
|
||||
message = message.left(s3); // reduce trailing white space
|
||||
charsAvail -= s3;
|
||||
if (charsAvail > 4)
|
||||
{
|
||||
if (!countryWorkedBefore) // therefore not worked call either
|
||||
{
|
||||
message += "!";
|
||||
*bg = color_DXCC;
|
||||
}
|
||||
else
|
||||
if (!callWorkedBefore) // but have worked the country
|
||||
{
|
||||
message += "~";
|
||||
*bg = color_NewCall;
|
||||
}
|
||||
else
|
||||
{
|
||||
message += " "; // have worked this call before
|
||||
*bg = color_CQ;
|
||||
}
|
||||
charsAvail -= 1;
|
||||
|
||||
// do some obvious abbreviations
|
||||
countryName.replace ("Islands", "Is.");
|
||||
countryName.replace ("Island", "Is.");
|
||||
countryName.replace ("North ", "N. ");
|
||||
countryName.replace ("Northern ", "N. ");
|
||||
countryName.replace ("South ", "S. ");
|
||||
countryName.replace ("East ", "E. ");
|
||||
countryName.replace ("Eastern ", "E. ");
|
||||
countryName.replace ("West ", "W. ");
|
||||
countryName.replace ("Western ", "W. ");
|
||||
countryName.replace ("Central ", "C. ");
|
||||
countryName.replace (" and ", " & ");
|
||||
countryName.replace ("Republic", "Rep.");
|
||||
countryName.replace ("United States", "U.S.A.");
|
||||
countryName.replace ("Fed. Rep. of ", "");
|
||||
countryName.replace ("French ", "Fr.");
|
||||
countryName.replace ("Asiatic", "AS");
|
||||
countryName.replace ("European", "EU");
|
||||
countryName.replace ("African", "AF");
|
||||
|
||||
message += countryName;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
void DisplayText::displayDecodedText(DecodedText const& decodedText, QString const& myCall,
|
||||
bool displayDXCCEntity, LogBook const& logBook,
|
||||
QColor color_CQ, QColor color_MyCall,
|
||||
QColor color_DXCC, QColor color_NewCall)
|
||||
{
|
||||
QColor bg {Qt::white};
|
||||
bool CQcall = false;
|
||||
if (decodedText.string ().contains (" CQ ")
|
||||
|| decodedText.string ().contains (" CQDX ")
|
||||
|| decodedText.string ().contains (" QRZ "))
|
||||
{
|
||||
CQcall = true;
|
||||
bg = color_CQ;
|
||||
}
|
||||
if (myCall != "" and (
|
||||
decodedText.indexOf (" " + myCall + " ") >= 0
|
||||
or decodedText.indexOf (" " + myCall + "/") >= 0
|
||||
or decodedText.indexOf ("/" + myCall + " ") >= 0
|
||||
or decodedText.indexOf ("<" + myCall + " ") >= 0
|
||||
or decodedText.indexOf (" " + myCall + ">") >= 0)) {
|
||||
bg = color_MyCall;
|
||||
}
|
||||
// if enabled add the DXCC entity and B4 status to the end of the
|
||||
// preformated text line t1
|
||||
auto message = decodedText.string ();
|
||||
if (displayDXCCEntity && CQcall)
|
||||
message = appendDXCCWorkedB4 (message, decodedText.CQersCall (), &bg, logBook, color_CQ,
|
||||
color_DXCC, color_NewCall);
|
||||
appendText (message, bg);
|
||||
}
|
||||
|
||||
|
||||
void DisplayText::displayTransmittedText(QString text, QString modeTx, qint32 txFreq,
|
||||
QColor color_TxMsg, bool bFastMode)
|
||||
{
|
||||
QString t1=" @ ";
|
||||
if(modeTx=="FT8") t1=" ~ ";
|
||||
if(modeTx=="JT4") t1=" $ ";
|
||||
if(modeTx=="JT65") t1=" # ";
|
||||
if(modeTx=="MSK144") t1=" & ";
|
||||
QString t2;
|
||||
t2.sprintf("%4d",txFreq);
|
||||
QString t;
|
||||
if(bFastMode or modeTx=="FT8") {
|
||||
t = QDateTime::currentDateTimeUtc().toString("hhmmss") + \
|
||||
" Tx " + t2 + t1 + text;
|
||||
} else {
|
||||
t = QDateTime::currentDateTimeUtc().toString("hhmm") + \
|
||||
" Tx " + t2 + t1 + text;
|
||||
}
|
||||
appendText (t, color_TxMsg);
|
||||
}
|
||||
|
||||
void DisplayText::displayQSY(QString text)
|
||||
{
|
||||
QString t = QDateTime::currentDateTimeUtc().toString("hhmmss") + " " + text;
|
||||
appendText (t, "hotpink");
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example of coding using a (7,4) Hamming code, with transmission through
|
||||
# a Binary Symmetric Channel with error probability of 0.05.
|
||||
#
|
||||
# This example shows how random source messages can be encoded as codewords,
|
||||
# transmitted through the simulated channel, decoded, and the message bits
|
||||
# extracted from the codewords. The final result is in ex-ham7b.ext, which can
|
||||
# be compared to ex-ham7b.src.
|
||||
|
||||
set -e # Stop if an error occurs
|
||||
set -v # Echo commands as they are read
|
||||
|
||||
make-pchk ex-ham7b.pchk 3 7 0:0 0:3 0:4 0:5 1:1 1:3 1:4 1:6 2:2 2:4 2:5 2:6
|
||||
make-gen ex-ham7b.pchk ex-ham7b.gen dense
|
||||
rand-src ex-ham7b.src 1 4x1000
|
||||
encode ex-ham7b.pchk ex-ham7b.gen ex-ham7b.src ex-ham7b.enc
|
||||
transmit ex-ham7b.enc ex-ham7b.rec 1 bsc 0.05
|
||||
decode ex-ham7b.pchk ex-ham7b.rec ex-ham7b.dec bsc 0.05 enum-bit ex-ham7b.gen
|
||||
verify ex-ham7b.pchk ex-ham7b.dec ex-ham7b.gen ex-ham7b.src
|
||||
extract ex-ham7b.gen ex-ham7b.dec ex-ham7b.ext
|
||||
@@ -1,76 +0,0 @@
|
||||
#include "messageaveraging.h"
|
||||
|
||||
#include <QSettings>
|
||||
#include <QApplication>
|
||||
#include <QTextCharFormat>
|
||||
|
||||
#include "SettingsGroup.hpp"
|
||||
#include "qt_helpers.hpp"
|
||||
#include "ui_messageaveraging.h"
|
||||
|
||||
MessageAveraging::MessageAveraging(QSettings * settings, QFont const& font, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
settings_ {settings},
|
||||
ui(new Ui::MessageAveraging)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowTitle (QApplication::applicationName () + " - " + tr ("Message Averaging"));
|
||||
ui->msgAvgPlainTextEdit->setReadOnly (true);
|
||||
changeFont (font);
|
||||
read_settings ();
|
||||
}
|
||||
|
||||
MessageAveraging::~MessageAveraging()
|
||||
{
|
||||
if (isVisible ()) write_settings ();
|
||||
}
|
||||
|
||||
void MessageAveraging::changeFont (QFont const& font)
|
||||
{
|
||||
ui->header_label->setStyleSheet (font_as_stylesheet (font));
|
||||
ui->msgAvgPlainTextEdit->setStyleSheet (font_as_stylesheet (font));
|
||||
setContentFont (font);
|
||||
updateGeometry ();
|
||||
}
|
||||
|
||||
void MessageAveraging::setContentFont(QFont const& font)
|
||||
{
|
||||
ui->msgAvgPlainTextEdit->setFont (font);
|
||||
QTextCharFormat charFormat;
|
||||
charFormat.setFont (font);
|
||||
ui->msgAvgPlainTextEdit->selectAll ();
|
||||
auto cursor = ui->msgAvgPlainTextEdit->textCursor ();
|
||||
cursor.mergeCharFormat (charFormat);
|
||||
cursor.clearSelection ();
|
||||
cursor.movePosition (QTextCursor::End);
|
||||
|
||||
// position so viewport scrolled to left
|
||||
cursor.movePosition (QTextCursor::Up);
|
||||
cursor.movePosition (QTextCursor::StartOfLine);
|
||||
|
||||
ui->msgAvgPlainTextEdit->setTextCursor (cursor);
|
||||
ui->msgAvgPlainTextEdit->ensureCursorVisible ();
|
||||
}
|
||||
|
||||
void MessageAveraging::closeEvent (QCloseEvent * e)
|
||||
{
|
||||
write_settings ();
|
||||
QWidget::closeEvent (e);
|
||||
}
|
||||
|
||||
void MessageAveraging::read_settings ()
|
||||
{
|
||||
SettingsGroup group {settings_, "MessageAveraging"};
|
||||
restoreGeometry (settings_->value ("window/geometry").toByteArray ());
|
||||
}
|
||||
|
||||
void MessageAveraging::write_settings ()
|
||||
{
|
||||
SettingsGroup group {settings_, "MessageAveraging"};
|
||||
settings_->setValue ("window/geometry", saveGeometry ());
|
||||
}
|
||||
|
||||
void MessageAveraging::displayAvg(QString const& t)
|
||||
{
|
||||
ui->msgAvgPlainTextEdit->setPlainText(t);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* maintains a list of country names that have been worked
|
||||
* VK3ACF July 2013
|
||||
*/
|
||||
|
||||
#ifndef __COUNTRIESWORKDED_H
|
||||
#define __COUNTRIESWORKDED_H
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QHash>
|
||||
|
||||
|
||||
class CountriesWorked
|
||||
{
|
||||
public:
|
||||
void init(const QStringList countryNames);
|
||||
void setAsWorked(const QString countryName);
|
||||
bool getHasWorked(const QString countryName);
|
||||
int getWorkedCount();
|
||||
int getSize();
|
||||
|
||||
private:
|
||||
QHash<QString, bool> _data;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
subroutine encode204(message,codeword)
|
||||
! Encode an 68-bit message and return a 204-bit codeword.
|
||||
! The generator matrix has dimensions (136,68).
|
||||
! The code is a (204,68) regular ldpc code with column weight 3.
|
||||
! The code was generated using the PEG algorithm.
|
||||
! After creating the codeword, the columns are re-ordered according to
|
||||
! "colorder" to make the codeword compatible with the parity-check matrix
|
||||
!
|
||||
|
||||
include "ldpc_204_68_params.f90"
|
||||
|
||||
integer*1 codeword(N)
|
||||
integer*1 gen(M,K)
|
||||
integer*1 itmp(N)
|
||||
integer*1 message(K)
|
||||
integer*1 pchecks(M)
|
||||
logical first
|
||||
data first/.true./
|
||||
|
||||
save first,gen
|
||||
|
||||
if( first ) then ! fill the generator matrix
|
||||
gen=0
|
||||
do i=1,M
|
||||
do j=1,17
|
||||
read(g(i)(j:j),"(Z1)") istr
|
||||
do jj=1, 4
|
||||
icol=(j-1)*4+jj
|
||||
if( btest(istr,4-jj) ) gen(i,icol)=1
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
first=.false.
|
||||
endif
|
||||
|
||||
do i=1,M
|
||||
nsum=0
|
||||
do j=1,K
|
||||
nsum=nsum+message(j)*gen(i,j)
|
||||
enddo
|
||||
pchecks(i)=mod(nsum,2)
|
||||
enddo
|
||||
itmp(1:M)=pchecks
|
||||
itmp(M+1:N)=message(1:K)
|
||||
codeword(colorder+1)=itmp(1:N)
|
||||
|
||||
return
|
||||
end subroutine encode204
|
||||
Reference in New Issue
Block a user