source: ntrip/branches/BNC_2.13.beta/src/latencychecker.h@ 10132

Last change on this file since 10132 was 9126, checked in by stuerze, 4 years ago

minor changes

File size: 4.2 KB
Line 
1// Part of BNC, a utility for retrieving decoding and
2// converting GNSS data streams from NTRIP broadcasters.
3//
4// Copyright (C) 2007
5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
7// Czech Technical University Prague, Department of Geodesy
8// http://www.fsv.cvut.cz
9//
10// Email: euref-ip@bkg.bund.de
11//
12// This program is free software; you can redistribute it and/or
13// modify it under the terms of the GNU General Public License
14// as published by the Free Software Foundation, version 2.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
25#ifndef LATENCYCHECKER_H
26#define LATENCYCHECKER_H
27
28#include <QDateTime>
29#include "satObs.h"
30
31class latencyChecker : public QObject {
32Q_OBJECT
33
34 public:
35 latencyChecker(QByteArray staID);
36 ~latencyChecker();
37 void checkReconnect();
38 void checkOutage(bool decoded);
39 void checkObsLatency(const QList<t_satObs>& obsList);
40 void checkCorrLatency(int corrGPSEpochTime, int type);
41 double currentLatency() { return _curLat;}
42
43 class t_latency {
44 public:
45 t_latency() {
46 _oldSec = 0;
47 _newSec = 0;
48 _numGaps = 0;
49 _diffSec = 0;
50 _numLat = 0;
51 _sumLat = 0.0;
52 _sumLatQ = 0.0;
53 _meanDiff = 0.0;
54 _minLat = 1000.0;
55 _maxLat = -1000.0;
56 _curLat = 0.0;
57 _type = "";
58 _followSec = false;
59 }
60 void init() {
61 _diffSec = 0;
62 _numGaps = 0;
63 _sumLat = 0.0;
64 _sumLatQ = 0.0;
65 _numLat = 0;
66 _minLat = 1000.0;
67 _maxLat = -1000.0;
68 };
69 void print() {
70 qDebug() << _type;
71 qDebug() << "_oldSec: " << _oldSec;
72 qDebug() << "_newSec: " << _newSec;
73 qDebug() << "_numGaps: " << _numGaps;
74 qDebug() << "_diffSec: " << _diffSec;
75 qDebug() << "_numLat: " << _numLat;
76 qDebug() << "_sumLat: " << _sumLat;
77 qDebug() << "_sumLatQ: " << _sumLatQ;
78 qDebug() << "_meanDiff: " << _meanDiff;
79 qDebug() << "_minLat: " << _minLat;
80 qDebug() << "_maxLat: " << _maxLat;
81 qDebug() << "_curLat: " << _curLat;
82 qDebug() << "_followSec" << _followSec;
83 };
84 int _oldSec;
85 int _newSec;
86 int _numGaps;
87 int _diffSec;
88 int _numLat;
89 double _sumLat;
90 double _sumLatQ;
91 double _meanDiff;
92 double _minLat;
93 double _maxLat;
94 double _curLat;
95 QByteArray _type;
96 bool _followSec;
97 };
98
99 t_latency _lObs;
100 t_latency _lOrb;
101 t_latency _lClk;
102 t_latency _lClkOrb;
103 t_latency _lPb;
104 t_latency _lCb;
105 t_latency _lVtec;
106 t_latency _lUra;
107 t_latency _lHr;
108 t_latency _lSsrIgs;
109
110 void setCurrentLatency(double lat) {
111 _curLat = lat;
112 }
113
114 signals:
115 void newMessage(QByteArray msg, bool showOnScreen);
116
117 private:
118 void callScript(const char* comment);
119 int _inspSegm;
120 int _adviseFail;
121 int _adviseReco;
122 int _miscIntr;
123 int _numSucc;
124 int _secSucc;
125 int _secFail;
126 int _initPause;
127 int _currPause;
128 bool _wrongEpoch;
129 bool _checkSeg;
130 bool _begCorrupt;
131 bool _endCorrupt;
132 bool _fromReconnect;
133 bool _fromCorrupt;
134 QByteArray _staID;
135 QString _adviseScript;
136 QString _checkMountPoint;
137 QString _begDateCorr;
138 QString _begTimeCorr;
139 QString _begDateOut;
140 QString _begTimeOut;
141 QString _endDateCorr;
142 QString _endTimeCorr;
143 QString _endDateOut;
144 QString _endTimeOut;
145 QDateTime _checkTime;
146 QDateTime _decodeSucc;
147 QDateTime _decodeFailure;
148 QDateTime _decodeStart;
149 QDateTime _decodeStop;
150 QDateTime _decodeStartCorr;
151 QDateTime _decodeStopCorr;
152 QDateTime _checkPause;
153 QDateTime _begDateTimeOut;
154 QDateTime _endDateTimeOut;
155 QDateTime _begDateTimeCorr;
156 QDateTime _endDateTimeCorr;
157 double _curLat;
158};
159
160#endif
Note: See TracBrowser for help on using the repository browser.