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

Last change on this file since 1017 was 986, 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"
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 newMessage(const QByteArray msg);
43 void error(const QByteArray msg);
44 void moveSocket(QThread* tt);
45
46 private slots:
47 void slotNewEph(t_eph* ep);
48 void slotNewConnection();
49 void slotMessage(const QByteArray msg);
50 void slotError(const QByteArray msg);
51 void slotMoveSocket(QThread* tt);
52
53 private:
54 void deleteBnsEph();
55 void openCaster();
56 void readEpoch();
57 void processSatellite(int oldEph, t_eph* ep, int GPSweek, double GPSweeks,
58 const QString& prn, const ColumnVector& xx,
59 struct ClockOrbit::SatData* sd);
60 void crdTrafo(int GPSWeek, ColumnVector& xyz);
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 bool _crdTrafo;
77};
78#endif
Note: See TracBrowser for help on using the repository browser.