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

Last change on this file since 1282 was 1258, checked in by weber, 16 years ago

* empty log message *

File size: 1.8 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 newMessage(const QByteArray msg);
48 void error(const QByteArray msg);
49 void moveSocket(QThread* tt);
50
51 private slots:
52 void slotNewEph(t_eph* ep, int nBytes);
53 void slotNewConnection();
54 void slotMessage(const QByteArray msg);
55 void slotError(const QByteArray msg);
56 void slotMoveSocket(QThread* tt);
57
58 private:
59 void deleteBnsEph();
60 void openCaster();
61 void readEpoch();
62 void processSatellite(int oldEph, int iCaster, bool trafo, t_eph* ep,
63 int GPSweek, double GPSweeks, const QString& prn,
64 const ColumnVector& xx, struct ClockOrbit::SatData* sd,
65 QString& outLine);
66 void crdTrafo(int GPSWeek, ColumnVector& xyz);
67
68 QTcpServer* _clkServer;
69 QTcpSocket* _clkSocket;
70 QList<t_bnscaster*> _caster;
71 QFile* _logFile;
72 QTextStream* _logStream;
73 QFile* _echoFile;
74 QTextStream* _echoStream;
75 t_bnseph* _bnseph;
76 QMutex _mutex;
77 QMap<QString, t_ephPair*> _ephList;
78 bnsRinex* _rnx;
79 bnsSP3* _sp3;
80 QByteArray _clkLine;
81};
82#endif
Note: See TracBrowser for help on using the repository browser.