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,129 +0,0 @@
subroutine azdist(grid1,grid2,utch,nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter)
character*(*) grid1,grid2
character*6 MyGrid,HisGrid,mygrid0,hisgrid0
real*8 utch,utch0
logical HotABetter,IamEast
real eltab(22),daztab(22)
data eltab/18.,15.,13.,11.,9.,8.,7.,6.,5.3,4.7,4.,3.3,2.7, &
2.,1.5,1.,0.8,0.6,0.4,0.2,0.0,0.0/
data daztab/21.,18.,16.,15.,14.,13.,12.,11.,10.7,10.3,10., &
10.,10.,10.,10.,10.,10.,9.,9.,9.,8.,8./
data mygrid0/" "/,hisgrid0/" "/,utch0/-999.d0/
save
MyGrid=grid1
HisGrid=grid2
if(ichar(grid1(5:5)).eq.0) MyGrid(5:6)=' '
if(ichar(grid2(5:5)).eq.0) HisGrid(5:6)=' '
if(MyGrid.eq.HisGrid) then
naz=0
nel=0
ndmiles=0
ndkm=0
nhotaz=0
nhotabetter=1
go to 999
endif
if(mygrid.eq.mygrid0 .and. hisgrid.eq.hisgrid0 .and. &
abs(utch-utch0).lt.0.1666667d0) go to 900
utch0=utch
mygrid0=mygrid
hisgrid0=hisgrid
utchours=utch
if(MyGrid(5:5).eq.' ') MyGrid(5:5)='m'
if(MyGrid(6:6).eq.' ') MyGrid(6:6)='m'
if(HisGrid(5:5).eq.' ') HisGrid(5:5)='m'
if(HisGrid(6:6).eq.' ') HisGrid(6:6)='m'
if(MyGrid.eq.HisGrid) then
Az=0.
Dmiles=0.
Dkm=0.0
El=0.
HotA=0.
HotB=0.
HotABetter=.true.
go to 900
endif
call grid2deg(MyGrid,dlong1,dlat1)
call grid2deg(HisGrid,dlong2,dlat2)
eps=1.e-6
Az=0.
Dmiles=0.
Dkm=0.0
El=0.
HotA=0.
HotB=0.
HotABetter=.true.
if(abs(dlat1-dlat2).lt.eps .and. abs(dlong1-dlong2).lt.eps) go to 900
difflong=mod(dlong1-dlong2+720.0,360.0)
if(abs(dlat1+dlat2).lt.eps .and. abs(difflong-180.0).lt.eps) then
! Antipodes
Dkm=20400
go to 900
endif
call geodist(dlat1,dlong1,dlat2,dlong2,Az,Baz,Dkm)
ndkm=Dkm/100
j=ndkm-4
if(j.lt.1) j=1
if(j.gt.21)j=21
if(Dkm.lt.500.0) then
El=18.0
else
u=(Dkm-100.0*ndkm)/100.0
El=(1.0-u)*eltab(j) + u*eltab(j+1)
endif
daz=daztab(j) + u * (daztab(j+1)-daztab(j))
Dmiles=Dkm/1.609344
tmid=mod(UTChours-0.5*(dlong1+dlong2)/15.0+48.0,24.0)
IamEast=.false.
if(dlong1.lt.dlong2) IamEast=.true.
if(dlong1.eq.dlong2 .and. dlat1.gt.dlat2) IamEast=.false.
azEast=baz
if(IamEast) azEast=az
if((azEast.ge.45.0 .and. azEast.lt.135.0) .or. &
(azEast.ge.225.0 .and. azEast.lt.315.0)) then
! The path will be taken as "east-west".
HotABetter=.true.
if(abs(tmid-6.0).lt.6.0) HotABetter=.false.
if((dlat1+dlat2)/2.0 .lt. 0.0) HotABetter=.not.HotABetter
else
! The path will be taken as "north-south".
HotABetter=.false.
if(abs(tmid-12.0).lt.6.0) HotABetter=.true.
endif
if(IamEast) then
HotA = Az - daz
HotB = Az + daz
else
HotA = Az + daz
HotB = Az - daz
endif
if(HotA.lt.0.0) HotA=HotA+360.0
if(HotA.gt.360.0) HotA=HotA-360.0
if(HotB.lt.0.0) HotB=HotB+360.0
if(HotB.gt.360.0) HotB=HotB-360.0
900 continue
naz=nint(Az)
nel=nint(el)
nDmiles=nint(Dmiles)
nDkm=nint(Dkm)
nHotAz=nint(HotB)
nHotABetter=0
if(HotABetter) then
nHotAz=nint(HotA)
nHotABetter=1
endif
999 return
end subroutine azdist
@@ -1,101 +0,0 @@
#include "MessageBox.hpp"
#include <QDialogButtonBox>
#include <QPushButton>
#include "revision_utils.hpp"
MessageBox::MessageBox (QWidget * parent)
: QMessageBox {parent}
{
setWindowTitle (program_title ());
}
MessageBox::MessageBox (Icon icon, QString const& text, StandardButtons buttons
, QWidget * parent, Qt::WindowFlags flags)
: QMessageBox {icon, program_title (), text, buttons, parent, flags}
{
}
void MessageBox::about_message (QWidget * parent, QString const& text)
{
QMessageBox::about (parent, program_title (), text);
}
void MessageBox::about_Qt_message (QWidget * parent)
{
QMessageBox::aboutQt (parent, program_title ());
}
namespace
{
QMessageBox::StandardButton show_it (QWidget * parent, MessageBox::Icon icon
, QString const& text
, QString const& informative
, QString const& detail
, MessageBox::StandardButtons buttons
, MessageBox::StandardButton default_button)
{
MessageBox mb {icon, text, MessageBox::NoButton, parent};
QDialogButtonBox * button_box = mb.findChild<QDialogButtonBox *> ();
Q_ASSERT (button_box);
uint mask = MessageBox::FirstButton;
while (mask <= MessageBox::LastButton) {
uint sb = buttons & mask;
mask <<= 1;
if (!sb)
continue;
QPushButton * button = mb.addButton (static_cast<MessageBox::StandardButton> (sb));
// Choose the first accept role as the default
if (mb.defaultButton ())
continue;
if ((default_button == MessageBox::NoButton
&& button_box->buttonRole (button) == QDialogButtonBox::AcceptRole)
|| (default_button != MessageBox::NoButton
&& sb == static_cast<uint> (default_button)))
mb.setDefaultButton (button);
}
mb.setInformativeText (informative);
mb.setDetailedText (detail);
if (mb.exec() == -1)
return MessageBox::Cancel;
return mb.standardButton (mb.clickedButton ());
}
}
auto MessageBox::information_message (QWidget * parent, QString const& text
, QString const& informative
, QString const& detail
, StandardButtons buttons
, StandardButton default_button) -> StandardButton
{
return show_it (parent, Information, text, informative, detail, buttons, default_button);
}
auto MessageBox::query_message (QWidget * parent, QString const& text
, QString const& informative
, QString const& detail
, StandardButtons buttons
, StandardButton default_button) -> StandardButton
{
return show_it (parent, Question, text, informative, detail, buttons, default_button);
}
auto MessageBox::warning_message (QWidget * parent, QString const& text
, QString const& informative
, QString const& detail
, StandardButtons buttons
, StandardButton default_button) -> StandardButton
{
return show_it (parent, Warning, text, informative, detail, buttons, default_button);
}
auto MessageBox::critical_message (QWidget * parent, QString const& text
, QString const& informative
, QString const& detail
, StandardButtons buttons
, StandardButton default_button) -> StandardButton
{
return show_it (parent, Critical, text, informative, detail, buttons, default_button);
}
File diff suppressed because it is too large Load Diff
@@ -1,93 +0,0 @@
// -*- Mode: C++ -*-
/*
* Class to handle the formatted string as returned from the fortran decoder
*
* VK3ACF August 2013
*/
#ifndef DECODEDTEXT_H
#define DECODEDTEXT_H
#include <QString>
/*
0123456789012345678901234567890123456789
^ ^ ^ ^ ^ ^
2343 -11 0.8 1259 # YV6BFE F6GUU R-08
2343 -19 0.3 718 # VE6WQ SQ2NIJ -14
2343 -7 0.3 815 # KK4DSD W7VP -16
2343 -13 0.1 3627 @ CT1FBK IK5YZT R+02
0605 Tx 1259 # CQ VK3ACF QF22
*/
class DecodedText
{
public:
// These define the columns in the decoded text where fields are to be found.
// We rely on these columns being the same in the fortran code (lib/decoder.f90) that formats the decoded text
enum Columns { column_time = 0,
column_snr = 5,
column_dt = 9,
column_freq = 14,
column_mode = 19,
column_qsoText = 22 };
void operator=(const QString &rhs)
{
_string = rhs;
};
void operator=(const QByteArray &rhs)
{
_string = rhs;
};
void operator+=(const QString &rhs)
{
_string += rhs;
};
QString string() { return _string; };
int indexOf(QString s) { return _string.indexOf(s); };
int indexOf(QString s, int i) { return _string.indexOf(s,i); };
QString mid(int f, int t) { return _string.mid(f,t); };
QString left(int i) { return _string.left(i); };
void clear() { _string.clear(); };
QString CQersCall();
bool isJT65();
bool isJT9();
bool isTX();
int frequencyOffset(); // hertz offset from the tuned dial or rx frequency, aka audio frequency
int snr();
float dt();
// find and extract any report. Returns true if this is a standard message
bool report(QString const& myBaseCall, QString const& dxBaseCall, /*mod*/QString& report);
// get the first text word, usually the call
QString call();
// get the second word, most likely the de call and the third word, most likely grid
void deCallAndGrid(/*out*/QString& call, QString& grid);
int timeInSeconds();
// returns a string of the SNR field with a leading + or - followed by two digits
QString report();
private:
QString _string;
};
extern "C" { bool stdmsg_(const char* msg, int len); }
#endif // DECODEDTEXT_H