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

Last change on this file since 1066 was 1066, checked in by mervart, 16 years ago

* empty log message *

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