[280] | 1 | // Part of BNC, a utility for retrieving decoding and
|
---|
[464] | 2 | // converting GNSS data streams from NTRIP broadcasters.
|
---|
[280] | 3 | //
|
---|
[464] | 4 | // Copyright (C) 2007
|
---|
[280] | 5 | // German Federal Agency for Cartography and Geodesy (BKG)
|
---|
| 6 | // http://www.bkg.bund.de
|
---|
[464] | 7 | // Czech Technical University Prague, Department of Geodesy
|
---|
[280] | 8 | // http://www.fsv.cvut.cz
|
---|
| 9 | //
|
---|
| 10 | // Email: euref-ip@bkg.bund.de
|
---|
| 11 | //
|
---|
| 12 | // This program is free software; you can redistribute it and/or
|
---|
| 13 | // modify it under the terms of the GNU General Public License
|
---|
| 14 | // as published by the Free Software Foundation, version 2.
|
---|
| 15 | //
|
---|
| 16 | // This program is distributed in the hope that it will be useful,
|
---|
| 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 19 | // GNU General Public License for more details.
|
---|
| 20 | //
|
---|
| 21 | // You should have received a copy of the GNU General Public License
|
---|
| 22 | // along with this program; if not, write to the Free Software
|
---|
| 23 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
---|
[82] | 24 |
|
---|
| 25 | #ifndef BNCAPP_H
|
---|
| 26 | #define BNCAPP_H
|
---|
| 27 |
|
---|
[5884] | 28 | #include "bnctime.h"
|
---|
[243] | 29 | #include "bnccaster.h"
|
---|
[2519] | 30 | #include "bncrawfile.h"
|
---|
[6432] | 31 | #include "bncephuser.h"
|
---|
[243] | 32 |
|
---|
[2865] | 33 | class bncComb;
|
---|
[3232] | 34 | class bncTableItem;
|
---|
[5899] | 35 | namespace BNC_PPP {
|
---|
| 36 | class t_pppMain;
|
---|
| 37 | }
|
---|
[2865] | 38 |
|
---|
[5072] | 39 | class t_bncCore : public QObject {
|
---|
[5861] | 40 | Q_OBJECT
|
---|
| 41 | friend class bncSettings;
|
---|
[4070] | 42 |
|
---|
[5861] | 43 | public:
|
---|
| 44 | enum e_mode {interactive, nonInteractive, batchPostProcessing};
|
---|
| 45 | t_bncCore();
|
---|
[7298] | 46 | ~t_bncCore();
|
---|
[5861] | 47 | static t_bncCore* instance();
|
---|
[6151] | 48 | e_mode mode() const {return _mode;}
|
---|
| 49 | void setGUIenabled(bool GUIenabled) {_GUIenabled = GUIenabled;}
|
---|
| 50 | void setMode(e_mode mode) {_mode = mode;}
|
---|
[6451] | 51 | void setPortEph(int port);
|
---|
[6151] | 52 | void setPortCorr(int port);
|
---|
| 53 | void setCaster(bncCaster* caster) {_caster = caster;}
|
---|
| 54 | const bncCaster* caster() const {return _caster;}
|
---|
| 55 | bool dateAndTimeGPSSet() const;
|
---|
| 56 | QDateTime dateAndTimeGPS() const;
|
---|
| 57 | void setDateAndTimeGPS(QDateTime dateTime);
|
---|
| 58 | void setConfFileName(const QString& confFileName);
|
---|
| 59 | QString confFileName() const {return _confFileName;}
|
---|
[7298] | 60 | void writeRawData(const QByteArray& data, const QByteArray& staID,
|
---|
[6151] | 61 | const QByteArray& format);
|
---|
| 62 | void initCombination();
|
---|
| 63 | void stopCombination();
|
---|
| 64 | const QString& pgmName() {return _pgmName;}
|
---|
| 65 | const QString& userName() {return _userName;}
|
---|
| 66 | QWidget* mainWindow() const {return _mainWindow;};
|
---|
| 67 | void setMainWindow(QWidget* mainWindow){_mainWindow = mainWindow;}
|
---|
| 68 | bool GUIenabled() const {return _GUIenabled;}
|
---|
| 69 | void startPPP();
|
---|
| 70 | void stopPPP();
|
---|
[7976] | 71 | int sigintReceived;
|
---|
[4070] | 72 |
|
---|
[5861] | 73 | QMap<int, bncTableItem*> _uploadTableItems;
|
---|
[1538] | 74 |
|
---|
[5861] | 75 | public slots:
|
---|
| 76 | void slotMessage(QByteArray msg, bool showOnScreen);
|
---|
[6432] | 77 | void slotNewGPSEph(t_ephGPS);
|
---|
| 78 | void slotNewGlonassEph(t_ephGlo);
|
---|
| 79 | void slotNewGalileoEph(t_ephGal);
|
---|
| 80 | void slotNewSBASEph(t_ephSBAS);
|
---|
[6598] | 81 | void slotNewBDSEph(t_ephBDS);
|
---|
[6484] | 82 | void slotNewOrbCorrections(QList<t_orbCorr>);
|
---|
| 83 | void slotNewClkCorrections(QList<t_clkCorr>);
|
---|
| 84 | void slotNewCodeBiases(QList<t_satCodeBias>);
|
---|
| 85 | void slotNewPhaseBiases(QList<t_satPhaseBias>);
|
---|
| 86 | void slotNewTec(t_vTec);
|
---|
[5861] | 87 | void slotQuit();
|
---|
[994] | 88 |
|
---|
[5861] | 89 | signals:
|
---|
| 90 | void newMessage(QByteArray msg, bool showOnScreen);
|
---|
[6432] | 91 | void newGPSEph(t_ephGPS eph);
|
---|
| 92 | void newGlonassEph(t_ephGlo eph);
|
---|
| 93 | void newSBASEph(t_ephSBAS eph);
|
---|
| 94 | void newGalileoEph(t_ephGal eph);
|
---|
[6598] | 95 | void newBDSEph(t_ephBDS eph);
|
---|
[6484] | 96 | void newOrbCorrections(QList<t_orbCorr>);
|
---|
| 97 | void newClkCorrections(QList<t_clkCorr>);
|
---|
| 98 | void newCodeBiases(QList<t_satCodeBias>);
|
---|
| 99 | void newPhaseBiases(QList<t_satPhaseBias>);
|
---|
| 100 | void newTec(t_vTec);
|
---|
[5861] | 101 | void providerIDChanged(QString);
|
---|
[5954] | 102 | void newPosition(QByteArray staID, bncTime time, QVector<double> xx);
|
---|
[5991] | 103 | void newNMEAstr(QByteArray staID, QByteArray str);
|
---|
[5941] | 104 | void progressRnxPPP(int);
|
---|
| 105 | void finishedRnxPPP();
|
---|
[5950] | 106 | void mapSpeedSliderChanged(int);
|
---|
[5972] | 107 | void stopRinexPPP();
|
---|
[7298] | 108 |
|
---|
[589] | 109 | private slots:
|
---|
[6451] | 110 | void slotNewConnectionEph();
|
---|
[5861] | 111 | void slotNewConnectionCorr();
|
---|
[516] | 112 |
|
---|
[5861] | 113 | private:
|
---|
[6520] | 114 | t_irc checkPrintEph(t_eph* eph);
|
---|
| 115 | void printEphHeader();
|
---|
| 116 | void printEph(const t_eph& eph, bool printFile);
|
---|
[7298] | 117 | void printOutputEph(bool printFile, QTextStream* stream,
|
---|
[6520] | 118 | const QString& strV2, const QString& strV3);
|
---|
| 119 | void messagePrivate(const QByteArray& msg);
|
---|
[5861] | 120 |
|
---|
[6151] | 121 | QSettings::SettingsMap _settings;
|
---|
| 122 | QFile* _logFile;
|
---|
| 123 | QTextStream* _logStream;
|
---|
| 124 | int _logFileFlag;
|
---|
| 125 | QMutex _mutex;
|
---|
| 126 | QMutex _mutexMessage;
|
---|
| 127 | QString _ephPath;
|
---|
| 128 | QString _ephFileNameGPS;
|
---|
| 129 | int _rinexVers;
|
---|
| 130 | QFile* _ephFileGPS;
|
---|
| 131 | QTextStream* _ephStreamGPS;
|
---|
| 132 | QFile* _ephFileGlonass;
|
---|
| 133 | QTextStream* _ephStreamGlonass;
|
---|
| 134 | QFile* _ephFileGalileo;
|
---|
| 135 | QTextStream* _ephStreamGalileo;
|
---|
[6384] | 136 | QFile* _ephFileSBAS;
|
---|
| 137 | QTextStream* _ephStreamSBAS;
|
---|
[6151] | 138 | QString _userName;
|
---|
| 139 | QString _pgmName;
|
---|
[6451] | 140 | int _portEph;
|
---|
| 141 | QTcpServer* _serverEph;
|
---|
| 142 | QList<QTcpSocket*>* _socketsEph;
|
---|
[6151] | 143 | int _portCorr;
|
---|
| 144 | QTcpServer* _serverCorr;
|
---|
| 145 | QList<QTcpSocket*>* _socketsCorr;
|
---|
| 146 | bncCaster* _caster;
|
---|
| 147 | QString _confFileName;
|
---|
| 148 | QDate _fileDate;
|
---|
| 149 | bncRawFile* _rawFile;
|
---|
| 150 | bncComb* _bncComb;
|
---|
| 151 | e_mode _mode;
|
---|
| 152 | QWidget* _mainWindow;
|
---|
| 153 | bool _GUIenabled;
|
---|
| 154 | QDateTime* _dateAndTimeGPS;
|
---|
| 155 | mutable QMutex _mutexDateAndTimeGPS;
|
---|
| 156 | BNC_PPP::t_pppMain* _pppMain;
|
---|
[6432] | 157 | bncEphUser _ephUser;
|
---|
[82] | 158 | };
|
---|
[5066] | 159 |
|
---|
[5861] | 160 | #define BNC_CORE (t_bncCore::instance())
|
---|
[5066] | 161 |
|
---|
[82] | 162 | #endif
|
---|