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

Last change on this file since 1058 was 1058, checked in by mervart, 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"
10extern "C" {
11#include "RTCM/clock_orbit_rtcm.h"
12}
13
14class bnsRinex;
15class bnsSP3;
16
17class t_ephPair {
18 public:
19 t_ephPair() {
20 eph = 0;
21 oldEph = 0;
22 }
23
24 ~t_ephPair() {
25 delete eph;
26 delete oldEph;
27 }
28
29 ColumnVector xx;
30 t_eph* eph;
31 t_eph* oldEph;
32};
33
34class t_bns : public QThread {
35 Q_OBJECT
36 public:
37 t_bns(QObject* parent = 0);
38 virtual ~t_bns();
39 virtual void run();
40
41 signals:
42 void newClkBytes(int nBytes);
43 void newEphBytes(int nBytes);
44 void newOutBytes(int nBytes);
45 void newMessage(const QByteArray msg);
46 void error(const QByteArray msg);
47 void moveSocket(QThread* tt);
48
49 private slots:
50 void slotNewEph(t_eph* ep, int nBytes);
51 void slotNewConnection();
52 void slotMessage(const QByteArray msg);
53 void slotError(const QByteArray msg);
54 void slotMoveSocket(QThread* tt);
55
56 private:
57 void deleteBnsEph();
58 void openCaster();
59 void readEpoch();
60 void processSatellite(int oldEph, t_eph* ep, int GPSweek, double GPSweeks,
61 const QString& prn, const ColumnVector& xx,
62 struct ClockOrbit::SatData* sd);
63 void crdTrafo(int GPSWeek, ColumnVector& xyz);
64
65 QTcpServer* _clkServer;
66 QTcpSocket* _clkSocket;
67 QTcpSocket* _outSocket;
68 int _outSocketOpenTrial;
69 QDateTime _outSocketOpenTime;
70 QFile* _outFile;
71 QFile* _logFile;
72 QTextStream* _outStream;
73 QTextStream* _logStream;
74 t_bnseph* _bnseph;
75 QMutex _mutex;
76 QMap<QString, t_ephPair*> _ephList;
77 bnsRinex* _rnx;
78 bnsSP3* _sp3;
79 bool _crdTrafo;
80};
81#endif
Note: See TracBrowser for help on using the repository browser.