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

Last change on this file since 863 was 863, 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 }
23
24 ~t_ephPair() {
25 delete eph;
26 delete oldEph;
27 }
28
29 gpsEph* eph;
30 gpsEph* oldEph;
31};
32
33class t_bns : public QThread {
34 Q_OBJECT
35 public:
36 t_bns(QObject* parent = 0);
37 virtual ~t_bns();
38 virtual void run();
39
40 signals:
41 void newMessage(const QByteArray msg);
42 void error(const QByteArray msg);
43 void moveSocket(QThread* tt);
44
45 private slots:
46 void slotNewEph(gpsEph* ep);
47 void slotNewConnection();
48 void slotMessage(const QByteArray msg);
49 void slotError(const QByteArray msg);
50 void slotMoveSocket(QThread* tt);
51
52 private:
53 void deleteBnsEph();
54 void openCaster();
55 void readEpoch();
56 void processSatellite(int GPSweek, double GPSweeks, const QString& prn,
57 const ColumnVector& xx, struct ClockOrbit::SatData* sd);
58
59 QTcpServer* _clkServer;
60 QTcpSocket* _clkSocket;
61 QTcpSocket* _outSocket;
62 int _outSocketOpenTrial;
63 QDateTime _outSocketOpenTime;
64 QFile* _outFile;
65 QFile* _logFile;
66 QTextStream* _outStream;
67 QTextStream* _logStream;
68 t_bnseph* _bnseph;
69 QMutex _mutex;
70 QMap<QString, t_ephPair*> _ephList;
71 bnsRinex* _rnx;
72 bnsSP3* _sp3;
73};
74#endif
Note: See TracBrowser for help on using the repository browser.