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

Last change on this file since 2339 was 2332, checked in by weber, 14 years ago

* empty log message *

File size: 2.3 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 "RTCM/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 newOutEphBytes(int nBytes);
52 void newMessage(const QByteArray msg);
53 void error(const QByteArray msg);
54 void moveSocket(QThread* tt);
55
56 private slots:
57 void slotNewEph(t_eph* ep, int nBytes);
58 void slotNewConnection();
59 void slotMessage(const QByteArray msg);
60 void slotError(const QByteArray msg);
61 void slotMoveSocket(QThread* tt);
62
63 private:
64 void deleteBnsEph();
65 void openCaster();
66 void readEpoch();
67 void processSatellite(int oldEph, int iCaster, const QString trafo, bool CoM,
68 t_eph* ep, int GPSweek, double GPSweeks,
69 const QString& prn, const ColumnVector& xx,
70 struct ClockOrbit::SatData* sd, QString& outLine);
71 void crdTrafo(int GPSWeek, ColumnVector& xyz, const QString trafo);
72
73 QTcpServer* _clkServer;
74 QTcpSocket* _clkSocket;
75 QList<t_bnscaster*> _caster;
76 t_bnscaster* _casterEph;
77 QFile* _logFile;
78 QTextStream* _logStream;
79 QFile* _echoFile;
80 QTextStream* _echoStream;
81 t_bnseph* _bnseph;
82 QMutex _mutex;
83 QMap<QString, t_ephPair*> _ephList;
84 bnsRinex* _rnx;
85 bnsSP3* _sp3;
86 QByteArray _clkLine;
87 double _dx;
88 double _dy;
89 double _dz;
90 double _dxr;
91 double _dyr;
92 double _dzr;
93 double _ox;
94 double _oy;
95 double _oz;
96 double _oxr;
97 double _oyr;
98 double _ozr;
99 double _sc;
100 double _scr;
101 double _t0;
102};
103#endif
Note: See TracBrowser for help on using the repository browser.