| Line | |
|---|
| 1 | #ifndef BNS_H
|
|---|
| 2 | #define BNS_H
|
|---|
| 3 |
|
|---|
| 4 | #include <newmat.h>
|
|---|
| 5 |
|
|---|
| 6 | #include <QtNetwork>
|
|---|
| 7 | #include <QThread>
|
|---|
| 8 |
|
|---|
| 9 | #include "bnseph.h"
|
|---|
| 10 |
|
|---|
| 11 | class t_ephPair {
|
|---|
| 12 | public:
|
|---|
| 13 | t_ephPair() {
|
|---|
| 14 | eph = 0;
|
|---|
| 15 | oldEph = 0;
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 | ~t_ephPair() {
|
|---|
| 19 | delete eph;
|
|---|
| 20 | delete oldEph;
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | gpsEph* eph;
|
|---|
| 24 | gpsEph* oldEph;
|
|---|
| 25 | };
|
|---|
| 26 |
|
|---|
| 27 | class t_bns : public QThread {
|
|---|
| 28 | Q_OBJECT
|
|---|
| 29 | public:
|
|---|
| 30 | t_bns(QObject* parent = 0);
|
|---|
| 31 | virtual ~t_bns();
|
|---|
| 32 | virtual void run();
|
|---|
| 33 |
|
|---|
| 34 | signals:
|
|---|
| 35 | void newMessage(const QByteArray msg);
|
|---|
| 36 | void error(const QByteArray msg);
|
|---|
| 37 |
|
|---|
| 38 | private slots:
|
|---|
| 39 | void slotNewEph(gpsEph* ep);
|
|---|
| 40 | void slotNewConnection();
|
|---|
| 41 | void slotMessage(const QByteArray msg);
|
|---|
| 42 | void slotError(const QByteArray msg);
|
|---|
| 43 |
|
|---|
| 44 | private:
|
|---|
| 45 | void deleteBnsEph();
|
|---|
| 46 | void openCaster();
|
|---|
| 47 | void readEpoch();
|
|---|
| 48 | void processSatellite(int GPSweek, double GPSweeks, const QString& prn,
|
|---|
| 49 | const ColumnVector& xx);
|
|---|
| 50 |
|
|---|
| 51 | QTcpServer* _clkServer;
|
|---|
| 52 | QTcpSocket* _clkSocket;
|
|---|
| 53 | QTcpSocket* _outSocket;
|
|---|
| 54 | QFile* _outFile;
|
|---|
| 55 | QFile* _logFile;
|
|---|
| 56 | QTextStream* _outStream;
|
|---|
| 57 | QTextStream* _logStream;
|
|---|
| 58 | t_bnseph* _bnseph;
|
|---|
| 59 | QMutex _mutex;
|
|---|
| 60 | QMap<QString, t_ephPair*> _ephList;
|
|---|
| 61 | };
|
|---|
| 62 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.