Initial commit: add Location Plotter
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
#pragma once
|
||||
|
||||
#include "TelemetryPoint.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QStringList>
|
||||
#include <QSet>
|
||||
#include <QVector>
|
||||
|
||||
#include <optional>
|
||||
|
||||
class QLabel;
|
||||
class QCheckBox;
|
||||
class QComboBox;
|
||||
class QLineEdit;
|
||||
class QPlainTextEdit;
|
||||
class QPushButton;
|
||||
class QSpinBox;
|
||||
class QTableView;
|
||||
class QTimer;
|
||||
|
||||
class MapWidget;
|
||||
class GlobeWidget;
|
||||
class RinexNavigation;
|
||||
class SerialReader;
|
||||
class TelemetryTableModel;
|
||||
|
||||
class MainWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void toggleSerial();
|
||||
void clearPoints();
|
||||
void handleSerialLine(const QString &line);
|
||||
void handleSerialStatus(const QString &status);
|
||||
void handleSerialError(const QString &message);
|
||||
void handleLocationTimeout();
|
||||
void trimToMaxPoints();
|
||||
void updateReferenceLocation();
|
||||
void flushUiUpdates();
|
||||
|
||||
private:
|
||||
void buildUi();
|
||||
void updateConnectionControls();
|
||||
void addTelemetryPoint(const ParsedTelemetry &telemetry);
|
||||
void refreshTable();
|
||||
void updateSummaryLabels();
|
||||
void updateDopLabels();
|
||||
void updateAnalysis();
|
||||
void appendLogLine(const QString &line, bool parsed);
|
||||
void mergePendingTelemetry(const ParsedTelemetry &telemetry);
|
||||
void commitPendingTelemetry();
|
||||
void resetTelemetryState();
|
||||
void scheduleTelemetryRefresh();
|
||||
void refreshTelemetryViews();
|
||||
void flushPendingLogLines();
|
||||
int selectedBaudRate() const;
|
||||
|
||||
SerialReader *m_serial = nullptr;
|
||||
MapWidget *m_map = nullptr;
|
||||
GlobeWidget *m_globe = nullptr;
|
||||
RinexNavigation *m_rinex = nullptr;
|
||||
QComboBox *m_portCombo = nullptr;
|
||||
QComboBox *m_baudCombo = nullptr;
|
||||
QSpinBox *m_maxPointsSpin = nullptr;
|
||||
QLineEdit *m_referenceLatEdit = nullptr;
|
||||
QLineEdit *m_referenceLonEdit = nullptr;
|
||||
QPushButton *m_connectButton = nullptr;
|
||||
QPushButton *m_clearButton = nullptr;
|
||||
QCheckBox *m_autoFollowCheck = nullptr;
|
||||
QCheckBox *m_showTelemetryCheck = nullptr;
|
||||
QCheckBox *m_showRecentPointsCheck = nullptr;
|
||||
QLabel *m_statusLabel = nullptr;
|
||||
QLabel *m_satelliteLabel = nullptr;
|
||||
QLabel *m_satelliteQualityLabel = nullptr;
|
||||
QLabel *m_gdopLabel = nullptr;
|
||||
QLabel *m_hdopLabel = nullptr;
|
||||
QLabel *m_vdopLabel = nullptr;
|
||||
QLabel *m_tdopLabel = nullptr;
|
||||
QLabel *m_countLabel = nullptr;
|
||||
QLabel *m_meanLocationLabel = nullptr;
|
||||
QLabel *m_lastDeviationLabel = nullptr;
|
||||
QLabel *m_meanDeviationLabel = nullptr;
|
||||
QLabel *m_rmsScatterLabel = nullptr;
|
||||
QLabel *m_maxScatterLabel = nullptr;
|
||||
QLabel *m_cepLabel = nullptr;
|
||||
QCheckBox *m_showAverageCheck = nullptr;
|
||||
QTableView *m_table = nullptr;
|
||||
TelemetryTableModel *m_tableModel = nullptr;
|
||||
QPlainTextEdit *m_log = nullptr;
|
||||
QTimer *m_locationTimeoutTimer = nullptr;
|
||||
QTimer *m_uiRefreshTimer = nullptr;
|
||||
|
||||
QVector<TelemetryPoint> m_points;
|
||||
QStringList m_pendingLogLines;
|
||||
std::optional<int> m_lastSatelliteCount;
|
||||
QSet<QString> m_observedPrns;
|
||||
std::optional<double> m_referenceLatitude;
|
||||
std::optional<double> m_referenceLongitude;
|
||||
DopValues m_lastDop;
|
||||
ParsedTelemetry m_pendingTelemetry;
|
||||
bool m_telemetryRefreshPending = false;
|
||||
};
|
||||
Reference in New Issue
Block a user