Merged master 8748
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
128
|
||||
48
|
||||
12
|
||||
1 13 26 38 51 62 75 86 99 111 124 0
|
||||
2 13 27 39 49 63 76 87 100 112 121 0
|
||||
3 14 27 40 52 64 74 88 101 104 123 0
|
||||
2 15 28 41 53 65 77 89 102 113 125 0
|
||||
4 16 26 41 54 66 71 90 101 114 122 0
|
||||
5 15 29 40 55 67 78 91 98 110 126 0
|
||||
6 17 30 42 56 63 79 90 103 115 124 0
|
||||
7 18 25 43 56 68 80 87 104 113 122 0
|
||||
7 13 29 44 52 69 81 92 102 114 127 0
|
||||
8 14 29 42 57 66 77 86 97 116 119 0
|
||||
9 19 26 45 56 69 76 93 97 110 128 0
|
||||
9 14 28 46 54 68 82 91 99 112 118 0
|
||||
8 20 31 47 49 69 78 88 105 109 124 0
|
||||
1 20 32 42 52 70 76 94 106 117 0 0
|
||||
10 15 33 48 52 62 80 93 100 118 119 0
|
||||
11 18 31 39 48 67 83 94 97 114 125 0
|
||||
12 15 34 37 49 64 73 85 99 116 127 0
|
||||
2 21 25 45 55 64 83 92 103 119 0 0
|
||||
4 22 33 46 55 65 84 86 107 108 0 0
|
||||
11 16 27 45 53 70 79 95 107 111 126 0
|
||||
6 13 33 45 57 68 85 96 101 120 0 0
|
||||
12 17 25 38 58 67 76 96 107 118 123 0
|
||||
5 18 30 44 59 71 77 93 106 120 0 0
|
||||
6 20 28 43 50 72 83 86 95 121 127 0
|
||||
11 23 28 38 59 73 81 88 108 115 0 0
|
||||
10 19 32 49 60 67 75 89 101 108 0 0
|
||||
5 22 27 48 54 69 73 96 103 113 0 0
|
||||
12 23 35 47 50 62 79 97 106 122 0 0
|
||||
3 18 26 47 53 61 82 85 98 108 0 0
|
||||
9 22 31 41 58 60 72 87 106 115 116 0
|
||||
10 16 30 50 58 65 73 91 104 109 0 0
|
||||
10 24 36 41 57 61 78 94 103 111 123 127
|
||||
4 17 29 43 59 74 85 89 109 112 128 0
|
||||
3 21 34 38 60 63 77 95 105 114 128 0
|
||||
7 24 37 46 53 71 74 96 105 110 0 0
|
||||
6 19 34 47 51 70 81 91 100 123 125 0
|
||||
2 24 31 40 56 66 81 84 95 118 120 0
|
||||
1 14 30 37 48 72 78 92 107 122 128 0
|
||||
3 23 24 42 55 68 75 93 109 121 125 0
|
||||
12 22 32 43 51 71 82 88 102 119 126 0
|
||||
1 23 36 44 58 64 80 90 110 112 0 0
|
||||
7 19 35 40 59 65 82 90 111 117 0 0
|
||||
9 17 36 39 50 66 75 92 105 117 126 0
|
||||
4 21 35 39 57 70 80 98 99 115 0 0
|
||||
8 25 33 37 54 60 79 94 98 121 0 0
|
||||
8 16 34 46 61 62 83 87 102 117 120 0
|
||||
11 21 32 44 61 72 74 84 100 113 124 0
|
||||
5 20 35 36 51 63 84 89 104 116 0 0
|
||||
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
#Sov Mil Order of Malta: 15: 28: EU: 41.90: -12.43: -1.0: 1A:
|
||||
#1A;
|
||||
#Spratly Islands: 26: 50: AS: 9.88: -114.23: -8.0: 1S:
|
||||
#1S,9M0,BV9S;
|
||||
#Monaco: 14: 27: EU: 43.73: -7.40: -1.0: 3A:
|
||||
#3A;
|
||||
#Heard Island: 39: 68: AF: -53.08: -73.50: -5.0: VK0H:
|
||||
#=VK0IR;
|
||||
#Macquarie Island: 30: 60: OC: -54.60: -158.88: -10.0: VK0M:
|
||||
#=VK0KEV;
|
||||
#Cocos-Keeling: 29: 54: OC: -12.15: -96.82: -6.5: VK9C:
|
||||
#AX9C,AX9Y,VH9C,VH9Y,VI9C,VI9Y,VJ9C,VJ9Y,VK9C,VK9Y,VL9C,VL9Y,VM9C,VM9Y,
|
||||
#VN9C,VN9Y,VZ9C,VZ9Y,=VK9AA;
|
||||
*/
|
||||
|
||||
|
||||
#include "countrydat.h"
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <QDebug>
|
||||
#include "Radio.hpp"
|
||||
|
||||
void CountryDat::init(const QString filename)
|
||||
{
|
||||
_filename = filename;
|
||||
_data.clear();
|
||||
}
|
||||
|
||||
QString CountryDat::_extractName(const QString line) const
|
||||
{
|
||||
int s1 = line.indexOf(':');
|
||||
if (s1>=0)
|
||||
{
|
||||
QString name = line.mid(0,s1);
|
||||
return name;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
void CountryDat::_removeBrackets(QString &line, const QString a, const QString b) const
|
||||
{
|
||||
int s1 = line.indexOf(a);
|
||||
while (s1 >= 0)
|
||||
{
|
||||
int s2 = line.indexOf(b);
|
||||
line = line.mid(0,s1) + line.mid(s2+1,-1);
|
||||
s1 = line.indexOf(a);
|
||||
}
|
||||
}
|
||||
|
||||
QStringList CountryDat::_extractPrefix(QString &line, bool &more) const
|
||||
{
|
||||
line = line.remove(" \n");
|
||||
line = line.replace(" ","");
|
||||
|
||||
_removeBrackets(line,"(",")");
|
||||
_removeBrackets(line,"[","]");
|
||||
_removeBrackets(line,"<",">");
|
||||
_removeBrackets(line,"~","~");
|
||||
|
||||
int s1 = line.indexOf(';');
|
||||
more = true;
|
||||
if (s1 >= 0)
|
||||
{
|
||||
line = line.mid(0,s1);
|
||||
more = false;
|
||||
}
|
||||
|
||||
QStringList r = line.split(',');
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
void CountryDat::load()
|
||||
{
|
||||
_data.clear();
|
||||
_countryNames.clear(); //used by countriesWorked
|
||||
|
||||
QFile inputFile(_filename);
|
||||
if (inputFile.open(QIODevice::ReadOnly))
|
||||
{
|
||||
QTextStream in(&inputFile);
|
||||
while ( !in.atEnd() )
|
||||
{
|
||||
QString line1 = in.readLine();
|
||||
if ( !in.atEnd() )
|
||||
{
|
||||
QString line2 = in.readLine();
|
||||
|
||||
QString name = _extractName(line1);
|
||||
if (name.length()>0)
|
||||
{
|
||||
QString continent=line1.mid(36,2);
|
||||
QString principalPrefix=line1.mid(69,4);
|
||||
int i1=principalPrefix.indexOf(":");
|
||||
if(i1>0) principalPrefix=principalPrefix.mid(0,i1);
|
||||
name += "; " + principalPrefix + "; " + continent;
|
||||
_countryNames << name;
|
||||
bool more = true;
|
||||
QStringList prefixs;
|
||||
while (more)
|
||||
{
|
||||
QStringList p = _extractPrefix(line2,more);
|
||||
prefixs += p;
|
||||
if (more)
|
||||
line2 = in.readLine();
|
||||
}
|
||||
|
||||
QString p;
|
||||
foreach(p,prefixs)
|
||||
{
|
||||
if (p.length() > 0)
|
||||
_data.insert(p,name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
inputFile.close();
|
||||
}
|
||||
}
|
||||
|
||||
// return country name else ""
|
||||
QString CountryDat::find(QString call) const
|
||||
{
|
||||
call = call.toUpper ();
|
||||
|
||||
// check for exact match first
|
||||
if (_data.contains ("=" + call))
|
||||
{
|
||||
return fixup (_data.value ("=" + call), call);
|
||||
}
|
||||
|
||||
auto prefix = Radio::effective_prefix (call);
|
||||
auto match_candidate = prefix;
|
||||
while (match_candidate.size () >= 1)
|
||||
{
|
||||
if (_data.contains (match_candidate))
|
||||
{
|
||||
return fixup (_data.value (match_candidate), prefix);
|
||||
}
|
||||
match_candidate = match_candidate.left (match_candidate.size () - 1);
|
||||
}
|
||||
return QString {};
|
||||
}
|
||||
|
||||
QString CountryDat::fixup (QString country, QString const& call) const
|
||||
{
|
||||
//
|
||||
// deal with special rules that cty.dat does not cope with
|
||||
//
|
||||
|
||||
// KG4 2x1 and 2x3 calls that map to Gitmo are mainland US not Gitmo
|
||||
if (call.startsWith ("KG4") && call.size () != 5 && call.size () != 3)
|
||||
{
|
||||
country.replace ("Guantanamo Bay; KG4; NA", "United States; K; NA");
|
||||
}
|
||||
return country;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
subroutine packprop(k,muf,ccur,cxp,n1)
|
||||
|
||||
! Pack propagation indicators into a 21-bit number.
|
||||
|
||||
! k k-index, 0-9; 10="N/A"
|
||||
! muf muf, 2-60 MHz; 0=N/A, 1="none", 61=">60 MHz"
|
||||
! ccur up to two current events, each indicated by single
|
||||
! or double letter.
|
||||
! cxp zero or one expected event, indicated by single or
|
||||
! double letter
|
||||
|
||||
character ccur*4,cxp*2
|
||||
|
||||
j=ichar(ccur(1:1))-64
|
||||
if(j.lt.0) j=0
|
||||
n1=j
|
||||
do i=2,4
|
||||
if(ccur(i:i).eq.' ') go to 10
|
||||
if(ccur(i:i).eq.ccur(i-1:i-1)) then
|
||||
n1=n1+26
|
||||
else
|
||||
j=ichar(ccur(i:i))-64
|
||||
if(j.lt.0) j=0
|
||||
n1=53*n1 + j
|
||||
endif
|
||||
enddo
|
||||
|
||||
10 j=ichar(cxp(1:1))-64
|
||||
if(j.lt.0) j=0
|
||||
if(cxp(2:2).eq.cxp(1:1)) j=j+26
|
||||
n1=53*n1 + j
|
||||
n1=11*n1 + k
|
||||
n1=62*n1 + muf
|
||||
|
||||
return
|
||||
end subroutine packprop
|
||||
@@ -1,36 +0,0 @@
|
||||
<table cellspacing=1>
|
||||
<tr><td><b>F1 </b></td><td>Online User's Guide</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 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 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