| 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 | extern "C" {
|
|---|
| 11 | #include "RTCM/clock_orbit_rtcm.h"
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | class bnsRinex;
|
|---|
| 15 | class bnsSP3;
|
|---|
| 16 |
|
|---|
| 17 | class t_ephPair {
|
|---|
| 18 | public:
|
|---|
| 19 | t_ephPair() {
|
|---|
| 20 | eph = 0;
|
|---|
| 21 | oldEph = 0;
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | ~t_ephPair() {
|
|---|
| 25 | delete eph;
|
|---|
| 26 | delete oldEph;
|
|---|
| 27 | }
|
|---|
| 28 |
|
|---|
| 29 | ColumnVector xx;
|
|---|
| 30 | gpsEph* eph;
|
|---|
| 31 | gpsEph* oldEph;
|
|---|
| 32 | };
|
|---|
| 33 |
|
|---|
| 34 | class t_bns : public QThread {
|
|---|
| 35 | Q_OBJECT
|
|---|
| 36 | public:
|
|---|
| 37 | t_bns(QObject* parent = 0);
|
|---|
| 38 | virtual ~t_bns();
|
|---|
| 39 | virtual void run();
|
|---|
| 40 |
|
|---|
| 41 | signals:
|
|---|
| 42 | void newMessage(const QByteArray msg);
|
|---|
| 43 | void error(const QByteArray msg);
|
|---|
| 44 | void moveSocket(QThread* tt);
|
|---|
| 45 |
|
|---|
| 46 | private slots:
|
|---|
| 47 | void slotNewEph(gpsEph* ep);
|
|---|
| 48 | void slotNewConnection();
|
|---|
| 49 | void slotMessage(const QByteArray msg);
|
|---|
| 50 | void slotError(const QByteArray msg);
|
|---|
| 51 | void slotMoveSocket(QThread* tt);
|
|---|
| 52 |
|
|---|
| 53 | private:
|
|---|
| 54 | void deleteBnsEph();
|
|---|
| 55 | void openCaster();
|
|---|
| 56 | void readEpoch();
|
|---|
| 57 | void processSatellite(gpsEph* ep, int GPSweek, double GPSweeks,
|
|---|
| 58 | const QString& prn, const ColumnVector& xx,
|
|---|
| 59 | struct ClockOrbit::SatData* sd);
|
|---|
| 60 |
|
|---|
| 61 | QTcpServer* _clkServer;
|
|---|
| 62 | QTcpSocket* _clkSocket;
|
|---|
| 63 | QTcpSocket* _outSocket;
|
|---|
| 64 | int _outSocketOpenTrial;
|
|---|
| 65 | QDateTime _outSocketOpenTime;
|
|---|
| 66 | QFile* _outFile;
|
|---|
| 67 | QFile* _logFile;
|
|---|
| 68 | QTextStream* _outStream;
|
|---|
| 69 | QTextStream* _logStream;
|
|---|
| 70 | t_bnseph* _bnseph;
|
|---|
| 71 | QMutex _mutex;
|
|---|
| 72 | QMap<QString, t_ephPair*> _ephList;
|
|---|
| 73 | bnsRinex* _rnx;
|
|---|
| 74 | bnsSP3* _sp3;
|
|---|
| 75 | };
|
|---|
| 76 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.