source: ntrip/trunk/BNS/bns.h@ 4720

Last change on this file since 4720 was 3041, checked in by mervart, 14 years ago
File size: 2.6 KB
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#include "bnscaster.h"
11extern "C" {
12#include "clock_orbit_rtcm.h"
13}
14
15class bnsRinex;
16class bnsSP3;
17
18class 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
30 ColumnVector xx;
31 t_eph* eph;
32 t_eph* oldEph;
33};
34
35class t_bns : public QThread {
36 Q_OBJECT
37 public:
38 t_bns(QObject* parent = 0);
39 virtual ~t_bns();
40 virtual void run();
41
42 signals:
43 void newClkBytes(int nBytes);
44 void newEphBytes(int nBytes);
45 void newOutBytes1(int nBytes);
46 void newOutBytes2(int nBytes);
47 void newOutBytes3(int nBytes);
48 void newOutBytes4(int nBytes);
49 void newOutBytes5(int nBytes);
50 void newOutBytes6(int nBytes);
51 void newOutBytes7(int nBytes);
52 void newOutBytes8(int nBytes);
53 void newOutBytes9(int nBytes);
54 void newOutBytes10(int nBytes);
55 void newOutEphBytes(int nBytes);
56 void newMessage(const QByteArray msg);
57 void error(const QByteArray msg);
58 void moveSocket(QThread* tt);
59
60 private slots:
61 void slotNewEph(t_eph* ep, int nBytes);
62 void slotNewConnection();
63 void slotMessage(const QByteArray msg);
64 void slotError(const QByteArray msg);
65 void slotMoveSocket(QThread* tt);
66
67 private:
68 void deleteBnsEph();
69 void openCaster();
70 void readEpoch();
71 void readRecords();
72 void processSatellite(int iCaster, const QString trafo, bool CoM,
73 t_eph* ep, int GPSweek, double GPSweeks,
74 const QString& prn, const ColumnVector& xx,
75 struct ClockOrbit::SatData* sd, QString& outLine);
76 void crdTrafo(int GPSWeek, ColumnVector& xyz, const QString trafo);
77
78 QTcpServer* _clkServer;
79 QTcpSocket* _clkSocket;
80 QList<t_bnscaster*> _caster;
81 t_bnscaster* _casterEph;
82 QFile* _logFile;
83 QTextStream* _logStream;
84 QFile* _echoFile;
85 QTextStream* _echoStream;
86 t_bnseph* _bnseph;
87 QMutex _mutex;
88 QMutex _mutexmesg;
89 QMap<QString, t_ephPair*> _ephList;
90 bnsRinex* _rnx;
91 bnsSP3* _sp3;
92 QByteArray _clkLine;
93 bool _append;
94
95 int _GPSweek;
96 double _GPSweeks;
97 int _year;
98 int _month;
99 int _day;
100 int _hour;
101 int _min;
102 double _sec;
103
104 double _dx;
105 double _dy;
106 double _dz;
107 double _dxr;
108 double _dyr;
109 double _dzr;
110 double _ox;
111 double _oy;
112 double _oz;
113 double _oxr;
114 double _oyr;
115 double _ozr;
116 double _sc;
117 double _scr;
118 double _t0;
119};
120#endif
Note: See TracBrowser for help on using the repository browser.