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

Last change on this file since 872 was 872, 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(gpsEph* ep, int GPSweek, double GPSweeks,
57 const QString& prn, const ColumnVector& xx,
58 struct ClockOrbit::SatData* sd);
59
60 QTcpServer* _clkServer;
61 QTcpSocket* _clkSocket;
62 QTcpSocket* _outSocket;
63 int _outSocketOpenTrial;
64 QDateTime _outSocketOpenTime;
65 QFile* _outFile;
66 QFile* _logFile;
67 QTextStream* _outStream;
68 QTextStream* _logStream;
69 t_bnseph* _bnseph;
70 QMutex _mutex;
71 QMap<QString, t_ephPair*> _ephList;
72 bnsRinex* _rnx;
73 bnsSP3* _sp3;
74};
75#endif
Note: See TracBrowser for help on using the repository browser.