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

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

* empty log message *

File size: 1.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"
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 xx.ReSize(4);
23 }
24
25 ~t_ephPair() {
26 delete eph;
27 delete oldEph;
28 }
29
30 ColumnVector xx;
31 gpsEph* eph;
32 gpsEph* 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 newMessage(const QByteArray msg);
44 void error(const QByteArray msg);
45 void moveSocket(QThread* tt);
46
47 private slots:
48 void slotNewEph(gpsEph* ep);
49 void slotNewConnection();
50 void slotMessage(const QByteArray msg);
51 void slotError(const QByteArray msg);
52 void slotMoveSocket(QThread* tt);
53
54 private:
55 void deleteBnsEph();
56 void openCaster();
57 void readEpoch();
58 void processSatellite(gpsEph* ep, int GPSweek, double GPSweeks,
59 const QString& prn, const ColumnVector& xx,
60 struct ClockOrbit::SatData* sd);
61
62 QTcpServer* _clkServer;
63 QTcpSocket* _clkSocket;
64 QTcpSocket* _outSocket;
65 int _outSocketOpenTrial;
66 QDateTime _outSocketOpenTime;
67 QFile* _outFile;
68 QFile* _logFile;
69 QTextStream* _outStream;
70 QTextStream* _logStream;
71 t_bnseph* _bnseph;
72 QMutex _mutex;
73 QMap<QString, t_ephPair*> _ephList;
74 bnsRinex* _rnx;
75 bnsSP3* _sp3;
76};
77#endif
Note: See TracBrowser for help on using the repository browser.