1 | /* -------------------------------------------------------------------------
|
---|
2 | * BKG NTRIP Server
|
---|
3 | * -------------------------------------------------------------------------
|
---|
4 | *
|
---|
5 | * Class: bncRtnetUploadCaster
|
---|
6 | *
|
---|
7 | * Purpose: Connection to NTRIP Caster
|
---|
8 | *
|
---|
9 | * Author: L. Mervart
|
---|
10 | *
|
---|
11 | * Created: 29-Mar-2011
|
---|
12 | *
|
---|
13 | * Changes:
|
---|
14 | *
|
---|
15 | * -----------------------------------------------------------------------*/
|
---|
16 |
|
---|
17 | #include <math.h>
|
---|
18 | #include "bncrtnetuploadcaster.h"
|
---|
19 | #include "bncsettings.h"
|
---|
20 | #include "bncephuser.h"
|
---|
21 | #include "bncclockrinex.h"
|
---|
22 | #include "bncsp3.h"
|
---|
23 | #include "gnss.h"
|
---|
24 |
|
---|
25 | using namespace std;
|
---|
26 |
|
---|
27 | // Constructor
|
---|
28 | ////////////////////////////////////////////////////////////////////////////
|
---|
29 | bncRtnetUploadCaster::bncRtnetUploadCaster(const QString& mountpoint,
|
---|
30 | const QString& outHost, int outPort,
|
---|
31 | const QString& password,
|
---|
32 | const QString& crdTrafo, bool CoM,
|
---|
33 | const QString& sp3FileName,
|
---|
34 | const QString& rnxFileName,
|
---|
35 | int PID, int SID, int IOD, int iRow) :
|
---|
36 | bncUploadCaster(mountpoint, outHost, outPort, password, iRow, 0) {
|
---|
37 |
|
---|
38 | if (!outHost.isEmpty()) {
|
---|
39 | _casterID += outHost;
|
---|
40 | }
|
---|
41 | if (!crdTrafo.isEmpty()) {
|
---|
42 | _casterID += " " + crdTrafo;
|
---|
43 | }
|
---|
44 | if (!sp3FileName.isEmpty()) {
|
---|
45 | _casterID += " " + sp3FileName;
|
---|
46 | }
|
---|
47 | if (!rnxFileName.isEmpty()) {
|
---|
48 | _casterID += " " + rnxFileName;
|
---|
49 | }
|
---|
50 |
|
---|
51 | _crdTrafo = crdTrafo;
|
---|
52 | _CoM = CoM;
|
---|
53 | _PID = PID;
|
---|
54 | _SID = SID;
|
---|
55 | _IOD = IOD;
|
---|
56 |
|
---|
57 | // Member that receives the ephemeris
|
---|
58 | // ----------------------------------
|
---|
59 | _ephUser = new bncEphUser(true);
|
---|
60 |
|
---|
61 | bncSettings settings;
|
---|
62 | QString intr = settings.value("uploadIntr").toString();
|
---|
63 | QStringList hlp = settings.value("combineStreams").toStringList();
|
---|
64 | _samplRtcmEphCorr = settings.value("uploadSamplRtcmEphCorr").toDouble();
|
---|
65 | if (hlp.size() > 1) { // combination stream upload
|
---|
66 | _samplRtcmClkCorr = settings.value("cmbSampl").toInt();
|
---|
67 | } else { // single stream upload or sp3 file generation
|
---|
68 | _samplRtcmClkCorr = 5; // default
|
---|
69 | }
|
---|
70 | int samplClkRnx = settings.value("uploadSamplClkRnx").toInt();
|
---|
71 | int samplSp3 = settings.value("uploadSamplSp3").toInt() * 60;
|
---|
72 |
|
---|
73 | if (_samplRtcmEphCorr == 0.0) {
|
---|
74 | _usedEph = 0;
|
---|
75 | }
|
---|
76 | else {
|
---|
77 | _usedEph = new QMap<QString, const t_eph*>;
|
---|
78 | }
|
---|
79 |
|
---|
80 | // RINEX writer
|
---|
81 | // ------------
|
---|
82 | if (!rnxFileName.isEmpty()) {
|
---|
83 | _rnx = new bncClockRinex(rnxFileName, intr, samplClkRnx);
|
---|
84 | }
|
---|
85 | else {
|
---|
86 | _rnx = 0;
|
---|
87 | }
|
---|
88 |
|
---|
89 | // SP3 writer
|
---|
90 | // ----------
|
---|
91 | if (!sp3FileName.isEmpty()) {
|
---|
92 | _sp3 = new bncSP3(sp3FileName, intr, samplSp3);
|
---|
93 | }
|
---|
94 | else {
|
---|
95 | _sp3 = 0;
|
---|
96 | }
|
---|
97 |
|
---|
98 | // Set Transformation Parameters
|
---|
99 | // -----------------------------
|
---|
100 | if (_crdTrafo == "ETRF2000") {
|
---|
101 | _dx = 0.0521;
|
---|
102 | _dy = 0.0493;
|
---|
103 | _dz = -0.0585;
|
---|
104 | _dxr = 0.0001;
|
---|
105 | _dyr = 0.0001;
|
---|
106 | _dzr = -0.0018;
|
---|
107 | _ox = 0.000891;
|
---|
108 | _oy = 0.005390;
|
---|
109 | _oz = -0.008712;
|
---|
110 | _oxr = 0.000081;
|
---|
111 | _oyr = 0.000490;
|
---|
112 | _ozr = -0.000792;
|
---|
113 | _sc = 1.34;
|
---|
114 | _scr = 0.08;
|
---|
115 | _t0 = 2000.0;
|
---|
116 | }
|
---|
117 | else if (_crdTrafo == "NAD83") {
|
---|
118 | _dx = 0.99343;
|
---|
119 | _dy = -1.90331;
|
---|
120 | _dz = -0.52655;
|
---|
121 | _dxr = 0.00079;
|
---|
122 | _dyr = -0.00060;
|
---|
123 | _dzr = -0.00134;
|
---|
124 | _ox = -0.02591467;
|
---|
125 | _oy = -0.00942645;
|
---|
126 | _oz = -0.01159935;
|
---|
127 | _oxr = -0.00006667;
|
---|
128 | _oyr = 0.00075744;
|
---|
129 | _ozr = 0.00005133;
|
---|
130 | _sc = 1.71504;
|
---|
131 | _scr = -0.10201;
|
---|
132 | _t0 = 1997.0;
|
---|
133 | }
|
---|
134 | else if (_crdTrafo == "GDA94") {
|
---|
135 | _dx = -0.08468;
|
---|
136 | _dy = -0.01942;
|
---|
137 | _dz = 0.03201;
|
---|
138 | _dxr = 0.00142;
|
---|
139 | _dyr = 0.00134;
|
---|
140 | _dzr = 0.00090;
|
---|
141 | _ox = 0.0004254;
|
---|
142 | _oy = -0.0022578;
|
---|
143 | _oz = -0.0024015;
|
---|
144 | _oxr = -0.0015461;
|
---|
145 | _oyr = -0.0011820;
|
---|
146 | _ozr = -0.0011551;
|
---|
147 | _sc = 9.710;
|
---|
148 | _scr = 0.109;
|
---|
149 | _t0 = 1994.0;
|
---|
150 | }
|
---|
151 | else if (_crdTrafo == "SIRGAS2000") {
|
---|
152 | _dx = 0.0020;
|
---|
153 | _dy = 0.0041;
|
---|
154 | _dz = 0.0039;
|
---|
155 | _dxr = 0.0000;
|
---|
156 | _dyr = 0.0000;
|
---|
157 | _dzr = 0.0000;
|
---|
158 | _ox = 0.000170;
|
---|
159 | _oy = -0.000030;
|
---|
160 | _oz = 0.000070;
|
---|
161 | _oxr = 0.000000;
|
---|
162 | _oyr = 0.000000;
|
---|
163 | _ozr = 0.000000;
|
---|
164 | _sc = -1.000;
|
---|
165 | _scr = 0.000;
|
---|
166 | _t0 = 0000.0;
|
---|
167 | }
|
---|
168 | else if (_crdTrafo == "SIRGAS95") {
|
---|
169 | _dx = 0.0077;
|
---|
170 | _dy = 0.0058;
|
---|
171 | _dz = -0.0138;
|
---|
172 | _dxr = 0.0000;
|
---|
173 | _dyr = 0.0000;
|
---|
174 | _dzr = 0.0000;
|
---|
175 | _ox = 0.000000;
|
---|
176 | _oy = 0.000000;
|
---|
177 | _oz = -0.000030;
|
---|
178 | _oxr = 0.000000;
|
---|
179 | _oyr = 0.000000;
|
---|
180 | _ozr = 0.000000;
|
---|
181 | _sc = 1.570;
|
---|
182 | _scr = 0.000;
|
---|
183 | _t0 = 0000.0;
|
---|
184 | }
|
---|
185 | else if (_crdTrafo == "DREF91") {
|
---|
186 | _dx = -0.0118;
|
---|
187 | _dy = 0.1432;
|
---|
188 | _dz = -0.1117;
|
---|
189 | _dxr = 0.0001;
|
---|
190 | _dyr = 0.0001;
|
---|
191 | _dzr = -0.0018;
|
---|
192 | _ox = 0.003291;
|
---|
193 | _oy = 0.006190;
|
---|
194 | _oz = -0.011012;
|
---|
195 | _oxr = 0.000081;
|
---|
196 | _oyr = 0.000490;
|
---|
197 | _ozr = -0.000792;
|
---|
198 | _sc = 12.24;
|
---|
199 | _scr = 0.08;
|
---|
200 | _t0 = 2000.0;
|
---|
201 | }
|
---|
202 | else if (_crdTrafo == "Custom") {
|
---|
203 | _dx = settings.value("trafo_dx").toDouble();
|
---|
204 | _dy = settings.value("trafo_dy").toDouble();
|
---|
205 | _dz = settings.value("trafo_dz").toDouble();
|
---|
206 | _dxr = settings.value("trafo_dxr").toDouble();
|
---|
207 | _dyr = settings.value("trafo_dyr").toDouble();
|
---|
208 | _dzr = settings.value("trafo_dzr").toDouble();
|
---|
209 | _ox = settings.value("trafo_ox").toDouble();
|
---|
210 | _oy = settings.value("trafo_oy").toDouble();
|
---|
211 | _oz = settings.value("trafo_oz").toDouble();
|
---|
212 | _oxr = settings.value("trafo_oxr").toDouble();
|
---|
213 | _oyr = settings.value("trafo_oyr").toDouble();
|
---|
214 | _ozr = settings.value("trafo_ozr").toDouble();
|
---|
215 | _sc = settings.value("trafo_sc").toDouble();
|
---|
216 | _scr = settings.value("trafo_scr").toDouble();
|
---|
217 | _t0 = settings.value("trafo_t0").toDouble();
|
---|
218 | }
|
---|
219 | }
|
---|
220 |
|
---|
221 | // Destructor
|
---|
222 | ////////////////////////////////////////////////////////////////////////////
|
---|
223 | bncRtnetUploadCaster::~bncRtnetUploadCaster() {
|
---|
224 | if (isRunning()) {
|
---|
225 | wait();
|
---|
226 | }
|
---|
227 | delete _rnx;
|
---|
228 | delete _sp3;
|
---|
229 | delete _ephUser;
|
---|
230 | delete _usedEph;
|
---|
231 | }
|
---|
232 |
|
---|
233 | //
|
---|
234 | ////////////////////////////////////////////////////////////////////////////
|
---|
235 | void bncRtnetUploadCaster::decodeRtnetStream(char* buffer, int bufLen) {
|
---|
236 |
|
---|
237 | QMutexLocker locker(&_mutex);
|
---|
238 |
|
---|
239 | // Append to internal buffer
|
---|
240 | // -------------------------
|
---|
241 | _rtnetStreamBuffer.append(QByteArray(buffer, bufLen));
|
---|
242 |
|
---|
243 | // Select buffer part that contains last epoch
|
---|
244 | // -------------------------------------------
|
---|
245 | QStringList lines;
|
---|
246 | int iEpoBeg = _rtnetStreamBuffer.lastIndexOf('*'); // begin of last epoch
|
---|
247 | if (iEpoBeg == -1) {
|
---|
248 | _rtnetStreamBuffer.clear();
|
---|
249 | return;
|
---|
250 | }
|
---|
251 | _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoBeg);
|
---|
252 |
|
---|
253 | int iEpoEnd = _rtnetStreamBuffer.lastIndexOf("EOE"); // end of last epoch
|
---|
254 | if (iEpoEnd == -1) {
|
---|
255 | return;
|
---|
256 | }
|
---|
257 | else {
|
---|
258 | lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n', QString::SkipEmptyParts);
|
---|
259 | _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoEnd+3);
|
---|
260 | }
|
---|
261 |
|
---|
262 | if (lines.size() < 2) {
|
---|
263 | return;
|
---|
264 | }
|
---|
265 |
|
---|
266 | // Keep the last unfinished line in buffer
|
---|
267 | // ---------------------------------------
|
---|
268 | int iLastEOL = _rtnetStreamBuffer.lastIndexOf('\n');
|
---|
269 | if (iLastEOL != -1) {
|
---|
270 | _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iLastEOL+1);
|
---|
271 | }
|
---|
272 |
|
---|
273 | // Read first line (with epoch time)
|
---|
274 | // ---------------------------------
|
---|
275 | QTextStream in(lines[0].toAscii());
|
---|
276 | QString hlp;
|
---|
277 | int year, month, day, hour, min;
|
---|
278 | double sec;
|
---|
279 | in >> hlp >> year >> month >> day >> hour >> min >> sec;
|
---|
280 | bncTime epoTime; epoTime.set( year, month, day, hour, min, sec);
|
---|
281 |
|
---|
282 | emit(newMessage("bncRtnetUploadCaster: decode " +
|
---|
283 | QByteArray(epoTime.datestr().c_str()) + " " +
|
---|
284 | QByteArray(epoTime.timestr().c_str()) + " " +
|
---|
285 | _casterID.toAscii(), false));
|
---|
286 |
|
---|
287 | struct ClockOrbit co;
|
---|
288 | memset(&co, 0, sizeof(co));
|
---|
289 | co.EpochTime[CLOCKORBIT_SATGPS] = static_cast<int>(epoTime.gpssec());
|
---|
290 | double gt = epoTime.gpssec() + 3 * 3600 - gnumleap(year, month, day);
|
---|
291 | co.EpochTime[CLOCKORBIT_SATGLONASS] = static_cast<int>(fmod(gt, 86400.0));
|
---|
292 | co.EpochTime[CLOCKORBIT_SATGALILEO] = static_cast<int>(epoTime.gpssec());
|
---|
293 | co.EpochTime[CLOCKORBIT_SATQZSS] = static_cast<int>(epoTime.gpssec());
|
---|
294 | co.EpochTime[CLOCKORBIT_SATSBAS] = static_cast<int>(epoTime.gpssec());
|
---|
295 | co.EpochTime[CLOCKORBIT_SATBDS] = static_cast<int>(epoTime.bdssec());
|
---|
296 |
|
---|
297 | co.Supplied[COBOFS_CLOCK] = 1;
|
---|
298 | co.Supplied[COBOFS_ORBIT] = 1;
|
---|
299 | co.SatRefDatum = DATUM_ITRF;
|
---|
300 | co.SSRIOD = _IOD;
|
---|
301 | co.SSRProviderID = _PID; // 256 .. BKG, 257 ... EUREF
|
---|
302 | co.SSRSolutionID = _SID;
|
---|
303 |
|
---|
304 | struct CodeBias bias;
|
---|
305 | memset(&bias, 0, sizeof(bias));
|
---|
306 | bias.EpochTime[CLOCKORBIT_SATGPS] = co.EpochTime[CLOCKORBIT_SATGPS];
|
---|
307 | bias.EpochTime[CLOCKORBIT_SATGLONASS] = co.EpochTime[CLOCKORBIT_SATGLONASS];
|
---|
308 | bias.EpochTime[CLOCKORBIT_SATGALILEO] = co.EpochTime[CLOCKORBIT_SATGALILEO];
|
---|
309 | bias.EpochTime[CLOCKORBIT_SATQZSS] = co.EpochTime[CLOCKORBIT_SATQZSS];
|
---|
310 | bias.EpochTime[CLOCKORBIT_SATSBAS] = co.EpochTime[CLOCKORBIT_SATSBAS];
|
---|
311 | bias.EpochTime[CLOCKORBIT_SATBDS] = co.EpochTime[CLOCKORBIT_SATBDS];
|
---|
312 |
|
---|
313 | // Default Update Interval
|
---|
314 | // -----------------------
|
---|
315 | int clkUpdInd = 2; // 5 sec
|
---|
316 | int ephUpdInd = clkUpdInd; // default
|
---|
317 |
|
---|
318 | if (_samplRtcmClkCorr > 5.0 && _samplRtcmEphCorr <= 5.0) { // combined orb and clock
|
---|
319 | ephUpdInd = determineUpdateInd(_samplRtcmClkCorr);
|
---|
320 | }
|
---|
321 | if (_samplRtcmClkCorr > 5.0) {
|
---|
322 | clkUpdInd = determineUpdateInd(_samplRtcmClkCorr);
|
---|
323 | }
|
---|
324 | if (_samplRtcmEphCorr > 5.0) {
|
---|
325 | ephUpdInd = determineUpdateInd(_samplRtcmEphCorr);
|
---|
326 | }
|
---|
327 |
|
---|
328 | co.UpdateInterval = clkUpdInd;
|
---|
329 | bias.UpdateInterval = clkUpdInd;
|
---|
330 |
|
---|
331 | for (int ii = 1; ii < lines.size(); ii++) {
|
---|
332 |
|
---|
333 | QString prn;
|
---|
334 | ColumnVector rtnAPC;
|
---|
335 | ColumnVector rtnVel;
|
---|
336 | ColumnVector rtnCoM;
|
---|
337 | double rtnClk;
|
---|
338 |
|
---|
339 | QTextStream in(lines[ii].toAscii());
|
---|
340 |
|
---|
341 | in >> prn;
|
---|
342 |
|
---|
343 | const t_eph* ephLast = _ephUser->ephLast(prn);
|
---|
344 | const t_eph* ephPrev = _ephUser->ephPrev(prn);
|
---|
345 | const t_eph* eph = ephLast;
|
---|
346 |
|
---|
347 | if (eph) {
|
---|
348 |
|
---|
349 | // Use previous ephemeris if the last one is too recent
|
---|
350 | // ----------------------------------------------------
|
---|
351 | const int MINAGE = 60; // seconds
|
---|
352 | if (ephPrev && eph->receptDateTime().isValid() &&
|
---|
353 | eph->receptDateTime().secsTo(currentDateAndTimeGPS()) < MINAGE) {
|
---|
354 | eph = ephPrev;
|
---|
355 | }
|
---|
356 |
|
---|
357 | // Make sure the clock messages refer to same IOD as orbit messages
|
---|
358 | // ----------------------------------------------------------------
|
---|
359 | if (_usedEph) {
|
---|
360 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
361 | (*_usedEph)[prn] = eph;
|
---|
362 | }
|
---|
363 | else {
|
---|
364 | eph = 0;
|
---|
365 | if (_usedEph->contains(prn)) {
|
---|
366 | const t_eph* usedEph = _usedEph->value(prn);
|
---|
367 | if (usedEph == ephLast) {
|
---|
368 | eph = ephLast;
|
---|
369 | }
|
---|
370 | else if (usedEph == ephPrev) {
|
---|
371 | eph = ephPrev;
|
---|
372 | }
|
---|
373 | }
|
---|
374 | }
|
---|
375 | }
|
---|
376 | }
|
---|
377 |
|
---|
378 | if (eph) {
|
---|
379 |
|
---|
380 | QMap<QString, double> codeBiases;
|
---|
381 |
|
---|
382 | while (true) {
|
---|
383 | QString key;
|
---|
384 | int numVal = 0;
|
---|
385 | in >> key >> numVal;
|
---|
386 | if (in.status() != QTextStream::Ok) {
|
---|
387 | break;
|
---|
388 | }
|
---|
389 | if (key == "APC") {
|
---|
390 | rtnAPC.ReSize(3);
|
---|
391 | in >> rtnAPC[0] >> rtnAPC[1] >> rtnAPC[2];
|
---|
392 | }
|
---|
393 | else if (key == "Clk") {
|
---|
394 | in >> rtnClk;
|
---|
395 | }
|
---|
396 | else if (key == "Vel") {
|
---|
397 | rtnVel.ReSize(3);
|
---|
398 | in >> rtnVel[0] >> rtnVel[1] >> rtnVel[2];
|
---|
399 | }
|
---|
400 | else if (key == "CoM") {
|
---|
401 | rtnCoM.ReSize(3);
|
---|
402 | in >> rtnCoM[0] >> rtnCoM[1] >> rtnCoM[2];
|
---|
403 | }
|
---|
404 | else if (key == "CodeBias") {
|
---|
405 | for (int ii = 0; ii < numVal; ii++) {
|
---|
406 | QString type;
|
---|
407 | double value;
|
---|
408 | in >> type >> value;
|
---|
409 | codeBiases[type] = value;
|
---|
410 | }
|
---|
411 | }
|
---|
412 | else {
|
---|
413 | for (int ii = 0; ii < numVal; ii++) {
|
---|
414 | double dummy;
|
---|
415 | in >> dummy;
|
---|
416 | }
|
---|
417 | }
|
---|
418 | }
|
---|
419 | struct ClockOrbit::SatData* sd = 0;
|
---|
420 | if (prn[0] == 'G') {
|
---|
421 | sd = co.Sat + co.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
422 | ++co.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
423 | }
|
---|
424 | else if (prn[0] == 'R') {
|
---|
425 | sd = co.Sat + CLOCKORBIT_NUMGPS
|
---|
426 | + co.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
427 | ++co.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
428 | }
|
---|
429 | else if (prn[0] == 'E') {
|
---|
430 | sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
431 | + co.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
432 | ++co.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
433 | }
|
---|
434 | else if (prn[0] == 'J') {
|
---|
435 | sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
436 | + co.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
437 | ++co.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
438 | }
|
---|
439 | else if (prn[0] == 'S') {
|
---|
440 | sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
441 | + CLOCKORBIT_NUMQZSS
|
---|
442 | + co.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
443 | ++co.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
444 | }
|
---|
445 | else if (prn[0] == 'C') {
|
---|
446 | sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
447 | + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS
|
---|
448 | + co.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
449 | ++co.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
450 | }
|
---|
451 | if (sd) {
|
---|
452 | QString outLine;
|
---|
453 | processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prn,
|
---|
454 | rtnAPC, rtnClk, rtnVel, rtnCoM, sd, outLine);
|
---|
455 | }
|
---|
456 |
|
---|
457 | struct CodeBias::BiasSat* biasSat = 0;
|
---|
458 | if (prn[0] == 'G') {
|
---|
459 | biasSat = bias.Sat + bias.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
460 | ++bias.NumberOfSat[CLOCKORBIT_SATGPS];
|
---|
461 | }
|
---|
462 | else if (prn[0] == 'R') {
|
---|
463 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS
|
---|
464 | + bias.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
465 | ++bias.NumberOfSat[CLOCKORBIT_SATGLONASS];
|
---|
466 | }
|
---|
467 | else if (prn[0] == 'E') {
|
---|
468 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
|
---|
469 | + bias.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
470 | ++bias.NumberOfSat[CLOCKORBIT_SATGALILEO];
|
---|
471 | }
|
---|
472 | else if (prn[0] == 'J') {
|
---|
473 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
474 | + bias.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
475 | ++bias.NumberOfSat[CLOCKORBIT_SATQZSS];
|
---|
476 | }
|
---|
477 | else if (prn[0] == 'S') {
|
---|
478 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
479 | + CLOCKORBIT_NUMQZSS
|
---|
480 | + bias.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
481 | ++bias.NumberOfSat[CLOCKORBIT_SATSBAS];
|
---|
482 | }
|
---|
483 | else if (prn[0] == 'C') {
|
---|
484 | biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
|
---|
485 | + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS
|
---|
486 | + bias.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
487 | ++bias.NumberOfSat[CLOCKORBIT_SATBDS];
|
---|
488 | }
|
---|
489 |
|
---|
490 | // Code Biases
|
---|
491 | // -----------
|
---|
492 | if (biasSat) {
|
---|
493 | biasSat->ID = prn.mid(1).toInt();
|
---|
494 | biasSat->NumberOfCodeBiases = 0;
|
---|
495 | if (prn[0] == 'G') {
|
---|
496 | QMapIterator<QString, double> it(codeBiases);
|
---|
497 | while (it.hasNext()) {
|
---|
498 | it.next();
|
---|
499 | if (it.key() == "1C") {
|
---|
500 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
501 | biasSat->NumberOfCodeBiases += 1;
|
---|
502 | biasSat->Biases[ii].Type = CODETYPEGPS_L1_CA;
|
---|
503 | biasSat->Biases[ii].Bias = it.value();
|
---|
504 | }
|
---|
505 | else if (it.key() == "1P") {
|
---|
506 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
507 | biasSat->NumberOfCodeBiases += 1;
|
---|
508 | biasSat->Biases[ii].Type = CODETYPEGPS_L1_P;
|
---|
509 | biasSat->Biases[ii].Bias = it.value();
|
---|
510 | }
|
---|
511 | else if (it.key() == "1W") {
|
---|
512 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
513 | biasSat->NumberOfCodeBiases += 1;
|
---|
514 | biasSat->Biases[ii].Type = CODETYPEGPS_L1_Z;
|
---|
515 | biasSat->Biases[ii].Bias = it.value();
|
---|
516 | }
|
---|
517 | else if (it.key() == "2C") {
|
---|
518 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
519 | biasSat->NumberOfCodeBiases += 1;
|
---|
520 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_CA;
|
---|
521 | biasSat->Biases[ii].Bias = it.value();
|
---|
522 | }
|
---|
523 | else if (it.key() == "2D") {
|
---|
524 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
525 | biasSat->NumberOfCodeBiases += 1;
|
---|
526 | biasSat->Biases[ii].Type = CODETYPEGPS_SEMI_CODELESS;
|
---|
527 | biasSat->Biases[ii].Bias = it.value();
|
---|
528 | }
|
---|
529 | else if (it.key() == "2S") {
|
---|
530 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
531 | biasSat->NumberOfCodeBiases += 1;
|
---|
532 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_CM;
|
---|
533 | biasSat->Biases[ii].Bias = it.value();
|
---|
534 | }
|
---|
535 | else if (it.key() == "2L") {
|
---|
536 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
537 | biasSat->NumberOfCodeBiases += 1;
|
---|
538 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_CL;
|
---|
539 | biasSat->Biases[ii].Bias = it.value();
|
---|
540 | }
|
---|
541 | else if (it.key() == "2X") {
|
---|
542 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
543 | biasSat->NumberOfCodeBiases += 1;
|
---|
544 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_CML;
|
---|
545 | biasSat->Biases[ii].Bias = it.value();
|
---|
546 | }
|
---|
547 | else if (it.key() == "2P") {
|
---|
548 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
549 | biasSat->NumberOfCodeBiases += 1;
|
---|
550 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_P;
|
---|
551 | biasSat->Biases[ii].Bias = it.value();
|
---|
552 | }
|
---|
553 | else if (it.key() == "2W") {
|
---|
554 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
555 | biasSat->NumberOfCodeBiases += 1;
|
---|
556 | biasSat->Biases[ii].Type = CODETYPEGPS_L2_Z;
|
---|
557 | biasSat->Biases[ii].Bias = it.value();
|
---|
558 | }
|
---|
559 | else if (it.key() == "5I") {
|
---|
560 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
561 | biasSat->NumberOfCodeBiases += 1;
|
---|
562 | biasSat->Biases[ii].Type = CODETYPEGPS_L5_I;
|
---|
563 | biasSat->Biases[ii].Bias = it.value();
|
---|
564 | }
|
---|
565 | else if (it.key() == "5Q") {
|
---|
566 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
567 | biasSat->NumberOfCodeBiases += 1;
|
---|
568 | biasSat->Biases[ii].Type = CODETYPEGPS_L5_Q;
|
---|
569 | biasSat->Biases[ii].Bias = it.value();
|
---|
570 | }
|
---|
571 | else if (it.key() == "5X") {
|
---|
572 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
573 | biasSat->NumberOfCodeBiases += 1;
|
---|
574 | biasSat->Biases[ii].Type = CODETYPEGPS_L5_IQ;
|
---|
575 | biasSat->Biases[ii].Bias = it.value();
|
---|
576 | }
|
---|
577 | }
|
---|
578 | }
|
---|
579 | else if (prn[0] == 'R') {
|
---|
580 | QMapIterator<QString, double> it(codeBiases);
|
---|
581 | while (it.hasNext()) {
|
---|
582 | it.next();
|
---|
583 | if (it.key() == "1C") {
|
---|
584 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
585 | biasSat->NumberOfCodeBiases += 1;
|
---|
586 | biasSat->Biases[ii].Type = CODETYPEGLONASS_L1_CA;
|
---|
587 | biasSat->Biases[ii].Bias = it.value();
|
---|
588 | }
|
---|
589 | else if (it.key() == "1P") {
|
---|
590 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
591 | biasSat->NumberOfCodeBiases += 1;
|
---|
592 | biasSat->Biases[ii].Type = CODETYPEGLONASS_L1_P;
|
---|
593 | biasSat->Biases[ii].Bias = it.value();
|
---|
594 | }
|
---|
595 | else if (it.key() == "2C") {
|
---|
596 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
597 | biasSat->NumberOfCodeBiases += 1;
|
---|
598 | biasSat->Biases[ii].Type = CODETYPEGLONASS_L2_CA;
|
---|
599 | biasSat->Biases[ii].Bias = it.value();
|
---|
600 | }
|
---|
601 | else if (it.key() == "2P") {
|
---|
602 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
603 | biasSat->NumberOfCodeBiases += 1;
|
---|
604 | biasSat->Biases[ii].Type = CODETYPEGLONASS_L2_P;
|
---|
605 | biasSat->Biases[ii].Bias = it.value();
|
---|
606 | }
|
---|
607 | }
|
---|
608 | }
|
---|
609 | else if (prn[0] == 'E') {
|
---|
610 | QMapIterator<QString, double> it(codeBiases);
|
---|
611 | while (it.hasNext()) {
|
---|
612 | it.next();
|
---|
613 | if (it.key() == "1A") {
|
---|
614 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
615 | biasSat->NumberOfCodeBiases += 1;
|
---|
616 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_A;
|
---|
617 | biasSat->Biases[ii].Bias = it.value();
|
---|
618 | }
|
---|
619 | else if (it.key() == "1B") {
|
---|
620 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
621 | biasSat->NumberOfCodeBiases += 1;
|
---|
622 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_B;
|
---|
623 | biasSat->Biases[ii].Bias = it.value();
|
---|
624 | }
|
---|
625 | else if (it.key() == "1C") {
|
---|
626 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
627 | biasSat->NumberOfCodeBiases += 1;
|
---|
628 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_C;
|
---|
629 | biasSat->Biases[ii].Bias = it.value();
|
---|
630 | }
|
---|
631 | else if (it.key() == "5I") {
|
---|
632 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
633 | biasSat->NumberOfCodeBiases += 1;
|
---|
634 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_I;
|
---|
635 | biasSat->Biases[ii].Bias = it.value();
|
---|
636 | }
|
---|
637 | else if (it.key() == "5Q") {
|
---|
638 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
639 | biasSat->NumberOfCodeBiases += 1;
|
---|
640 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_Q;
|
---|
641 | biasSat->Biases[ii].Bias = it.value();
|
---|
642 | }
|
---|
643 | else if (it.key() == "7I") {
|
---|
644 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
645 | biasSat->NumberOfCodeBiases += 1;
|
---|
646 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_I;
|
---|
647 | biasSat->Biases[ii].Bias = it.value();
|
---|
648 | }
|
---|
649 | else if (it.key() == "7Q") {
|
---|
650 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
651 | biasSat->NumberOfCodeBiases += 1;
|
---|
652 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_Q;
|
---|
653 | biasSat->Biases[ii].Bias = it.value();
|
---|
654 | }
|
---|
655 | else if (it.key() == "8I") {
|
---|
656 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
657 | biasSat->NumberOfCodeBiases += 1;
|
---|
658 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5_I;
|
---|
659 | biasSat->Biases[ii].Bias = it.value();
|
---|
660 | }
|
---|
661 | else if (it.key() == "8Q") {
|
---|
662 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
663 | biasSat->NumberOfCodeBiases += 1;
|
---|
664 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E5_Q;
|
---|
665 | biasSat->Biases[ii].Bias = it.value();
|
---|
666 | }
|
---|
667 | else if (it.key() == "6A") {
|
---|
668 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
669 | biasSat->NumberOfCodeBiases += 1;
|
---|
670 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_A;
|
---|
671 | biasSat->Biases[ii].Bias = it.value();
|
---|
672 | }
|
---|
673 | else if (it.key() == "6B") {
|
---|
674 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
675 | biasSat->NumberOfCodeBiases += 1;
|
---|
676 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_B;
|
---|
677 | biasSat->Biases[ii].Bias = it.value();
|
---|
678 | }
|
---|
679 | else if (it.key() == "6C") {
|
---|
680 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
681 | biasSat->NumberOfCodeBiases += 1;
|
---|
682 | biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_C;
|
---|
683 | biasSat->Biases[ii].Bias = it.value();
|
---|
684 | }
|
---|
685 | }
|
---|
686 | }
|
---|
687 | else if (prn[0] == 'J') {
|
---|
688 | QMapIterator<QString, double> it(codeBiases);
|
---|
689 | while (it.hasNext()) {
|
---|
690 | it.next();
|
---|
691 | if (it.key() == "1C") {
|
---|
692 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
693 | biasSat->NumberOfCodeBiases += 1;
|
---|
694 | biasSat->Biases[ii].Type = CODETYPEQZSS_L1_CA;
|
---|
695 | biasSat->Biases[ii].Bias = it.value();
|
---|
696 | }
|
---|
697 | else if (it.key() == "1S") {
|
---|
698 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
699 | biasSat->NumberOfCodeBiases += 1;
|
---|
700 | biasSat->Biases[ii].Type = CODETYPEQZSS_L1C_D;
|
---|
701 | biasSat->Biases[ii].Bias = it.value();
|
---|
702 | }
|
---|
703 | else if (it.key() == "1L") {
|
---|
704 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
705 | biasSat->NumberOfCodeBiases += 1;
|
---|
706 | biasSat->Biases[ii].Type = CODETYPEQZSS_L1C_P;
|
---|
707 | biasSat->Biases[ii].Bias = it.value();
|
---|
708 | }
|
---|
709 | else if (it.key() == "1X") {
|
---|
710 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
711 | biasSat->NumberOfCodeBiases += 1;
|
---|
712 | biasSat->Biases[ii].Type = CODETYPEQZSS_L1C_DP;
|
---|
713 | biasSat->Biases[ii].Bias = it.value();
|
---|
714 | }
|
---|
715 | else if (it.key() == "2S") {
|
---|
716 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
717 | biasSat->NumberOfCodeBiases += 1;
|
---|
718 | biasSat->Biases[ii].Type = CODETYPEQZSS_L2_CM;
|
---|
719 | biasSat->Biases[ii].Bias = it.value();
|
---|
720 | }
|
---|
721 | else if (it.key() == "2L") {
|
---|
722 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
723 | biasSat->NumberOfCodeBiases += 1;
|
---|
724 | biasSat->Biases[ii].Type = CODETYPEQZSS_L2_CL;
|
---|
725 | biasSat->Biases[ii].Bias = it.value();
|
---|
726 | }
|
---|
727 | else if (it.key() == "2X") {
|
---|
728 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
729 | biasSat->NumberOfCodeBiases += 1;
|
---|
730 | biasSat->Biases[ii].Type = CODETYPEQZSS_L2_CML;
|
---|
731 | biasSat->Biases[ii].Bias = it.value();
|
---|
732 | }
|
---|
733 | else if (it.key() == "5I") {
|
---|
734 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
735 | biasSat->NumberOfCodeBiases += 1;
|
---|
736 | biasSat->Biases[ii].Type = CODETYPEQZSS_L5_I;
|
---|
737 | biasSat->Biases[ii].Bias = it.value();
|
---|
738 | }
|
---|
739 | else if (it.key() == "5Q") {
|
---|
740 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
741 | biasSat->NumberOfCodeBiases += 1;
|
---|
742 | biasSat->Biases[ii].Type = CODETYPEQZSS_L5_Q;
|
---|
743 | biasSat->Biases[ii].Bias = it.value();
|
---|
744 | }
|
---|
745 | else if (it.key() == "5X") {
|
---|
746 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
747 | biasSat->NumberOfCodeBiases += 1;
|
---|
748 | biasSat->Biases[ii].Type = CODETYPEQZSS_L5_IQ;
|
---|
749 | biasSat->Biases[ii].Bias = it.value();
|
---|
750 | }
|
---|
751 | else if (it.key() == "6S") {
|
---|
752 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
753 | biasSat->NumberOfCodeBiases += 1;
|
---|
754 | biasSat->Biases[ii].Type = CODETYPEQZSS_LEX_S;
|
---|
755 | biasSat->Biases[ii].Bias = it.value();
|
---|
756 | }
|
---|
757 | else if (it.key() == "6L") {
|
---|
758 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
759 | biasSat->NumberOfCodeBiases += 1;
|
---|
760 | biasSat->Biases[ii].Type = CODETYPEQZSS_LEX_L;
|
---|
761 | biasSat->Biases[ii].Bias = it.value();
|
---|
762 | }
|
---|
763 | else if (it.key() == "6X") {
|
---|
764 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
765 | biasSat->NumberOfCodeBiases += 1;
|
---|
766 | biasSat->Biases[ii].Type = CODETYPEQZSS_LEX_SL;
|
---|
767 | biasSat->Biases[ii].Bias = it.value();
|
---|
768 | }
|
---|
769 | }
|
---|
770 | }
|
---|
771 | else if (prn[0] == 'S') {
|
---|
772 | QMapIterator<QString, double> it(codeBiases);
|
---|
773 | while (it.hasNext()) {
|
---|
774 | it.next();
|
---|
775 | if (it.key() == "1C") {
|
---|
776 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
777 | biasSat->NumberOfCodeBiases += 1;
|
---|
778 | biasSat->Biases[ii].Type = CODETYPE_SBAS_L1_CA;
|
---|
779 | biasSat->Biases[ii].Bias = it.value();
|
---|
780 | }
|
---|
781 | else if (it.key() == "5I") {
|
---|
782 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
783 | biasSat->NumberOfCodeBiases += 1;
|
---|
784 | biasSat->Biases[ii].Type = CODETYPE_SBAS_L5_I;
|
---|
785 | biasSat->Biases[ii].Bias = it.value();
|
---|
786 | }
|
---|
787 | else if (it.key() == "5Q") {
|
---|
788 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
789 | biasSat->NumberOfCodeBiases += 1;
|
---|
790 | biasSat->Biases[ii].Type = CODETYPE_SBAS_L5_Q;
|
---|
791 | biasSat->Biases[ii].Bias = it.value();
|
---|
792 | }
|
---|
793 | else if (it.key() == "5X") {
|
---|
794 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
795 | biasSat->NumberOfCodeBiases += 1;
|
---|
796 | biasSat->Biases[ii].Type = CODETYPE_SBAS_L5_IQ;
|
---|
797 | biasSat->Biases[ii].Bias = it.value();
|
---|
798 | }
|
---|
799 | }
|
---|
800 | }
|
---|
801 | else if (prn[0] == 'C') {
|
---|
802 | QMapIterator<QString, double> it(codeBiases);
|
---|
803 | while (it.hasNext()) {
|
---|
804 | it.next();
|
---|
805 | if (it.key() == "2I") {
|
---|
806 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
807 | biasSat->NumberOfCodeBiases += 1;
|
---|
808 | biasSat->Biases[ii].Type = CODETYPE_BDS_B1_I;
|
---|
809 | biasSat->Biases[ii].Bias = it.value();
|
---|
810 | }
|
---|
811 | else if (it.key() == "2Q") {
|
---|
812 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
813 | biasSat->NumberOfCodeBiases += 1;
|
---|
814 | biasSat->Biases[ii].Type = CODETYPE_BDS_B1_Q;
|
---|
815 | biasSat->Biases[ii].Bias = it.value();
|
---|
816 | }
|
---|
817 | else if (it.key() == "2X") {
|
---|
818 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
819 | biasSat->NumberOfCodeBiases += 1;
|
---|
820 | biasSat->Biases[ii].Type = CODETYPE_BDS_B1_IQ;
|
---|
821 | biasSat->Biases[ii].Bias = it.value();
|
---|
822 | }
|
---|
823 | else if (it.key() == "6I") {
|
---|
824 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
825 | biasSat->NumberOfCodeBiases += 1;
|
---|
826 | biasSat->Biases[ii].Type = CODETYPE_BDS_B3_I;
|
---|
827 | biasSat->Biases[ii].Bias = it.value();
|
---|
828 | }
|
---|
829 | else if (it.key() == "6Q") {
|
---|
830 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
831 | biasSat->NumberOfCodeBiases += 1;
|
---|
832 | biasSat->Biases[ii].Type = CODETYPE_BDS_B3_Q;
|
---|
833 | biasSat->Biases[ii].Bias = it.value();
|
---|
834 | }
|
---|
835 | else if (it.key() == "6X") {
|
---|
836 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
837 | biasSat->NumberOfCodeBiases += 1;
|
---|
838 | biasSat->Biases[ii].Type = CODETYPE_BDS_B3_IQ;
|
---|
839 | biasSat->Biases[ii].Bias = it.value();
|
---|
840 | }
|
---|
841 | else if (it.key() == "7I") {
|
---|
842 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
843 | biasSat->NumberOfCodeBiases += 1;
|
---|
844 | biasSat->Biases[ii].Type = CODETYPE_BDS_B2_I;
|
---|
845 | biasSat->Biases[ii].Bias = it.value();
|
---|
846 | }
|
---|
847 | else if (it.key() == "7Q") {
|
---|
848 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
849 | biasSat->NumberOfCodeBiases += 1;
|
---|
850 | biasSat->Biases[ii].Type = CODETYPE_BDS_B2_Q;
|
---|
851 | biasSat->Biases[ii].Bias = it.value();
|
---|
852 | }
|
---|
853 | else if (it.key() == "7X") {
|
---|
854 | int ii = biasSat->NumberOfCodeBiases; if (ii >= CLOCKORBIT_NUMBIAS) break;
|
---|
855 | biasSat->NumberOfCodeBiases += 1;
|
---|
856 | biasSat->Biases[ii].Type = CODETYPE_BDS_B2_IQ;
|
---|
857 | biasSat->Biases[ii].Bias = it.value();
|
---|
858 | }
|
---|
859 | }
|
---|
860 | }
|
---|
861 | }
|
---|
862 | }
|
---|
863 | }
|
---|
864 |
|
---|
865 | QByteArray hlpBufferCo;
|
---|
866 |
|
---|
867 | // Orbit and Clock Corrections together
|
---|
868 | // ------------------------------------
|
---|
869 | if (_samplRtcmEphCorr == 0.0) {
|
---|
870 | if (co.NumberOfSat[CLOCKORBIT_SATGPS] > 0 ||
|
---|
871 | co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0 ||
|
---|
872 | co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0 ||
|
---|
873 | co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0 ||
|
---|
874 | co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
|
---|
875 | co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
|
---|
876 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
877 | int len = MakeClockOrbit(&co, COTYPE_AUTO, 0, obuffer, sizeof(obuffer));
|
---|
878 | if (len > 0) {
|
---|
879 | hlpBufferCo = QByteArray(obuffer, len);
|
---|
880 | }
|
---|
881 | }
|
---|
882 | }
|
---|
883 |
|
---|
884 | // Orbit and Clock Corrections separately
|
---|
885 | // --------------------------------------
|
---|
886 | else {
|
---|
887 | if (co.NumberOfSat[CLOCKORBIT_SATGPS] > 0) {
|
---|
888 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
889 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
890 | co.UpdateInterval = ephUpdInd;
|
---|
891 | int len1 = MakeClockOrbit(&co, COTYPE_GPSORBIT, 1, obuffer, sizeof(obuffer));
|
---|
892 | co.UpdateInterval = clkUpdInd;
|
---|
893 | if (len1 > 0) {
|
---|
894 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
895 | }
|
---|
896 | }
|
---|
897 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) ? 1 : 0;
|
---|
898 | int len2 = MakeClockOrbit(&co, COTYPE_GPSCLOCK, mmsg, obuffer, sizeof(obuffer));
|
---|
899 | if (len2 > 0) {
|
---|
900 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
901 | }
|
---|
902 | }
|
---|
903 | if (co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) {
|
---|
904 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
905 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
906 | co.UpdateInterval = ephUpdInd;
|
---|
907 | int len1 = MakeClockOrbit(&co, COTYPE_GLONASSORBIT, 1, obuffer, sizeof(obuffer));
|
---|
908 | co.UpdateInterval = clkUpdInd;
|
---|
909 | if (len1 > 0) {
|
---|
910 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
911 | }
|
---|
912 | }
|
---|
913 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0) ? 1 : 0;
|
---|
914 | int len2 = MakeClockOrbit(&co, COTYPE_GLONASSCLOCK, mmsg, obuffer, sizeof(obuffer));
|
---|
915 | if (len2 > 0) {
|
---|
916 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
917 | }
|
---|
918 | }
|
---|
919 | if (co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0) {
|
---|
920 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
921 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
922 | co.UpdateInterval = ephUpdInd;
|
---|
923 | int len1 = MakeClockOrbit(&co, COTYPE_GALILEOORBIT, 1, obuffer, sizeof(obuffer));
|
---|
924 | co.UpdateInterval = clkUpdInd;
|
---|
925 | if (len1 > 0) {
|
---|
926 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
927 | }
|
---|
928 | }
|
---|
929 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0) ? 1 : 0;
|
---|
930 | int len2 = MakeClockOrbit(&co, COTYPE_GALILEOCLOCK, mmsg, obuffer, sizeof(obuffer));
|
---|
931 | if (len2 > 0) {
|
---|
932 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
933 | }
|
---|
934 | }
|
---|
935 | if (co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0) {
|
---|
936 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
937 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
938 | co.UpdateInterval = ephUpdInd;
|
---|
939 | int len1 = MakeClockOrbit(&co, COTYPE_QZSSORBIT, 1, obuffer, sizeof(obuffer));
|
---|
940 | co.UpdateInterval = clkUpdInd;
|
---|
941 | if (len1 > 0) {
|
---|
942 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
943 | }
|
---|
944 | }
|
---|
945 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0) ? 1 : 0;
|
---|
946 | int len2 = MakeClockOrbit(&co, COTYPE_QZSSCLOCK, mmsg, obuffer, sizeof(obuffer));
|
---|
947 | if (len2 > 0) {
|
---|
948 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
949 | }
|
---|
950 | }
|
---|
951 | if (co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0) {
|
---|
952 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
953 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
954 | co.UpdateInterval = ephUpdInd;
|
---|
955 | int len1 = MakeClockOrbit(&co, COTYPE_SBASORBIT, 1, obuffer, sizeof(obuffer));
|
---|
956 | co.UpdateInterval = clkUpdInd;
|
---|
957 | if (len1 > 0) {
|
---|
958 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
959 | }
|
---|
960 | }
|
---|
961 | int mmsg = (co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) ? 1 : 0;
|
---|
962 | int len2 = MakeClockOrbit(&co, COTYPE_SBASCLOCK, mmsg, obuffer, sizeof(obuffer));
|
---|
963 | if (len2 > 0) {
|
---|
964 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
965 | }
|
---|
966 | }
|
---|
967 | if (co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
|
---|
968 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
969 | if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
|
---|
970 | co.UpdateInterval = ephUpdInd;
|
---|
971 | int len1 = MakeClockOrbit(&co, COTYPE_BDSORBIT, 1, obuffer, sizeof(obuffer));
|
---|
972 | co.UpdateInterval = clkUpdInd;
|
---|
973 | if (len1 > 0) {
|
---|
974 | hlpBufferCo += QByteArray(obuffer, len1);
|
---|
975 | }
|
---|
976 | }
|
---|
977 | int len2 = MakeClockOrbit(&co, COTYPE_BDSCLOCK, 0, obuffer, sizeof(obuffer));
|
---|
978 | if (len2 > 0) {
|
---|
979 | hlpBufferCo += QByteArray(obuffer, len2);
|
---|
980 | }
|
---|
981 | }
|
---|
982 | }
|
---|
983 |
|
---|
984 | // Biases
|
---|
985 | // ------
|
---|
986 | QByteArray hlpBufferBias;
|
---|
987 | if (bias.NumberOfSat[CLOCKORBIT_SATGPS] > 0 ||
|
---|
988 | bias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0 ||
|
---|
989 | bias.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0 ||
|
---|
990 | bias.NumberOfSat[CLOCKORBIT_SATQZSS] > 0 ||
|
---|
991 | bias.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
|
---|
992 | bias.NumberOfSat[CLOCKORBIT_SATBDS] > 0 ) {
|
---|
993 | char obuffer[CLOCKORBIT_BUFFERSIZE];
|
---|
994 | int len = MakeCodeBias(&bias, BTYPE_AUTO, 0, obuffer, sizeof(obuffer));
|
---|
995 | if (len > 0) {
|
---|
996 | hlpBufferBias = QByteArray(obuffer, len);
|
---|
997 | }
|
---|
998 | }
|
---|
999 |
|
---|
1000 | _outBuffer += hlpBufferCo + hlpBufferBias;
|
---|
1001 | }
|
---|
1002 |
|
---|
1003 | //
|
---|
1004 | ////////////////////////////////////////////////////////////////////////////
|
---|
1005 | void bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
|
---|
1006 | double GPSweeks, const QString& prn,
|
---|
1007 | const ColumnVector& rtnAPC,
|
---|
1008 | double rtnClk,
|
---|
1009 | const ColumnVector& rtnVel,
|
---|
1010 | const ColumnVector& rtnCoM,
|
---|
1011 | struct ClockOrbit::SatData* sd,
|
---|
1012 | QString& outLine) {
|
---|
1013 |
|
---|
1014 | // Broadcast Position and Velocity
|
---|
1015 | // -------------------------------
|
---|
1016 | ColumnVector xB(4);
|
---|
1017 | ColumnVector vB(3);
|
---|
1018 | eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
|
---|
1019 |
|
---|
1020 | // Precise Position
|
---|
1021 | // ----------------
|
---|
1022 | ColumnVector xP = _CoM ? rtnCoM : rtnAPC;
|
---|
1023 |
|
---|
1024 | double dc = 0.0;
|
---|
1025 | if (_crdTrafo != "IGS08") {
|
---|
1026 | crdTrafo(GPSweek, xP, dc);
|
---|
1027 | }
|
---|
1028 |
|
---|
1029 | // Difference in xyz
|
---|
1030 | // -----------------
|
---|
1031 | ColumnVector dx = xB.Rows(1,3) - xP;
|
---|
1032 | ColumnVector dv = vB - rtnVel;
|
---|
1033 |
|
---|
1034 | // Difference in RSW
|
---|
1035 | // -----------------
|
---|
1036 | ColumnVector rsw(3);
|
---|
1037 | XYZ_to_RSW(xB.Rows(1,3), vB, dx, rsw);
|
---|
1038 |
|
---|
1039 | ColumnVector dotRsw(3);
|
---|
1040 | XYZ_to_RSW(xB.Rows(1,3), vB, dv, dotRsw);
|
---|
1041 |
|
---|
1042 | // Clock Correction
|
---|
1043 | // ----------------
|
---|
1044 | double dClk = rtnClk - (xB(4) - dc) * t_CST::c;
|
---|
1045 |
|
---|
1046 | if (sd) {
|
---|
1047 | sd->ID = prn.mid(1).toInt();
|
---|
1048 | sd->IOD = eph->IOD();
|
---|
1049 | sd->Clock.DeltaA0 = dClk;
|
---|
1050 | sd->Clock.DeltaA1 = 0.0; // TODO
|
---|
1051 | sd->Clock.DeltaA2 = 0.0; // TODO
|
---|
1052 | sd->Orbit.DeltaRadial = rsw(1);
|
---|
1053 | sd->Orbit.DeltaAlongTrack = rsw(2);
|
---|
1054 | sd->Orbit.DeltaCrossTrack = rsw(3);
|
---|
1055 | sd->Orbit.DotDeltaRadial = dotRsw(1);
|
---|
1056 | sd->Orbit.DotDeltaAlongTrack = dotRsw(2);
|
---|
1057 | sd->Orbit.DotDeltaCrossTrack = dotRsw(3);
|
---|
1058 | }
|
---|
1059 |
|
---|
1060 | outLine.sprintf("%d %.1f %s %3d %10.3f %8.3f %8.3f %8.3f\n",
|
---|
1061 | GPSweek, GPSweeks, eph->prn().toString().c_str(),
|
---|
1062 | eph->IOD(), dClk, rsw(1), rsw(2), rsw(3));
|
---|
1063 |
|
---|
1064 | double relativity = -2.0 * DotProduct(xP, rtnVel) / t_CST::c;
|
---|
1065 | double sp3Clk = (rtnClk - relativity) / t_CST::c; // in seconds
|
---|
1066 |
|
---|
1067 | if (_rnx) {
|
---|
1068 | _rnx->write(GPSweek, GPSweeks, prn, sp3Clk);
|
---|
1069 | }
|
---|
1070 | if (_sp3) {
|
---|
1071 | _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, sp3Clk);
|
---|
1072 | }
|
---|
1073 | }
|
---|
1074 |
|
---|
1075 | // Transform Coordinates
|
---|
1076 | ////////////////////////////////////////////////////////////////////////////
|
---|
1077 | void bncRtnetUploadCaster::crdTrafo(int GPSWeek, ColumnVector& xyz,
|
---|
1078 | double& dc) {
|
---|
1079 |
|
---|
1080 | // Current epoch minus 2000.0 in years
|
---|
1081 | // ------------------------------------
|
---|
1082 | double dt = (GPSWeek - (1042.0+6.0/7.0)) / 365.2422 * 7.0 + 2000.0 - _t0;
|
---|
1083 |
|
---|
1084 | ColumnVector dx(3);
|
---|
1085 |
|
---|
1086 | dx(1) = _dx + dt * _dxr;
|
---|
1087 | dx(2) = _dy + dt * _dyr;
|
---|
1088 | dx(3) = _dz + dt * _dzr;
|
---|
1089 |
|
---|
1090 | static const double arcSec = 180.0 * 3600.0 / M_PI;
|
---|
1091 |
|
---|
1092 | double ox = (_ox + dt * _oxr) / arcSec;
|
---|
1093 | double oy = (_oy + dt * _oyr) / arcSec;
|
---|
1094 | double oz = (_oz + dt * _ozr) / arcSec;
|
---|
1095 |
|
---|
1096 | double sc = 1.0 + _sc * 1e-9 + dt * _scr * 1e-9;
|
---|
1097 |
|
---|
1098 | // Specify approximate center of area
|
---|
1099 | // ----------------------------------
|
---|
1100 | ColumnVector meanSta(3);
|
---|
1101 |
|
---|
1102 | if (_crdTrafo == "ETRF2000") {
|
---|
1103 | meanSta(1) = 3661090.0;
|
---|
1104 | meanSta(2) = 845230.0;
|
---|
1105 | meanSta(3) = 5136850.0;
|
---|
1106 | }
|
---|
1107 | else if (_crdTrafo == "NAD83") {
|
---|
1108 | meanSta(1) = -1092950.0;
|
---|
1109 | meanSta(2) = -4383600.0;
|
---|
1110 | meanSta(3) = 4487420.0;
|
---|
1111 | }
|
---|
1112 | else if (_crdTrafo == "GDA94") {
|
---|
1113 | meanSta(1) = -4052050.0;
|
---|
1114 | meanSta(2) = 4212840.0;
|
---|
1115 | meanSta(3) = -2545110.0;
|
---|
1116 | }
|
---|
1117 | else if (_crdTrafo == "SIRGAS2000") {
|
---|
1118 | meanSta(1) = 3740860.0;
|
---|
1119 | meanSta(2) = -4964290.0;
|
---|
1120 | meanSta(3) = -1425420.0;
|
---|
1121 | }
|
---|
1122 | else if (_crdTrafo == "SIRGAS95") {
|
---|
1123 | meanSta(1) = 3135390.0;
|
---|
1124 | meanSta(2) = -5017670.0;
|
---|
1125 | meanSta(3) = -2374440.0;
|
---|
1126 | }
|
---|
1127 | else if (_crdTrafo == "DREF91") {
|
---|
1128 | meanSta(1) = 3959579.0;
|
---|
1129 | meanSta(2) = 721719.0;
|
---|
1130 | meanSta(3) = 4931539.0;
|
---|
1131 | }
|
---|
1132 | else if (_crdTrafo == "Custom") {
|
---|
1133 | meanSta(1) = 0.0; // TODO
|
---|
1134 | meanSta(2) = 0.0; // TODO
|
---|
1135 | meanSta(3) = 0.0; // TODO
|
---|
1136 | }
|
---|
1137 |
|
---|
1138 | // Clock correction proportional to topocentric distance to satellites
|
---|
1139 | // -------------------------------------------------------------------
|
---|
1140 | double rho = (xyz - meanSta).norm_Frobenius();
|
---|
1141 | dc = rho * (sc - 1.0) / sc / t_CST::c;
|
---|
1142 |
|
---|
1143 | Matrix rMat(3,3);
|
---|
1144 | rMat(1,1) = 1.0;
|
---|
1145 | rMat(1,2) = -oz;
|
---|
1146 | rMat(1,3) = oy;
|
---|
1147 | rMat(2,1) = oz;
|
---|
1148 | rMat(2,2) = 1.0;
|
---|
1149 | rMat(2,3) = -ox;
|
---|
1150 | rMat(3,1) = -oy;
|
---|
1151 | rMat(3,2) = ox;
|
---|
1152 | rMat(3,3) = 1.0;
|
---|
1153 |
|
---|
1154 | xyz = sc * rMat * xyz + dx;
|
---|
1155 | }
|
---|
1156 |
|
---|
1157 | int bncRtnetUploadCaster::determineUpdateInd(double samplingRate) {
|
---|
1158 |
|
---|
1159 | if (samplingRate == 10.0) {
|
---|
1160 | return 3;
|
---|
1161 | }
|
---|
1162 | else if (samplingRate == 15.0) {
|
---|
1163 | return 4;
|
---|
1164 | }
|
---|
1165 | else if (samplingRate == 30.0) {
|
---|
1166 | return 5;
|
---|
1167 | }
|
---|
1168 | else if (samplingRate == 60.0) {
|
---|
1169 | return 6;
|
---|
1170 | }
|
---|
1171 | else if (samplingRate == 120.0) {
|
---|
1172 | return 7;
|
---|
1173 | }
|
---|
1174 | else if (samplingRate == 240.0) {
|
---|
1175 | return 8;
|
---|
1176 | }
|
---|
1177 | else if (samplingRate == 300.0) {
|
---|
1178 | return 9;
|
---|
1179 | }
|
---|
1180 | else if (samplingRate == 600.0) {
|
---|
1181 | return 10;
|
---|
1182 | }
|
---|
1183 | else if (samplingRate == 900.0) {
|
---|
1184 | return 11;
|
---|
1185 | }
|
---|
1186 | else if (samplingRate == 1800.0) {
|
---|
1187 | return 12;
|
---|
1188 | }
|
---|
1189 | else if (samplingRate == 3600.0) {
|
---|
1190 | return 13;
|
---|
1191 | }
|
---|
1192 | else if (samplingRate == 7200.0) {
|
---|
1193 | return 14;
|
---|
1194 | }
|
---|
1195 | else if (samplingRate == 10800.0) {
|
---|
1196 | return 15;
|
---|
1197 | }
|
---|
1198 | return 2;// default
|
---|
1199 | }
|
---|