Ripped out echograph as it was causing strange linking issues with the MacOS compiler

This commit is contained in:
Jordan Sherer 2019-10-22 22:08:20 -04:00
parent d2afa493aa
commit 3841e1901f
11 changed files with 3 additions and 942 deletions

View File

@ -227,8 +227,6 @@ set (wsjtx_CXXSRCS
signalmeter.cpp
plotter.cpp
widegraph.cpp
echograph.cpp
echoplot.cpp
fastgraph.cpp
fastplot.cpp
about.cpp
@ -317,7 +315,6 @@ set (wsjt_FSRCS
lib/astro.f90
lib/astrosub.f90
lib/astro0.f90
lib/avecho.f90
lib/averms.f90
lib/azdist.f90
lib/badmsg.f90
@ -529,7 +526,6 @@ set (wsjtx_UISRCS
messagewindow.ui
about.ui
astro.ui
echograph.ui
fastgraph.ui
messageaveraging.ui
widegraph.ui

View File

@ -122,13 +122,6 @@ extern struct {
float filter[3457];
} spectra_;
extern struct {
int nclearave;
int nsum;
float blue[4096];
float red[4096];
} echocom_;
extern struct {
float wave[606720];
int nslots;

View File

@ -1,103 +0,0 @@
#include "echograph.h"
#include "commons.h"
#include <QSettings>
#include <QApplication>
#include "echoplot.h"
#include "ui_echograph.h"
#include "moc_echograph.cpp"
#define NSMAX2 1366
EchoGraph::EchoGraph(QSettings * settings, QWidget *parent) :
QDialog {parent, Qt::Window | Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint},
m_settings (settings),
ui(new Ui::EchoGraph)
{
ui->setupUi(this);
setWindowTitle (QApplication::applicationName () + " - " + tr ("Echo Graph"));
installEventFilter(parent); //Installing the filter
ui->echoPlot->setCursor(Qt::CrossCursor);
setMaximumWidth(2048);
setMaximumHeight(880);
ui->echoPlot->setMaximumHeight(800);
//Restore user's settings
m_settings->beginGroup("EchoGraph");
restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ());
ui->echoPlot->setPlotZero(m_settings->value("PlotZero", 0).toInt());
ui->echoPlot->setPlotGain(m_settings->value("PlotGain", 0).toInt());
ui->zeroSlider->setValue(ui->echoPlot->getPlotZero());
ui->gainSlider->setValue(ui->echoPlot->getPlotGain());
int n=m_settings->value("Smooth",0).toInt();
ui->echoPlot->m_smooth=n;
ui->smoothSpinBox->setValue(n);
n=m_settings->value("EchoBPP",1).toInt();
ui->echoPlot->m_binsPerPixel=n;
ui->binsPerPixelSpinBox->setValue(n);
ui->echoPlot->m_blue=m_settings->value("BlueCurve",false).toBool();
m_nColor=m_settings->value("EchoColors",0).toInt();
m_settings->endGroup();
ui->echoPlot->setColors(m_nColor);
}
EchoGraph::~EchoGraph()
{
saveSettings();
}
void EchoGraph::closeEvent (QCloseEvent * e)
{
saveSettings ();
QDialog::closeEvent (e);
}
void EchoGraph::saveSettings()
{
//Save user's settings
m_settings->beginGroup("EchoGraph");
m_settings->setValue ("geometry", saveGeometry ());
m_settings->setValue("PlotZero",ui->echoPlot->m_plotZero);
m_settings->setValue("PlotGain",ui->echoPlot->m_plotGain);
m_settings->setValue("Smooth",ui->echoPlot->m_smooth);
m_settings->setValue("EchoBPP",ui->echoPlot->m_binsPerPixel);
m_settings->setValue("BlueCurve",ui->echoPlot->m_blue);
m_settings->setValue("EchoColors",m_nColor);
m_settings->endGroup();
}
void EchoGraph::plotSpec()
{
ui->echoPlot->draw();
ui->nsum_label->setText("N: " + QString::number(echocom_.nsum));
}
void EchoGraph::on_smoothSpinBox_valueChanged(int n)
{
ui->echoPlot->setSmooth(n);
ui->echoPlot->draw();
}
void EchoGraph::on_gainSlider_valueChanged(int value)
{
ui->echoPlot->setPlotGain(value);
ui->echoPlot->draw();
}
void EchoGraph::on_zeroSlider_valueChanged(int value)
{
ui->echoPlot->setPlotZero(value);
ui->echoPlot->draw();
}
void EchoGraph::on_binsPerPixelSpinBox_valueChanged(int n)
{
ui->echoPlot->m_binsPerPixel=n;
ui->echoPlot->DrawOverlay();
ui->echoPlot->draw();
}
void EchoGraph::on_pbColors_clicked()
{
m_nColor = (m_nColor+1) % 6;
ui->echoPlot->setColors(m_nColor);
}

View File

@ -1,41 +0,0 @@
#ifndef ECHOGRAPH_H
#define ECHOGRAPH_H
#include <QDialog>
#include <QScopedPointer>
namespace Ui {
class EchoGraph;
}
class QSettings;
class EchoGraph : public QDialog
{
Q_OBJECT
protected:
void closeEvent (QCloseEvent *) override;
public:
explicit EchoGraph(QSettings *, QWidget *parent = 0);
~EchoGraph();
void plotSpec();
void saveSettings();
private slots:
void on_smoothSpinBox_valueChanged(int n);
void on_gainSlider_valueChanged(int value);
void on_zeroSlider_valueChanged(int value);
void on_binsPerPixelSpinBox_valueChanged(int n);
void on_pbColors_clicked();
private:
QSettings * m_settings;
qint32 m_nColor;
QScopedPointer<Ui::EchoGraph> ui;
};
#endif // ECHOGRAPH_H

View File

@ -1,294 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>EchoGraph</class>
<widget class="QDialog" name="EchoGraph">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>625</width>
<height>336</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>570</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Echo Graph</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="EPlotter" name="echoPlot">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>273</width>
<height>200</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>6</number>
</property>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QSpinBox" name="binsPerPixelSpinBox">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Compression factor for frequency scale&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="prefix">
<string>Bins/Pixel </string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Gain</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="gainSlider">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Echo spectrum gain&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="minimum">
<number>-30</number>
</property>
<property name="maximum">
<number>30</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Zero</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="zeroSlider">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Echo spectrum zero&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="minimum">
<number>-150</number>
</property>
<property name="maximum">
<number>150</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QSpinBox" name="smoothSpinBox">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Smoothing of echo spectrum&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="prefix">
<string>Smooth </string>
</property>
<property name="maximum">
<number>20</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="nsum_label">
<property name="minimumSize">
<size>
<width>30</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of echo transmissions averaged&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>N: 0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbColors">
<property name="maximumSize">
<size>
<width>50</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click to cycle through a sequence of colors and line widths.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Colors</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>EPlotter</class>
<extends>QFrame</extends>
<header>plotter.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -1,324 +0,0 @@
#include "echoplot.h"
#include "commons.h"
#include <math.h>
#include <QDebug>
#include "moc_echoplot.cpp"
#define MAX_SCREENSIZE 2048
EPlotter::EPlotter(QWidget *parent) : //EPlotter Constructor
QFrame(parent)
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
setFocusPolicy(Qt::StrongFocus);
setAttribute(Qt::WA_PaintOnScreen,false);
setAutoFillBackground(false);
setAttribute(Qt::WA_OpaquePaintEvent, false);
setAttribute(Qt::WA_NoSystemBackground, true);
m_StartFreq = -200;
m_fftBinWidth=12000.0/32768.0;
m_binsPerPixel=1;
m_fSpan=1000.0;
m_hdivs = HORZ_DIVS;
m_Running = false;
m_paintEventBusy=false;
m_2DPixmap = QPixmap(0,0);
m_ScalePixmap = QPixmap(0,0);
m_OverlayPixmap = QPixmap(0,0);
m_Size = QSize(0,0);
m_TxFreq = 1500;
m_line = 0;
m_dBStepSize=10;
}
EPlotter::~EPlotter() { } // Destructor
QSize EPlotter::minimumSizeHint() const
{
return QSize(50, 50);
}
QSize EPlotter::sizeHint() const
{
return QSize(180, 180);
}
void EPlotter::resizeEvent(QResizeEvent* ) //resizeEvent()
{
if(!size().isValid()) return;
if( m_Size != size() ) { //if changed, resize pixmaps to new screensize
m_Size = size();
m_w = m_Size.width();
m_h = m_Size.height();
m_h1=30;
m_h2=m_h-m_h1;
m_2DPixmap = QPixmap(m_Size.width(), m_h2);
m_2DPixmap.fill(Qt::black);
m_OverlayPixmap = QPixmap(m_Size.width(), m_h2);
m_ScalePixmap = QPixmap(m_w,30);
m_ScalePixmap.fill(Qt::white);
m_fSpan=m_w*m_fftBinWidth*m_binsPerPixel;
m_StartFreq=50 * int((-0.5*m_fSpan)/50.0 - 0.5);
}
DrawOverlay();
draw();
}
void EPlotter::paintEvent(QPaintEvent *) // paintEvent()
{
if(m_paintEventBusy) return;
m_paintEventBusy=true;
QPainter painter(this);
painter.drawPixmap(0,0,m_ScalePixmap);
painter.drawPixmap(0,m_h1,m_2DPixmap);
m_paintEventBusy=false;
}
void EPlotter::draw() //draw()
{
int i,j,y;
float blue[4096],red[4096];
float gain = pow(10.0,(m_plotGain/20.0));
QPen penBlue(QColor(0,255,255),1);
QPen penRed(Qt::red,1);
QPen penRed2(Qt::red,2);
QPen penBlack(Qt::black,1);
QPen penBlack2(Qt::black,2);
if(m_2DPixmap.size().width()==0) return;
QPainter painter2D(&m_2DPixmap);
QRect tmp(0,0,m_w,m_h2);
if(m_nColor < 2) {
painter2D.fillRect(tmp,Qt::black);
} else {
painter2D.fillRect(tmp,Qt::white);
painter2D.setPen(penBlack);
painter2D.drawLine(0,0,m_w,0);
}
QPoint LineBuf[MAX_SCREENSIZE];
if(m_binsPerPixel==0) m_binsPerPixel=1;
j=0;
for(i=0; i<4096/m_binsPerPixel; i++) {
blue[i]=0.0;
red[i]=0.0;
for(int k=0; k<m_binsPerPixel; k++) {
blue[i]+=echocom_.blue[j];
red[i]+=echocom_.red[j];
j++;
}
}
if(m_smooth>0) {
for(i=0; i<m_smooth; i++) {
int n4096=4096;
smo121_(blue,&n4096);
smo121_(red,&n4096);
}
}
// check i0 value! ...
int i0=2048/m_binsPerPixel + int(m_StartFreq/(m_fftBinWidth*m_binsPerPixel));
if(m_blue) {
painter2D.setPen(penBlue);
j=0;
for(i=0; i<m_w; i++) {
y = 0.9*m_h2 - gain*(m_h/10.0)*(blue[i0+i]-1.0) - 0.01*m_h2*m_plotZero;
LineBuf[j].setX(i);
LineBuf[j].setY(y);
j++;
}
painter2D.drawPolyline(LineBuf,j);
}
switch (m_nColor) {
case 0: painter2D.setPen(penRed); break;
case 1: painter2D.setPen(penRed2); break;
case 2: painter2D.setPen(penRed); break;
case 3: painter2D.setPen(penRed2); break;
case 4: painter2D.setPen(penBlack); break;
case 5: painter2D.setPen(penBlack2); break;
}
j=0;
for(int i=0; i<m_w; i++) {
y = 0.9*m_h2 - gain*(m_h/10.0)*(red[i0+i]-1.0) - 0.01*m_h2*m_plotZero;
LineBuf[j].setX(i);
LineBuf[j].setY(y);
j++;
}
painter2D.drawPolyline(LineBuf,j);
update(); //trigger a new paintEvent
}
void EPlotter::DrawOverlay() //DrawOverlay()
{
if(m_OverlayPixmap.isNull() or m_2DPixmap.isNull()) return;
// int w = m_WaterfallPixmap.width();
int x,y;
QRect rect;
QPainter painter(&m_OverlayPixmap);
painter.initFrom(this);
QLinearGradient gradient(0, 0, 0 ,m_h2); //fill background with gradient
gradient.setColorAt(1, Qt::black);
gradient.setColorAt(0, Qt::darkBlue);
painter.setBrush(gradient);
painter.drawRect(0, 0, m_w, m_h2);
painter.setBrush(Qt::SolidPattern);
m_fSpan = m_w*m_fftBinWidth*m_binsPerPixel;
m_freqPerDiv=20;
if(m_fSpan>250) m_freqPerDiv=50;
if(m_fSpan>500) m_freqPerDiv=100;
if(m_fSpan>1000) m_freqPerDiv=200;
if(m_fSpan>2000) m_freqPerDiv=500;
// m_StartFreq=50 * int((-0.5*m_fSpan)/50.0 - 0.5);
m_StartFreq=m_freqPerDiv * int((-0.5*m_fSpan)/m_freqPerDiv - 0.5);
float pixPerHdiv = m_freqPerDiv/(m_fftBinWidth*m_binsPerPixel);
float pixPerVdiv = float(m_h2)/float(VERT_DIVS);
m_hdivs = m_w*m_fftBinWidth*m_binsPerPixel/m_freqPerDiv + 0.9999;
painter.setPen(QPen(Qt::white, 1,Qt::DotLine));
for( int i=1; i<m_hdivs; i++) //draw vertical grids
{
x=int(i*pixPerHdiv);
painter.drawLine(x,0,x,m_h2);
}
for( int i=1; i<VERT_DIVS; i++) //draw horizontal grids
{
y = (int)( (float)i*pixPerVdiv );
painter.drawLine(0,y,m_w,y);
}
QRect rect0;
QPainter painter0(&m_ScalePixmap);
painter0.initFrom(this);
//create Font to use for scales
QFont Font("Arial");
Font.setPointSize(12);
QFontMetrics metrics(Font);
Font.setWeight(QFont::Normal);
painter0.setFont(Font);
painter0.setPen(Qt::black);
m_ScalePixmap.fill(Qt::white);
painter0.drawRect(0, 0, m_w, 30);
//draw tick marks on upper scale
for( int i=1; i<m_hdivs; i++) { //major ticks
x = (int)( (float)i*pixPerHdiv );
painter0.drawLine(x,18,x,30);
}
int minor=5;
if(m_freqPerDiv==200) minor=4;
for( int i=1; i<minor*m_hdivs; i++) { //minor ticks
x = i*pixPerHdiv/minor;
painter0.drawLine(x,24,x,30);
}
//draw frequency values
MakeFrequencyStrs();
for( int i=0; i<=m_hdivs; i++) {
if(0==i) {
//left justify the leftmost text
x = (int)( (float)i*pixPerHdiv);
rect0.setRect(x,0, (int)pixPerHdiv, 20);
painter0.drawText(rect0, Qt::AlignLeft|Qt::AlignVCenter,
m_HDivText[i]);
}
else if(m_hdivs == i) {
//right justify the rightmost text
x = (int)( (float)i*pixPerHdiv - pixPerHdiv);
rect0.setRect(x,0, (int)pixPerHdiv, 20);
painter0.drawText(rect0, Qt::AlignRight|Qt::AlignVCenter,
m_HDivText[i]);
} else {
//center justify the rest of the text
x = (int)( (float)i*pixPerHdiv - pixPerHdiv/2);
rect0.setRect(x,0, (int)pixPerHdiv, 20);
painter0.drawText(rect0, Qt::AlignHCenter|Qt::AlignVCenter,
m_HDivText[i]);
}
}
/*
QPen pen1(Qt::red, 3); //Mark Tx Freq with red tick
painter0.setPen(pen1);
x = XfromFreq(m_TxFreq);
painter0.drawLine(x,17,x,30);
*/
}
void EPlotter::MakeFrequencyStrs() //MakeFrequencyStrs
{
float freq;
for(int i=0; i<=m_hdivs; i++) {
freq=m_StartFreq + i*m_freqPerDiv;
m_HDivText[i].setNum((int)freq);
}
}
int EPlotter::XfromFreq(float f) //XfromFreq()
{
int x = (int) m_w * (f - m_StartFreq)/m_fSpan;
if(x<0 ) return 0;
if(x>m_w) return m_w;
return x;
}
float EPlotter::FreqfromX(int x) //FreqfromX()
{
return float(m_StartFreq + x*m_fftBinWidth*m_binsPerPixel);
}
void EPlotter::SetRunningState(bool running) //SetRunningState()
{
m_Running = running;
}
void EPlotter::setPlotZero(int plotZero) //setPlotZero()
{
m_plotZero=plotZero;
}
int EPlotter::getPlotZero() //getPlotZero()
{
return m_plotZero;
}
void EPlotter::setPlotGain(int plotGain) //setPlotGain()
{
m_plotGain=plotGain;
}
int EPlotter::getPlotGain() //getPlotGain()
{
return m_plotGain;
}
void EPlotter::setSmooth(int n) //setSmooth()
{
m_smooth=n;
}
int EPlotter::getSmooth() //getSmooth()
{
return m_smooth;
}
void EPlotter::setColors(qint32 n) //setSmooth()
{
m_nColor=n;
draw();
}
int EPlotter::plotWidth(){return m_2DPixmap.width();}
void EPlotter::UpdateOverlay() {DrawOverlay();}

View File

@ -63,7 +63,7 @@ SOURCES += \
getfile.cpp soundout.cpp soundin.cpp meterwidget.cpp signalmeter.cpp \
WFPalette.cpp plotter.cpp widegraph.cpp about.cpp WsprTxScheduler.cpp mainwindow.cpp \
main.cpp decodedtext.cpp wsprnet.cpp messageaveraging.cpp \
echoplot.cpp echograph.cpp fastgraph.cpp fastplot.cpp Modes.cpp \
fastgraph.cpp fastplot.cpp Modes.cpp \
WSPRBandHopping.cpp MessageAggregator.cpp qt_helpers.cpp\
MultiSettings.cpp PhaseEqualizationDialog.cpp IARURegions.cpp MessageBox.cpp \
EqualizationToolsDialog.cpp \
@ -103,7 +103,7 @@ HEADERS += qt_helpers.hpp \
EmulateSplitTransceiver.hpp DXLabSuiteCommanderTransceiver.hpp HamlibTransceiver.hpp \
Configuration.hpp wsprnet.h signalmeter.h meterwidget.h \
logbook/logbook.h logbook/countrydat.h logbook/countriesworked.h logbook/adif.h \
messageaveraging.h echoplot.h echograph.h fastgraph.h fastplot.h Modes.hpp WSPRBandHopping.hpp \
messageaveraging.h fastgraph.h fastplot.h Modes.hpp WSPRBandHopping.hpp \
WsprTxScheduler.h MultiSettings.hpp PhaseEqualizationDialog.hpp \
IARURegions.hpp MessageBox.hpp EqualizationToolsDialog.hpp \
qorderedmap.h \
@ -140,7 +140,7 @@ HEADERS += OmniRigTransceiver.hpp
}
FORMS += mainwindow.ui about.ui Configuration.ui widegraph.ui astro.ui \
logqso.ui wf_palette_design_dialog.ui messageaveraging.ui echograph.ui \
logqso.ui wf_palette_design_dialog.ui messageaveraging.ui \
fastgraph.ui \
messagereplydialog.ui \
messagewindow.ui

View File

@ -1,116 +0,0 @@
subroutine avecho(id2,ndop,nfrit,nqual,f1,xlevel,sigdb,snr,dfreq,width)
integer TXLENGTH
parameter (TXLENGTH=27648) !27*1024
parameter (NFFT=32768,NH=NFFT/2)
parameter (NZ=4096)
integer*2 id2(34560) !Buffer for Rx data
real sa(NZ) !Avg spectrum relative to initial Doppler echo freq
real sb(NZ) !Avg spectrum with Dither and changing Doppler removed
integer nsum !Number of integrations
real dop0 !Doppler shift for initial integration (Hz)
real dop !Doppler shift for current integration (Hz)
real s(8192)
real x(NFFT)
integer ipkv(1)
complex c(0:NH)
equivalence (x,c),(ipk,ipkv)
common/echocom/nclearave,nsum,blue(NZ),red(NZ)
save dop0,sa,sb
dop=ndop
sq=0.
do i=1,TXLENGTH
x(i)=id2(i)
sq=sq + x(i)*x(i)
enddo
xlevel=10.0*log10(sq/TXLENGTH)
if(nclearave.ne.0) nsum=0
if(nsum.eq.0) then
dop0=dop !Remember the initial Doppler
sa=0. !Clear the average arrays
sb=0.
endif
x(TXLENGTH+1:)=0.
x=x/TXLENGTH
call four2a(x,NFFT,1,-1,0)
df=12000.0/NFFT
do i=1,8192 !Get spectrum 0 - 3 kHz
s(i)=real(c(i))**2 + aimag(c(i))**2
enddo
fnominal=1500.0 !Nominal audio frequency w/o doppler or dither
ia=nint((fnominal+dop0-nfrit)/df)
ib=nint((f1+dop-nfrit)/df)
if(ia.lt.600 .or. ib.lt.600) go to 900
if(ia.gt.7590 .or. ib.gt.7590) go to 900
nsum=nsum+1
do i=1,NZ
sa(i)=sa(i) + s(ia+i-2048) !Center at initial doppler freq
sb(i)=sb(i) + s(ib+i-2048) !Center at expected echo freq
enddo
call pctile(sb,200,50,r0)
call pctile(sb(1800),200,50,r1)
sum=0.
sq=0.
do i=1,NZ
y=r0 + (r1-r0)*(i-100.0)/1800.0
blue(i)=sa(i)/y
red(i)=sb(i)/y
if(i.le.500 .or. i.ge.3597) then
sum=sum+red(i)
sq=sq + (red(i)-1.0)**2
endif
enddo
ave=sum/1000.0
rms=sqrt(sq/1000.0)
redmax=maxval(red)
ipkv=maxloc(red)
fac=10.0/max(redmax,10.0)
dfreq=(ipk-2048)*df
snr=(redmax-ave)/rms
sigdb=-99.0
if(ave.gt.0.0) sigdb=10.0*log10(redmax/ave - 1.0) - 35.7
nqual=0
if(nsum.ge.2 .and. nsum.lt.4) nqual=(snr-4)/5
if(nsum.ge.4 .and. nsum.lt.8) nqual=(snr-3)/4
if(nsum.ge.8 .and. nsum.lt.12) nqual=(snr-3)/3
if(nsum.ge.12) nqual=(snr-2.5)/2.5
if(nqual.lt.0) nqual=0
if(nqual.gt.10) nqual=10
! Scale for plotting
blue=fac*blue
red=fac*red
sum=0.
do i=ipk,ipk+300
if(i.gt.NZ) exit
if(red(i).lt.1.0) exit
sum=sum+(red(i)-1.0)
enddo
do i=ipk-1,ipk-300,-1
if(i.lt.1) exit
if(red(i).lt.1.0) exit
sum=sum+(red(i)-1.0)
enddo
bins=sum/(red(ipk)-1.0)
width=df*bins
nsmo=max(0.0,0.25*bins)
do i=1,nsmo
call smo121(red,NZ)
call smo121(blue,NZ)
enddo
900 return
end subroutine avecho

View File

@ -41,8 +41,6 @@
#include "Modulator.hpp"
#include "Detector.hpp"
#include "plotter.h"
#include "echoplot.h"
#include "echograph.h"
#include "fastplot.h"
#include "fastgraph.h"
#include "about.h"
@ -107,10 +105,6 @@ extern "C" {
int savec2_(char* fname, int* TR_seconds, double* dial_freq, fortran_charlen_t);
void avecho_( short id2[], int* dop, int* nfrit, int* nqual, float* f1,
float* level, float* sigdb, float* snr, float* dfreq,
float* width);
void degrade_snr_(short d2[], int* n, float* db, float* bandwidth);
void wav12_(short d2[], short d1[], int* nbytes, short* nbitsam2);
@ -288,7 +282,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_rigErrorMessageBox {MessageBox::Critical, tr ("Rig Control Error")
, MessageBox::Cancel | MessageBox::Ok | MessageBox::Retry},
m_wideGraph (new WideGraph(m_settings)),
m_echoGraph (new EchoGraph(m_settings)),
m_fastGraph (new FastGraph(m_settings)),
// no parent so that it has a taskbar icon
m_logDlg (new LogQSO (program_title (), m_settings, &m_config, nullptr)),
@ -355,9 +348,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_bTxTime {false},
m_rxDone {false},
m_bSimplex {false},
m_bEchoTxOK {false},
m_bTransmittedEcho {false},
m_bEchoTxed {false},
m_bFastDecodeCalled {false},
m_bDoubleClickAfterCQnnn {false},
m_bRefSpec {false},
@ -548,7 +539,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
connect (m_fastGraph.data (), &FastGraph::fastPick, this, &MainWindow::fastPick);
connect (this, &MainWindow::finished, m_wideGraph.data (), &WideGraph::close);
connect (this, &MainWindow::finished, m_echoGraph.data (), &EchoGraph::close);
connect (this, &MainWindow::finished, m_fastGraph.data (), &FastGraph::close);
// setup the log QSO dialog
@ -578,7 +568,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->actionJT4->setActionGroup(modeGroup);
ui->actionWSPR->setActionGroup(modeGroup);
ui->actionWSPR_LF->setActionGroup(modeGroup);
ui->actionEcho->setActionGroup(modeGroup);
ui->actionISCAT->setActionGroup(modeGroup);
ui->actionMSK144->setActionGroup(modeGroup);
ui->actionQRA64->setActionGroup(modeGroup);
@ -3171,11 +3160,6 @@ void MainWindow::on_autoButton_clicked (bool checked)
}
if (!checked) m_bCallingCQ = false;
statusUpdate ();
m_bEchoTxOK=false;
if(m_auto and (m_mode=="Echo")) {
m_nclearave=1;
echocom_.nsum=0;
}
if(m_mode.startsWith ("WSPR")) {
QPalette palette {ui->sbTxPercent->palette ()};
if(m_auto or m_pctx==0) {
@ -3578,11 +3562,6 @@ void MainWindow::on_actionWide_Waterfall_triggered() //Display Waterfalls
m_wideGraph->show();
}
void MainWindow::on_actionEcho_Graph_triggered()
{
m_echoGraph->show();
}
void MainWindow::on_actionFast_Graph_triggered()
{
m_fastGraph->show();
@ -6893,9 +6872,6 @@ void MainWindow::displayWidgets(qint64 n)
if(i==19) ui->actionDeepestDecode->setEnabled(b);
if(i==20) ui->actionInclude_averaging->setVisible (b);
if(i==21) ui->actionInclude_correlation->setVisible (b);
if(i==22) {
if(!b && m_echoGraph->isVisible()) m_echoGraph->hide();
}
if(i==23) ui->cbSWL->setVisible(b);
//if(i==24) ui->actionEnable_AP_FT8->setVisible (b);
//if(i==25) ui->actionEnable_AP_JT65->setVisible (b);

View File

@ -75,7 +75,6 @@ class QSettings;
class QLineEdit;
class QFont;
class QHostInfo;
class EchoGraph;
class FastGraph;
class WideGraph;
class LogQSO;
@ -421,7 +420,6 @@ private slots:
void uploadResponse(QString response);
void on_WSPRfreqSpinBox_valueChanged(int n);
void on_pbTxNext_clicked(bool b);
void on_actionEcho_Graph_triggered();
void on_actionFast_Graph_triggered();
void on_actionMeasure_reference_spectrum_triggered();
void on_actionErase_reference_spectrum_triggered();
@ -489,7 +487,6 @@ private:
QScopedPointer<EqualizationToolsDialog> m_equalizationToolsDialog;
QScopedPointer<WideGraph> m_wideGraph;
QScopedPointer<EchoGraph> m_echoGraph;
QScopedPointer<FastGraph> m_fastGraph;
QScopedPointer<LogQSO> m_logDlg;
QScopedPointer<Astro> m_astroWidget;
@ -621,9 +618,7 @@ private:
bool m_bTxTime;
bool m_rxDone;
bool m_bSimplex; // not using split even if it is available
bool m_bEchoTxOK;
bool m_bTransmittedEcho;
bool m_bEchoTxed;
bool m_bFastMode;
bool m_bFast9;
bool m_bFastDecodeCalled;

View File

@ -4653,7 +4653,6 @@ list. The list can be maintained in Settings (F2).</string>
<addaction name="actionWide_Waterfall"/>
<addaction name="actionAstronomical_data"/>
<addaction name="actionMessage_averaging"/>
<addaction name="actionEcho_Graph"/>
<addaction name="actionFast_Graph"/>
<addaction name="actionFox_Log"/>
<addaction name="separator"/>
@ -4725,7 +4724,6 @@ list. The list can be maintained in Settings (F2).</string>
<addaction name="actionWSPR"/>
<addaction name="actionWSPR_LF"/>
<addaction name="separator"/>
<addaction name="actionEcho"/>
<addaction name="separator"/>
<addaction name="actionFreqCal"/>
</widget>
@ -5266,25 +5264,6 @@ list. The list can be maintained in Settings (F2).</string>
<string>WSPR</string>
</property>
</action>
<action name="actionEcho_Graph">
<property name="text">
<string>Echo Graph</string>
</property>
<property name="shortcut">
<string>F8</string>
</property>
</action>
<action name="actionEcho">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Echo</string>
</property>
<property name="toolTip">
<string>EME Echo mode</string>
</property>
</action>
<action name="actionISCAT">
<property name="checkable">
<bool>true</bool>