[756] | 1 | #ifndef BNS_H
|
---|
| 2 | #define BNS_H
|
---|
| 3 |
|
---|
[784] | 4 | #include <newmat.h>
|
---|
| 5 |
|
---|
[769] | 6 | #include <QtNetwork>
|
---|
[756] | 7 | #include <QThread>
|
---|
| 8 |
|
---|
[758] | 9 | #include "bnseph.h"
|
---|
[1062] | 10 | #include "bnscaster.h"
|
---|
[863] | 11 | extern "C" {
|
---|
| 12 | #include "RTCM/clock_orbit_rtcm.h"
|
---|
| 13 | }
|
---|
[758] | 14 |
|
---|
[847] | 15 | class bnsRinex;
|
---|
[848] | 16 | class bnsSP3;
|
---|
[847] | 17 |
|
---|
[778] | 18 | class t_ephPair {
|
---|
| 19 | public:
|
---|
| 20 | t_ephPair() {
|
---|
| 21 | eph = 0;
|
---|
| 22 | oldEph = 0;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | ~t_ephPair() {
|
---|
| 26 | delete eph;
|
---|
| 27 | delete oldEph;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
[873] | 30 | ColumnVector xx;
|
---|
[884] | 31 | t_eph* eph;
|
---|
| 32 | t_eph* oldEph;
|
---|
[778] | 33 | };
|
---|
| 34 |
|
---|
[757] | 35 | class t_bns : public QThread {
|
---|
| 36 | Q_OBJECT
|
---|
[756] | 37 | public:
|
---|
[757] | 38 | t_bns(QObject* parent = 0);
|
---|
| 39 | virtual ~t_bns();
|
---|
[756] | 40 | virtual void run();
|
---|
| 41 |
|
---|
[757] | 42 | signals:
|
---|
[1058] | 43 | void newClkBytes(int nBytes);
|
---|
| 44 | void newEphBytes(int nBytes);
|
---|
[1258] | 45 | void newOutBytes1(int nBytes);
|
---|
| 46 | void newOutBytes2(int nBytes);
|
---|
[1740] | 47 | void newOutBytes3(int nBytes);
|
---|
[2332] | 48 | void newOutBytes4(int nBytes);
|
---|
| 49 | void newOutBytes5(int nBytes);
|
---|
| 50 | void newOutBytes6(int nBytes);
|
---|
[2349] | 51 | void newOutBytes7(int nBytes);
|
---|
| 52 | void newOutBytes8(int nBytes);
|
---|
| 53 | void newOutBytes9(int nBytes);
|
---|
| 54 | void newOutBytes10(int nBytes);
|
---|
[1803] | 55 | void newOutEphBytes(int nBytes);
|
---|
[757] | 56 | void newMessage(const QByteArray msg);
|
---|
[760] | 57 | void error(const QByteArray msg);
|
---|
[836] | 58 | void moveSocket(QThread* tt);
|
---|
[756] | 59 |
|
---|
[758] | 60 | private slots:
|
---|
[1058] | 61 | void slotNewEph(t_eph* ep, int nBytes);
|
---|
[769] | 62 | void slotNewConnection();
|
---|
[758] | 63 | void slotMessage(const QByteArray msg);
|
---|
[760] | 64 | void slotError(const QByteArray msg);
|
---|
[836] | 65 | void slotMoveSocket(QThread* tt);
|
---|
[758] | 66 |
|
---|
[756] | 67 | private:
|
---|
[763] | 68 | void deleteBnsEph();
|
---|
[770] | 69 | void openCaster();
|
---|
[784] | 70 | void readEpoch();
|
---|
[2046] | 71 | void processSatellite(int oldEph, int iCaster, const QString trafo, bool CoM,
|
---|
[1733] | 72 | t_eph* ep, int GPSweek, double GPSweeks,
|
---|
| 73 | const QString& prn, const ColumnVector& xx,
|
---|
| 74 | struct ClockOrbit::SatData* sd, QString& outLine);
|
---|
[1772] | 75 | void crdTrafo(int GPSWeek, ColumnVector& xyz, const QString trafo);
|
---|
[784] | 76 |
|
---|
[778] | 77 | QTcpServer* _clkServer;
|
---|
| 78 | QTcpSocket* _clkSocket;
|
---|
[1066] | 79 | QList<t_bnscaster*> _caster;
|
---|
[1796] | 80 | t_bnscaster* _casterEph;
|
---|
[816] | 81 | QFile* _logFile;
|
---|
| 82 | QTextStream* _logStream;
|
---|
[1072] | 83 | QFile* _echoFile;
|
---|
| 84 | QTextStream* _echoStream;
|
---|
[778] | 85 | t_bnseph* _bnseph;
|
---|
| 86 | QMutex _mutex;
|
---|
| 87 | QMap<QString, t_ephPair*> _ephList;
|
---|
[847] | 88 | bnsRinex* _rnx;
|
---|
[848] | 89 | bnsSP3* _sp3;
|
---|
[1197] | 90 | QByteArray _clkLine;
|
---|
[1772] | 91 | double _dx;
|
---|
| 92 | double _dy;
|
---|
| 93 | double _dz;
|
---|
| 94 | double _dxr;
|
---|
| 95 | double _dyr;
|
---|
| 96 | double _dzr;
|
---|
| 97 | double _ox;
|
---|
| 98 | double _oy;
|
---|
| 99 | double _oz;
|
---|
| 100 | double _oxr;
|
---|
| 101 | double _oyr;
|
---|
| 102 | double _ozr;
|
---|
| 103 | double _sc;
|
---|
| 104 | double _scr;
|
---|
| 105 | double _t0;
|
---|
[756] | 106 | };
|
---|
| 107 | #endif
|
---|