[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);
|
---|
[1803] | 48 | void newOutEphBytes(int nBytes);
|
---|
[757] | 49 | void newMessage(const QByteArray msg);
|
---|
[760] | 50 | void error(const QByteArray msg);
|
---|
[836] | 51 | void moveSocket(QThread* tt);
|
---|
[756] | 52 |
|
---|
[758] | 53 | private slots:
|
---|
[1058] | 54 | void slotNewEph(t_eph* ep, int nBytes);
|
---|
[769] | 55 | void slotNewConnection();
|
---|
[758] | 56 | void slotMessage(const QByteArray msg);
|
---|
[760] | 57 | void slotError(const QByteArray msg);
|
---|
[836] | 58 | void slotMoveSocket(QThread* tt);
|
---|
[758] | 59 |
|
---|
[756] | 60 | private:
|
---|
[763] | 61 | void deleteBnsEph();
|
---|
[770] | 62 | void openCaster();
|
---|
[784] | 63 | void readEpoch();
|
---|
[2046] | 64 | void processSatellite(int oldEph, int iCaster, const QString trafo, bool CoM,
|
---|
[1733] | 65 | t_eph* ep, int GPSweek, double GPSweeks,
|
---|
| 66 | const QString& prn, const ColumnVector& xx,
|
---|
| 67 | struct ClockOrbit::SatData* sd, QString& outLine);
|
---|
[1772] | 68 | void crdTrafo(int GPSWeek, ColumnVector& xyz, const QString trafo);
|
---|
[784] | 69 |
|
---|
[778] | 70 | QTcpServer* _clkServer;
|
---|
| 71 | QTcpSocket* _clkSocket;
|
---|
[1066] | 72 | QList<t_bnscaster*> _caster;
|
---|
[1796] | 73 | t_bnscaster* _casterEph;
|
---|
[816] | 74 | QFile* _logFile;
|
---|
| 75 | QTextStream* _logStream;
|
---|
[1072] | 76 | QFile* _echoFile;
|
---|
| 77 | QTextStream* _echoStream;
|
---|
[778] | 78 | t_bnseph* _bnseph;
|
---|
| 79 | QMutex _mutex;
|
---|
| 80 | QMap<QString, t_ephPair*> _ephList;
|
---|
[847] | 81 | bnsRinex* _rnx;
|
---|
[848] | 82 | bnsSP3* _sp3;
|
---|
[1197] | 83 | QByteArray _clkLine;
|
---|
[1772] | 84 | double _dx;
|
---|
| 85 | double _dy;
|
---|
| 86 | double _dz;
|
---|
| 87 | double _dxr;
|
---|
| 88 | double _dyr;
|
---|
| 89 | double _dzr;
|
---|
| 90 | double _ox;
|
---|
| 91 | double _oy;
|
---|
| 92 | double _oz;
|
---|
| 93 | double _oxr;
|
---|
| 94 | double _oyr;
|
---|
| 95 | double _ozr;
|
---|
| 96 | double _sc;
|
---|
| 97 | double _scr;
|
---|
| 98 | double _t0;
|
---|
[756] | 99 | };
|
---|
| 100 | #endif
|
---|