Merged master 8748

This commit is contained in:
Jordan Sherer
2018-08-05 11:33:30 -04:00
parent 8f8772f1bd
commit 62899069bf
1222 changed files with 70382 additions and 406763 deletions
@@ -1,101 +0,0 @@
#include <cmath>
#include <algorithm>
#include "Random.h"
void Random::bubbleSort(int a[], int size)
{
for(int pass=1; pass<size; pass++) {
for(int i=0;i<size-pass;i++)
if(a[i]>a[i+1]){
std::swap(a[i], a[i+1]);
}
}
}
double Random::gauss(double sdev, double mean)
{
double sum=0.0;
for (int i=1;i<=12;++i)
{
seed_u = 1664525lu * seed_u + 123456789lu;
sum+=double(seed_u);
}
return (sum/4.29497e9-6.0)*sdev+mean;
}
double Random::uniform(double a, double b)
{
double t;
for(int i=0; i<10;i++){
seed=2045*seed+1;
//seed=seed -(seed/1048576)*1048576;
seed%=1048576;
}
t=seed/1048576.0;
t=a+(b-a)*t;
return(t);
}
int Random::uniform(int a, int b) // [a, b-1]
{
double t;
int i, tt;
if(b==a+1) return(a);
for(i=0; i<10;i++){
seed=2045*seed+1;
//seed=seed -(seed/1048576)*1048576;
seed%=1048576;
}
t=seed/1048576.0;
t=a+(b-a)*t;
tt=(int)t;
if(tt<a) tt=a;
else if(tt>=b) tt=b-1;
return(tt);
}
int Random::nonUniform(int a, int b) // [a, b-1]
{
double t;
int i, tt;
if(b==a+1) return(a);
for(i=0; i<10;i++){
seed=2045*seed+1;
//seed=seed -(seed/1048576)*1048576;
seed%=1048576;
}
t=seed/1048576.0;
t=a+(b-a)*pow(t, 0.6667); //t^1.5
tt=(int)t;
if(tt<a) tt=a;
else if(tt>=b) tt=b-1;
return(tt);
}
/*
void m_uniform(int a , int b, long int *seed, int *itmp, int num)
{
int index, imed, i, k;
index=0;
itmp[0]=uniform(a, b, seed);
Loop1:
imed=uniform(a, b, seed);
k=0;
for(i=0;i<=index;i++)
if(imed==itmp[i]) {k=1; break;}
if(k==0) {index++; itmp[index]=imed;}
if(index<num-1) goto Loop1;
bubble(itmp, num); //bubble sorting
}
*/
@@ -1,77 +0,0 @@
// Status=review
image::RadioTab.png[align="center",alt="Radio Tab"]
_WSJT-X_ offers CAT (Computer Aided Transceiver) control of relevant
features of most modern transceivers. To configure the program for
your radio, select the *Radio* tab.
- Select your radio type from the drop-down list labeled *Rig*, or
*None* if you do not wish to use CAT control.
- Alternatively, if you have configured your station for control by
*DX Lab Suite Commander*, *Ham Radio Deluxe*, *Hamlib NET rigctl*, or
*OmniRig*, you may select one of those program names from the *Rig*
list. In these cases the entry field immediately under _CAT Control_
will be relabeled as *Network Server*. Leave this field blank to
access the default instance of your control program, running on the
same computer. If the control program runs on a different computer
and/or port, specify it here. Hover the mouse pointer over the entry
field to see the required formatting details.
- Select *OmniRig Rig 1* or *OmniRig Rig 2* to connect to an _OmniRig_
server running on the same computer. Note that _OmniRig_ is available
only under Windows.
- Set *Poll Interval* to the desired interval for _WSJT-X_ to query
your radio. For most radios a small number (say, 1 3 s) is
suitable.
- _CAT Control_: To have _WSJT-X_ control the radio directly rather
than though another program, make the following settings:
* Select the *Serial Port* used to communicate with your radio.
* _Serial Port Parameters_: Set values for *Baud Rate*, *Data Bits*,
*Stop Bits*, and *Handshake* method. Consult your radio's user guide
for the proper parameter values.
* _Force Control Lines_: A few station setups require the CAT serial
ports *RTS* and/or *DTR* control lines to be forced high or
low. Check these boxes only if you are sure they are needed (for
example, to power the radio serial interface).
- _PTT Method_: select *VOX*, *CAT*, *DTR*, or *RTS* as the desired
method for T/R switching. If your choice is *DTR* or *RTS*, select
the desired serial port (which may be the same one as used for
CAT control).
- _Transmit Audio Source_: some radios permit you to choose the
connector that will accept Tx audio. If this choice is enabled,
select *Rear/Data* or *Front/Mic*.
- _Mode_: _WSJT-X_ uses upper sideband mode for both transmitting and
receiving. Select *USB*, or choose *Data/Pkt* if your radio offers
such an option and uses it to enable the rear-panel audio line input.
Some radios also offer wider and/or flatter passbands when set to
*Data/Pkt* mode. Select *None* if you do not want _WSJT-X_ to change
the radio's Mode setting.
- _Split Operation_: Significant advantages result from using *Split*
mode (separate VFOs for Rx and Tx) if your radio supports it. If it
does not, _WSJT-X_ can emulate such behavior. Either method will
result in a cleaner transmitted signal, by keeping the Tx audio always
in the range 1500 to 2000 Hz so that audio harmonics cannot pass
through the Tx sideband filter. Select *Rig* to use the radio's Split
mode, or *Fake It* to have _WSJT-X_ adjust the VFO frequency as
needed, when T/R switching occurs. Choose *None* if you do not
wish to use split operation.
When all required settings have been made, click *Test CAT* to test
communication between _WSJT-X_ and your radio. The button should turn
green to indicate that proper communication has been established.
Failure of the CAT-control test turns the button red and displays an
error message. After a successful CAT test, toggle the *Test PTT*
button to confirm that your selected method of T/R control is working
properly. (If you selected *VOX* for _PTT Method_, you can test T/R
switching later by using the *Tune* button on the main window.)
File diff suppressed because it is too large Load Diff
@@ -1,38 +0,0 @@
#ifndef WSJTX_UDP_BEACONS_MODEL_HPP__
#define WSJTX_UDP_BEACONS_MODEL_HPP__
#include <QStandardItemModel>
#include "MessageServer.hpp"
using Frequency = MessageServer::Frequency;
class QString;
class QTime;
//
// Beacons Model - simple data model for all beacon spots
//
// The model is a basic table with uniform row format. Rows consist of
// QStandardItem instances containing the string representation of the
// column data and if the underlying field is not a string then the
// UserRole+1 role contains the underlying data item.
//
// Two slots are provided to add a new decode and remove all spots for
// a client.
//
class BeaconsModel
: public QStandardItemModel
{
Q_OBJECT;
public:
explicit BeaconsModel (QObject * parent = nullptr);
Q_SLOT void add_beacon_spot (bool is_new, QString const& client_id, QTime time, qint32 snr, float delta_time
, Frequency frequency, qint32 drift, QString const& callsign, QString const& grid
, qint32 power);
Q_SLOT void clear_decodes (QString const& client_id);
};
#endif