source: ntrip/trunk/BNC/src/upload/bncrtnetuploadcaster.cpp@ 8983

Last change on this file since 8983 was 8983, checked in by stuerze, 2 years ago

minor changes

File size: 120.9 KB
Line 
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
25using namespace std;
26
27// Constructor
28////////////////////////////////////////////////////////////////////////////
29bncRtnetUploadCaster::bncRtnetUploadCaster(const QString& mountpoint,
30 const QString& outHost, int outPort,
31 const QString& ntripVersion,
32 const QString& userName, const QString& password,
33 const QString& crdTrafo, bool CoM, const QString& sp3FileName,
34 const QString& rnxFileName, int PID, int SID, int IOD, int iRow) :
35 bncUploadCaster(mountpoint, outHost, outPort, ntripVersion, userName, password, iRow, 0) {
36
37
38 if (!mountpoint.isEmpty()) {
39 _casterID += mountpoint;
40 }
41 if (!outHost.isEmpty()) {
42 _casterID += " " + outHost;
43 if (outPort) {
44 _casterID += ":" + QString("%1").arg(outPort, 10);
45 }
46 }
47 if (!crdTrafo.isEmpty()) {
48 _casterID += " " + crdTrafo;
49 }
50 if (!sp3FileName.isEmpty()) {
51 _casterID += " " + sp3FileName;
52 }
53 if (!rnxFileName.isEmpty()) {
54 _casterID += " " + rnxFileName;
55 }
56
57 _crdTrafo = crdTrafo;
58 _CoM = CoM;
59 _PID = PID;
60 _SID = SID;
61 _IOD = IOD;
62
63 // Member that receives the ephemeris
64 // ----------------------------------
65 _ephUser = new bncEphUser(true);
66
67 bncSettings settings;
68 QString intr = settings.value("uploadIntr").toString();
69 QStringList hlp = settings.value("cmbStreams").toStringList();
70 _samplRtcmEphCorr = settings.value("uploadSamplRtcmEphCorr").toDouble();
71 if (hlp.size() > 1) { // combination stream upload
72 _samplRtcmClkCorr = settings.value("cmbSampl").toInt();
73 }
74 else { // single stream upload or sp3 file generation
75 _samplRtcmClkCorr = 5; // default
76 }
77 int samplClkRnx = settings.value("uploadSamplClkRnx").toInt();
78 int samplSp3 = settings.value("uploadSamplSp3").toInt() * 60;
79
80 if (_samplRtcmEphCorr == 0.0) {
81 _usedEph = 0;
82 }
83 else {
84 _usedEph = new QMap<QString, const t_eph*>;
85 }
86
87 // RINEX writer
88 // ------------
89 if (!rnxFileName.isEmpty()) {
90 _rnx = new bncClockRinex(rnxFileName, intr, samplClkRnx);
91 }
92 else {
93 _rnx = 0;
94 }
95
96 // SP3 writer
97 // ----------
98 if (!sp3FileName.isEmpty()) {
99 _sp3 = new bncSP3(sp3FileName, intr, samplSp3);
100 }
101 else {
102 _sp3 = 0;
103 }
104
105 // Set Transformation Parameters
106 // -----------------------------
107 // Transformation Parameters from ITRF2014 to ETRF2000
108 // EUREF Technical Note 1 Relationship and Transformation between the ITRF and ETRF
109 // Zuheir Altamimi, June 28, 2018
110 if (_crdTrafo == "ETRF2000") {
111 _dx = 0.0547;
112 _dy = 0.0522;
113 _dz = -0.0741;
114
115 _dxr = 0.0001;
116 _dyr = 0.0001;
117 _dzr = -0.0019;
118
119 _ox = 0.001701;
120 _oy = 0.010290;
121 _oz = -0.016632;
122
123 _oxr = 0.000081;
124 _oyr = 0.000490;
125 _ozr = -0.000729;
126
127 _sc = 2.12;
128 _scr = 0.11;
129
130 _t0 = 2010.0;
131 }
132 // Transformation Parameters from ITRF2014 to GDA2020 (Ryan Ruddick, GA)
133 else if (_crdTrafo == "GDA2020") {
134 _dx = 0.0;
135 _dy = 0.0;
136 _dz = 0.0;
137
138 _dxr = 0.0;
139 _dyr = 0.0;
140 _dzr = 0.0;
141
142 _ox = 0.0;
143 _oy = 0.0;
144 _oz = 0.0;
145
146 _oxr = 0.00150379;
147 _oyr = 0.00118346;
148 _ozr = 0.00120716;
149
150 _sc = 0.0;
151 _scr = 0.0;
152
153 _t0 = 2020.0;
154 }
155 // Transformation Parameters from IGb14 to SIRGAS2000 (Thanks to Sonia Costa, BRA)
156 // June 29 2020: TX:-0.0027 m TY:-0.0025 m TZ:-0.0042 m SCL:1.20 (ppb) no rotations and no rates.*/
157 else if (_crdTrafo == "SIRGAS2000") {
158 _dx = -0.0027;
159 _dy = -0.0025;
160 _dz = -0.0042;
161
162 _dxr = 0.0000;
163 _dyr = 0.0000;
164 _dzr = 0.0000;
165
166 _ox = 0.000000;
167 _oy = 0.000000;
168 _oz = 0.000000;
169
170 _oxr = 0.000000;
171 _oyr = 0.000000;
172 _ozr = 0.000000;
173
174 _sc = 1.20000;
175 _scr = 0.00000;
176 _t0 = 2000.0;
177 }
178 // Transformation Parameters from ITRF2014 to DREF91
179 else if (_crdTrafo == "DREF91") {
180 _dx = 0.0547;
181 _dy = 0.0522;
182 _dz = -0.0741;
183
184 _dxr = 0.0001;
185 _dyr = 0.0001;
186 _dzr = -0.0019;
187 // ERTF200 + rotation parameters (ETRF200 => DREF91)
188 _ox = 0.001701 + 0.000658;
189 _oy = 0.010290 - 0.000208;
190 _oz = -0.016632 + 0.000755;
191
192 _oxr = 0.000081;
193 _oyr = 0.000490;
194 _ozr = -0.000729;
195
196 _sc = 2.12;
197 _scr = 0.11;
198
199 _t0 = 2010.0;
200 }
201 else if (_crdTrafo == "Custom") {
202 _dx = settings.value("trafo_dx").toDouble();
203 _dy = settings.value("trafo_dy").toDouble();
204 _dz = settings.value("trafo_dz").toDouble();
205 _dxr = settings.value("trafo_dxr").toDouble();
206 _dyr = settings.value("trafo_dyr").toDouble();
207 _dzr = settings.value("trafo_dzr").toDouble();
208 _ox = settings.value("trafo_ox").toDouble();
209 _oy = settings.value("trafo_oy").toDouble();
210 _oz = settings.value("trafo_oz").toDouble();
211 _oxr = settings.value("trafo_oxr").toDouble();
212 _oyr = settings.value("trafo_oyr").toDouble();
213 _ozr = settings.value("trafo_ozr").toDouble();
214 _sc = settings.value("trafo_sc").toDouble();
215 _scr = settings.value("trafo_scr").toDouble();
216 _t0 = settings.value("trafo_t0").toDouble();
217 }
218}
219
220// Destructor
221////////////////////////////////////////////////////////////////////////////
222bncRtnetUploadCaster::~bncRtnetUploadCaster() {
223 if (isRunning()) {
224 wait();
225 }
226 delete _rnx;
227 delete _sp3;
228 delete _ephUser;
229 delete _usedEph;
230}
231
232//
233////////////////////////////////////////////////////////////////////////////
234void bncRtnetUploadCaster::decodeRtnetStream(char* buffer, int bufLen) {
235
236 QMutexLocker locker(&_mutex);
237
238 // Append to internal buffer
239 // -------------------------
240 _rtnetStreamBuffer.append(QByteArray(buffer, bufLen));
241
242 // Select buffer part that contains last epoch
243 // -------------------------------------------
244 QStringList lines;
245 int iEpoBeg = _rtnetStreamBuffer.lastIndexOf('*'); // begin of last epoch
246 if (iEpoBeg == -1) {
247 _rtnetStreamBuffer.clear();
248 return;
249 }
250 int iEpoBegEarlier = _rtnetStreamBuffer.indexOf('*');
251 if (iEpoBegEarlier != -1 && iEpoBegEarlier < iEpoBeg) { // are there two epoch lines in buffer?
252 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoBegEarlier);
253 }
254 else {
255 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoBeg);
256 }
257 int iEpoEnd = _rtnetStreamBuffer.lastIndexOf("EOE"); // end of last epoch
258 if (iEpoEnd == -1) {
259 return;
260 }
261
262 while (_rtnetStreamBuffer.count('*') > 1) { // is there more than 1 epoch line in buffer?
263 QString rtnetStreamBuffer = _rtnetStreamBuffer.mid(1);
264 int nextEpoch = rtnetStreamBuffer.indexOf('*');
265 if (nextEpoch != -1 && nextEpoch < iEpoEnd) {
266 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(nextEpoch);
267 }
268 else if (nextEpoch != -1 && nextEpoch >= iEpoEnd) {
269 break;
270 }
271 }
272
273 lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n',
274 QString::SkipEmptyParts);
275 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoEnd + 3);
276
277 if (lines.size() < 2) {
278 return;
279 }
280
281 // Read first line (with epoch time)
282 // ---------------------------------
283 QTextStream in(lines[0].toLatin1());
284 QString hlp;
285 int year, month, day, hour, min;
286 double sec;
287 in >> hlp >> year >> month >> day >> hour >> min >> sec;
288 bncTime epoTime;
289 epoTime.set(year, month, day, hour, min, sec);
290
291 emit(newMessage(
292 "bncRtnetUploadCaster: decode " + QByteArray(epoTime.datestr().c_str())
293 + " " + QByteArray(epoTime.timestr().c_str()) + " "
294 + _casterID.toLatin1(), false));
295
296 struct ClockOrbit co;
297 memset(&co, 0, sizeof(co));
298 co.EpochTime[CLOCKORBIT_SATGPS] = static_cast<int>(epoTime.gpssec());
299 double gt = epoTime.gpssec() + 3 * 3600 - gnumleap(year, month, day);
300 co.EpochTime[CLOCKORBIT_SATGLONASS] = static_cast<int>(fmod(gt, 86400.0));
301 co.EpochTime[CLOCKORBIT_SATGALILEO] = static_cast<int>(epoTime.gpssec());
302 co.EpochTime[CLOCKORBIT_SATQZSS] = static_cast<int>(epoTime.gpssec());
303 co.EpochTime[CLOCKORBIT_SATSBAS] = static_cast<int>(epoTime.gpssec());
304 co.EpochTime[CLOCKORBIT_SATBDS] = static_cast<int>(epoTime.bdssec());
305 co.Supplied[COBOFS_CLOCK] = 1;
306 co.Supplied[COBOFS_ORBIT] = 1;
307 co.SatRefDatum = DATUM_ITRF;
308 co.SSRIOD = _IOD;
309 co.SSRProviderID = _PID; // 256 .. BKG, 257 ... EUREF
310 co.SSRSolutionID = _SID;
311
312 struct CodeBias bias;
313 memset(&bias, 0, sizeof(bias));
314 bias.EpochTime[CLOCKORBIT_SATGPS] = co.EpochTime[CLOCKORBIT_SATGPS];
315 bias.EpochTime[CLOCKORBIT_SATGLONASS] = co.EpochTime[CLOCKORBIT_SATGLONASS];
316 bias.EpochTime[CLOCKORBIT_SATGALILEO] = co.EpochTime[CLOCKORBIT_SATGALILEO];
317 bias.EpochTime[CLOCKORBIT_SATQZSS] = co.EpochTime[CLOCKORBIT_SATQZSS];
318 bias.EpochTime[CLOCKORBIT_SATSBAS] = co.EpochTime[CLOCKORBIT_SATSBAS];
319 bias.EpochTime[CLOCKORBIT_SATBDS] = co.EpochTime[CLOCKORBIT_SATBDS];
320 bias.SSRIOD = _IOD;
321 bias.SSRProviderID = _PID;
322 bias.SSRSolutionID = _SID;
323
324 struct PhaseBias phasebias;
325 memset(&phasebias, 0, sizeof(phasebias));
326 unsigned int dispersiveBiasConsistenyIndicator = 0;
327 unsigned int mwConsistencyIndicator = 0;
328 phasebias.EpochTime[CLOCKORBIT_SATGPS] = co.EpochTime[CLOCKORBIT_SATGPS];
329 phasebias.EpochTime[CLOCKORBIT_SATGLONASS] = co.EpochTime[CLOCKORBIT_SATGLONASS];
330 phasebias.EpochTime[CLOCKORBIT_SATGALILEO] = co.EpochTime[CLOCKORBIT_SATGALILEO];
331 phasebias.EpochTime[CLOCKORBIT_SATQZSS] = co.EpochTime[CLOCKORBIT_SATQZSS];
332 phasebias.EpochTime[CLOCKORBIT_SATSBAS] = co.EpochTime[CLOCKORBIT_SATSBAS];
333 phasebias.EpochTime[CLOCKORBIT_SATBDS] = co.EpochTime[CLOCKORBIT_SATBDS];
334 phasebias.SSRIOD = _IOD;
335 phasebias.SSRProviderID = _PID;
336 phasebias.SSRSolutionID = _SID;
337
338 struct VTEC vtec;
339 memset(&vtec, 0, sizeof(vtec));
340 vtec.EpochTime = static_cast<int>(epoTime.gpssec());
341 vtec.SSRIOD = _IOD;
342 vtec.SSRProviderID = _PID;
343 vtec.SSRSolutionID = _SID;
344
345 // Default Update Interval
346 // -----------------------
347 int clkUpdInd = 2; // 5 sec
348 int ephUpdInd = clkUpdInd; // default
349
350 if (_samplRtcmClkCorr > 5.0 && _samplRtcmEphCorr <= 5.0) { // combined orb and clock
351 ephUpdInd = determineUpdateInd(_samplRtcmClkCorr);
352 }
353 if (_samplRtcmClkCorr > 5.0) {
354 clkUpdInd = determineUpdateInd(_samplRtcmClkCorr);
355 }
356 if (_samplRtcmEphCorr > 5.0) {
357 ephUpdInd = determineUpdateInd(_samplRtcmEphCorr);
358 }
359
360 co.UpdateInterval = clkUpdInd;
361 bias.UpdateInterval = clkUpdInd;
362 phasebias.UpdateInterval = clkUpdInd;
363
364 for (int ii = 1; ii < lines.size(); ii++) {
365 QString key; // prn or key VTEC, IND (phase bias indicators)
366 double rtnUra = 0.0; // [m]
367 ColumnVector rtnAPC; rtnAPC.ReSize(3); rtnAPC = 0.0; // [m, m, m]
368 ColumnVector rtnVel; rtnVel.ReSize(3); rtnVel = 0.0; // [m/s, m/s, m/s]
369 ColumnVector rtnCoM; rtnCoM.ReSize(3); rtnCoM = 0.0; // [m, m, m]
370 ColumnVector rtnClk; rtnClk.ReSize(3); rtnClk = 0.0; // [m, m/s, m/s²]
371 ColumnVector rtnClkSig; rtnClkSig.ReSize(3); rtnClkSig = 0.0; // [m, m/s, m/s²]
372
373 t_prn prn;
374
375 QTextStream in(lines[ii].toLatin1());
376
377 in >> key;
378
379 // non-satellite specific parameters
380 if (key.contains("IND", Qt::CaseSensitive)) {
381 in >> dispersiveBiasConsistenyIndicator >> mwConsistencyIndicator;
382 continue;
383 }
384 // non-satellite specific parameters
385 if (key.contains("VTEC", Qt::CaseSensitive)) {
386 double ui;
387 in >> ui >> vtec.NumLayers;
388 vtec.UpdateInterval = (unsigned int) determineUpdateInd(ui);
389 for (unsigned ll = 0; ll < vtec.NumLayers; ll++) {
390 int dummy;
391 in >> dummy >> vtec.Layers[ll].Degree >> vtec.Layers[ll].Order
392 >> vtec.Layers[ll].Height;
393 for (unsigned iDeg = 0; iDeg <= vtec.Layers[ll].Degree; iDeg++) {
394 for (unsigned iOrd = 0; iOrd <= vtec.Layers[ll].Order; iOrd++) {
395 in >> vtec.Layers[ll].Cosinus[iDeg][iOrd];
396 }
397 }
398 for (unsigned iDeg = 0; iDeg <= vtec.Layers[ll].Degree; iDeg++) {
399 for (unsigned iOrd = 0; iOrd <= vtec.Layers[ll].Order; iOrd++) {
400 in >> vtec.Layers[ll].Sinus[iDeg][iOrd];
401 }
402 }
403 }
404 continue;
405 }
406 // satellite specific parameters
407 char sys = key.mid(0, 1).at(0).toLatin1();
408 int number = key.mid(1, 2).toInt();
409 int flags = 0;
410 if (sys == 'E') { // I/NAV
411 flags = 1;
412 }
413 prn.set(sys, number, flags);
414 QString prnInternalStr = QString::fromStdString(prn.toInternalString());
415 QString prnStr = QString::fromStdString(prn.toString());
416
417 const t_eph* ephLast = _ephUser->ephLast(prnInternalStr);
418 const t_eph* ephPrev = _ephUser->ephPrev(prnInternalStr);
419 const t_eph* eph = ephLast;
420 if (eph) {
421
422 // Use previous ephemeris if the last one is too recent
423 // ----------------------------------------------------
424 const int MINAGE = 60; // seconds
425 if (ephPrev && eph->receptDateTime().isValid()
426 && eph->receptDateTime().secsTo(currentDateAndTimeGPS()) < MINAGE) {
427 eph = ephPrev;
428 }
429
430 // Make sure the clock messages refer to same IOD as orbit messages
431 // ----------------------------------------------------------------
432 if (_usedEph) {
433 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
434 (*_usedEph)[prnInternalStr] = eph;
435 }
436 else {
437 eph = 0;
438 if (_usedEph->contains(prnInternalStr)) {
439 const t_eph* usedEph = _usedEph->value(prnInternalStr);
440 if (usedEph == ephLast) {
441 eph = ephLast;
442 }
443 else if (usedEph == ephPrev) {
444 eph = ephPrev;
445 }
446 }
447 }
448 }
449 }
450
451 if (eph &&
452 eph->checkState() != t_eph::bad &&
453 eph->checkState() != t_eph::unhealthy &&
454 eph->checkState() != t_eph::outdated) {
455 QMap<QString, double> codeBiases;
456 QList<phaseBiasSignal> phaseBiasList;
457 phaseBiasesSat pbSat;
458
459 while (true) {
460 QString key;
461 int numVal = 0;
462 in >> key;
463 if (in.status() != QTextStream::Ok) {
464 break;
465 }
466 if (key == "APC") {
467 in >> numVal;
468 rtnAPC.ReSize(3); rtnAPC = 0.0;
469 for (int ii = 0; ii < numVal; ii++) {
470 in >> rtnAPC[ii];
471 }
472 }
473 else if (key == "Ura") {
474 in >> numVal;
475 if (numVal == 1)
476 in >> rtnUra;
477 }
478 else if (key == "Clk") {
479 in >> numVal;
480 rtnClk.ReSize(3); rtnClk = 0.0;
481 for (int ii = 0; ii < numVal; ii++) {
482 in >> rtnClk[ii];
483 }
484 }
485 else if (key == "ClkSig") {
486 in >> numVal;
487 rtnClkSig.ReSize(3); rtnClkSig = 0.0;
488 for (int ii = 0; ii < numVal; ii++) {
489 in >> rtnClkSig[ii];
490 }
491 }
492 else if (key == "Vel") {
493 in >> numVal;
494 rtnVel.ReSize(3); rtnVel = 0.0;
495 for (int ii = 0; ii < numVal; ii++) {
496 in >> rtnVel[ii];
497 }
498 }
499 else if (key == "CoM") {
500 in >> numVal;
501 rtnCoM.ReSize(3); rtnCoM = 0.0;
502 for (int ii = 0; ii < numVal; ii++) {
503 in >> rtnCoM[ii];
504 }
505 }
506 else if (key == "CodeBias") {
507 in >> numVal;
508 for (int ii = 0; ii < numVal; ii++) {
509 QString type;
510 double value;
511 in >> type >> value;
512 codeBiases[type] = value;
513 }
514 }
515 else if (key == "YawAngle") {
516 in >> numVal >> pbSat.yawAngle;
517 if (pbSat.yawAngle < 0.0) {
518 pbSat.yawAngle += (2*M_PI);
519 }
520 else if (pbSat.yawAngle > 2*M_PI) {
521 pbSat.yawAngle -= (2*M_PI);
522 }
523 }
524 else if (key == "YawRate") {
525 in >> numVal >> pbSat.yawRate;
526 }
527 else if (key == "PhaseBias") {
528 in >> numVal;
529 for (int ii = 0; ii < numVal; ii++) {
530 phaseBiasSignal pb;
531 in >> pb.type >> pb.bias >> pb.integerIndicator
532 >> pb.wlIndicator >> pb.discontinuityCounter;
533 phaseBiasList.append(pb);
534 }
535 }
536 else {
537 in >> numVal;
538 for (int ii = 0; ii < numVal; ii++) {
539 double dummy;
540 in >> dummy;
541 }
542 emit(newMessage(" RTNET format error: "
543 + lines[ii].toLatin1(), false));
544 }
545 }
546
547 struct ClockOrbit::SatData* sd = 0;
548 if (prn.system() == 'G') {
549 sd = co.Sat + co.NumberOfSat[CLOCKORBIT_SATGPS];
550 ++co.NumberOfSat[CLOCKORBIT_SATGPS];
551 }
552 else if (prn.system() == 'R') {
553 sd = co.Sat + CLOCKORBIT_NUMGPS + co.NumberOfSat[CLOCKORBIT_SATGLONASS];
554 ++co.NumberOfSat[CLOCKORBIT_SATGLONASS];
555 }
556 else if (prn.system() == 'E') {
557 sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
558 + co.NumberOfSat[CLOCKORBIT_SATGALILEO];
559 ++co.NumberOfSat[CLOCKORBIT_SATGALILEO];
560 }
561 else if (prn.system() == 'J') {
562 sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
563 + CLOCKORBIT_NUMGALILEO
564 + co.NumberOfSat[CLOCKORBIT_SATQZSS];
565 ++co.NumberOfSat[CLOCKORBIT_SATQZSS];
566 }
567 else if (prn.system() == 'S') {
568 sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
569 + CLOCKORBIT_NUMGALILEO + CLOCKORBIT_NUMQZSS
570 + co.NumberOfSat[CLOCKORBIT_SATSBAS];
571 ++co.NumberOfSat[CLOCKORBIT_SATSBAS];
572 }
573 else if (prn.system() == 'C') {
574 sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
575 + CLOCKORBIT_NUMGALILEO + CLOCKORBIT_NUMQZSS
576 + CLOCKORBIT_NUMSBAS
577 + co.NumberOfSat[CLOCKORBIT_SATBDS];
578 ++co.NumberOfSat[CLOCKORBIT_SATBDS];
579 }
580 if (sd) {
581 QString outLine;
582 t_irc irc = processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC,
583 rtnUra, rtnClk, rtnVel, rtnCoM, rtnClkSig, sd, outLine);
584 if (irc != success) {
585 // very few cases: check states bad and unhealthy are excluded earlier
586 sd->ID = prnStr.mid(1).toInt(); // to prevent G00, R00 entries
587 sd->IOD = eph->IOD();
588 }
589 }
590
591 // Code Biases
592 // -----------
593 struct CodeBias::BiasSat* biasSat = 0;
594 if (!codeBiases.isEmpty()) {
595 if (prn.system() == 'G') {
596 biasSat = bias.Sat + bias.NumberOfSat[CLOCKORBIT_SATGPS];
597 ++bias.NumberOfSat[CLOCKORBIT_SATGPS];
598 }
599 else if (prn.system() == 'R') {
600 biasSat = bias.Sat + CLOCKORBIT_NUMGPS
601 + bias.NumberOfSat[CLOCKORBIT_SATGLONASS];
602 ++bias.NumberOfSat[CLOCKORBIT_SATGLONASS];
603 }
604 else if (prn.system() == 'E') {
605 biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
606 + bias.NumberOfSat[CLOCKORBIT_SATGALILEO];
607 ++bias.NumberOfSat[CLOCKORBIT_SATGALILEO];
608 }
609 else if (prn.system() == 'J') {
610 biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
611 + CLOCKORBIT_NUMGALILEO
612 + bias.NumberOfSat[CLOCKORBIT_SATQZSS];
613 ++bias.NumberOfSat[CLOCKORBIT_SATQZSS];
614 }
615 else if (prn.system() == 'S') {
616 biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
617 + CLOCKORBIT_NUMGALILEO + CLOCKORBIT_NUMQZSS
618 + bias.NumberOfSat[CLOCKORBIT_SATSBAS];
619 ++bias.NumberOfSat[CLOCKORBIT_SATSBAS];
620 }
621 else if (prn.system() == 'C') {
622 biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
623 + CLOCKORBIT_NUMGALILEO + CLOCKORBIT_NUMQZSS
624 + CLOCKORBIT_NUMSBAS
625 + bias.NumberOfSat[CLOCKORBIT_SATBDS];
626 ++bias.NumberOfSat[CLOCKORBIT_SATBDS];
627 }
628 }
629
630 if (biasSat) {
631 biasSat->ID = prn.number();
632 biasSat->NumberOfCodeBiases = 0;
633 if (prn.system() == 'G') {
634 QMapIterator<QString, double> it(codeBiases);
635 while (it.hasNext()) {
636 it.next();
637 if (it.key() == "1C") {
638 int ii = biasSat->NumberOfCodeBiases;
639 if (ii >= CLOCKORBIT_NUMBIAS)
640 break;
641 biasSat->NumberOfCodeBiases += 1;
642 biasSat->Biases[ii].Type = CODETYPEGPS_L1_CA;
643 biasSat->Biases[ii].Bias = it.value();
644 }
645 else if (it.key() == "1S") {
646 int ii = biasSat->NumberOfCodeBiases;
647 if (ii >= CLOCKORBIT_NUMBIAS)
648 break;
649 biasSat->NumberOfCodeBiases += 1;
650 biasSat->Biases[ii].Type = CODETYPEGPS_L1C_D;
651 biasSat->Biases[ii].Bias = it.value();
652 }
653 else if (it.key() == "1L") {
654 int ii = biasSat->NumberOfCodeBiases;
655 if (ii >= CLOCKORBIT_NUMBIAS)
656 break;
657 biasSat->NumberOfCodeBiases += 1;
658 biasSat->Biases[ii].Type = CODETYPEGPS_L1C_P;
659 biasSat->Biases[ii].Bias = it.value();
660 }
661#ifdef USE_SSR_RTCM
662 else if (it.key() == "1X") {
663 int ii = biasSat->NumberOfCodeBiases;
664 if (ii >= CLOCKORBIT_NUMBIAS)
665 break;
666 biasSat->NumberOfCodeBiases += 1;
667 biasSat->Biases[ii].Type = CODETYPEGPS_L1C_DP;
668 biasSat->Biases[ii].Bias = it.value();
669 }
670#endif
671 else if (it.key() == "1P") {
672 int ii = biasSat->NumberOfCodeBiases;
673 if (ii >= CLOCKORBIT_NUMBIAS)
674 break;
675 biasSat->NumberOfCodeBiases += 1;
676 biasSat->Biases[ii].Type = CODETYPEGPS_L1_P;
677 biasSat->Biases[ii].Bias = it.value();
678 }
679 else if (it.key() == "1W") {
680 int ii = biasSat->NumberOfCodeBiases;
681 if (ii >= CLOCKORBIT_NUMBIAS)
682 break;
683 biasSat->NumberOfCodeBiases += 1;
684 biasSat->Biases[ii].Type = CODETYPEGPS_L1_Z;
685 biasSat->Biases[ii].Bias = it.value();
686 }
687 else if (it.key() == "2C") {
688 int ii = biasSat->NumberOfCodeBiases;
689 if (ii >= CLOCKORBIT_NUMBIAS)
690 break;
691 biasSat->NumberOfCodeBiases += 1;
692 biasSat->Biases[ii].Type = CODETYPEGPS_L2_CA;
693 biasSat->Biases[ii].Bias = it.value();
694 }
695 else if (it.key() == "2D") {
696 int ii = biasSat->NumberOfCodeBiases;
697 if (ii >= CLOCKORBIT_NUMBIAS)
698 break;
699 biasSat->NumberOfCodeBiases += 1;
700 biasSat->Biases[ii].Type = CODETYPEGPS_SEMI_CODELESS;
701 biasSat->Biases[ii].Bias = it.value();
702 }
703 else if (it.key() == "2S") {
704 int ii = biasSat->NumberOfCodeBiases;
705 if (ii >= CLOCKORBIT_NUMBIAS)
706 break;
707 biasSat->NumberOfCodeBiases += 1;
708 biasSat->Biases[ii].Type = CODETYPEGPS_L2C_M;
709 biasSat->Biases[ii].Bias = it.value();
710 }
711 else if (it.key() == "2L") {
712 int ii = biasSat->NumberOfCodeBiases;
713 if (ii >= CLOCKORBIT_NUMBIAS)
714 break;
715 biasSat->NumberOfCodeBiases += 1;
716 biasSat->Biases[ii].Type = CODETYPEGPS_L2C_L;
717 biasSat->Biases[ii].Bias = it.value();
718 }
719#ifdef USE_SSR_RTCM
720 else if (it.key() == "2X") {
721 int ii = biasSat->NumberOfCodeBiases;
722 if (ii >= CLOCKORBIT_NUMBIAS)
723 break;
724 biasSat->NumberOfCodeBiases += 1;
725 biasSat->Biases[ii].Type = CODETYPEGPS_L2C_ML;
726 biasSat->Biases[ii].Bias = it.value();
727 }
728#endif
729 else if (it.key() == "2P") {
730 int ii = biasSat->NumberOfCodeBiases;
731 if (ii >= CLOCKORBIT_NUMBIAS)
732 break;
733 biasSat->NumberOfCodeBiases += 1;
734 biasSat->Biases[ii].Type = CODETYPEGPS_L2_P;
735 biasSat->Biases[ii].Bias = it.value();
736 }
737 else if (it.key() == "2W") {
738 int ii = biasSat->NumberOfCodeBiases;
739 if (ii >= CLOCKORBIT_NUMBIAS)
740 break;
741 biasSat->NumberOfCodeBiases += 1;
742 biasSat->Biases[ii].Type = CODETYPEGPS_L2_Z;
743 biasSat->Biases[ii].Bias = it.value();
744 }
745 else if (it.key() == "5I") {
746 int ii = biasSat->NumberOfCodeBiases;
747 if (ii >= CLOCKORBIT_NUMBIAS)
748 break;
749 biasSat->NumberOfCodeBiases += 1;
750 biasSat->Biases[ii].Type = CODETYPEGPS_L5_I;
751 biasSat->Biases[ii].Bias = it.value();
752 }
753 else if (it.key() == "5Q") {
754 int ii = biasSat->NumberOfCodeBiases;
755 if (ii >= CLOCKORBIT_NUMBIAS)
756 break;
757 biasSat->NumberOfCodeBiases += 1;
758 biasSat->Biases[ii].Type = CODETYPEGPS_L5_Q;
759 biasSat->Biases[ii].Bias = it.value();
760 }
761#ifdef USE_SSR_RTCM
762 else if (it.key() == "5X") {
763 int ii = biasSat->NumberOfCodeBiases;
764 if (ii >= CLOCKORBIT_NUMBIAS)
765 break;
766 biasSat->NumberOfCodeBiases += 1;
767 biasSat->Biases[ii].Type = CODETYPEGPS_L5_IQ;
768 biasSat->Biases[ii].Bias = it.value();
769 }
770#endif
771 }
772 }
773 else if (prn.system() == 'R') {
774 QMapIterator<QString, double> it(codeBiases);
775 while (it.hasNext()) {
776 it.next();
777 if (it.key() == "1C") {
778 int ii = biasSat->NumberOfCodeBiases;
779 if (ii >= CLOCKORBIT_NUMBIAS)
780 break;
781 biasSat->NumberOfCodeBiases += 1;
782 biasSat->Biases[ii].Type = CODETYPEGLONASS_L1_CA;
783 biasSat->Biases[ii].Bias = it.value();
784 }
785 else if (it.key() == "1P") {
786 int ii = biasSat->NumberOfCodeBiases;
787 if (ii >= CLOCKORBIT_NUMBIAS)
788 break;
789 biasSat->NumberOfCodeBiases += 1;
790 biasSat->Biases[ii].Type = CODETYPEGLONASS_L1_P;
791 biasSat->Biases[ii].Bias = it.value();
792 }
793 else if (it.key() == "2C") {
794 int ii = biasSat->NumberOfCodeBiases;
795 if (ii >= CLOCKORBIT_NUMBIAS)
796 break;
797 biasSat->NumberOfCodeBiases += 1;
798 biasSat->Biases[ii].Type = CODETYPEGLONASS_L2_CA;
799 biasSat->Biases[ii].Bias = it.value();
800 }
801 else if (it.key() == "2P") {
802 int ii = biasSat->NumberOfCodeBiases;
803 if (ii >= CLOCKORBIT_NUMBIAS)
804 break;
805 biasSat->NumberOfCodeBiases += 1;
806 biasSat->Biases[ii].Type = CODETYPEGLONASS_L2_P;
807 biasSat->Biases[ii].Bias = it.value();
808 }
809 else if (it.key() == "4A") {
810 int ii = biasSat->NumberOfCodeBiases;
811 if (ii >= CLOCKORBIT_NUMBIAS)
812 break;
813 biasSat->NumberOfCodeBiases += 1;
814 biasSat->Biases[ii].Type = CODETYPEGLONASS_L1a_OCd;
815 biasSat->Biases[ii].Bias = it.value();
816 }
817 else if (it.key() == "4B") {
818 int ii = biasSat->NumberOfCodeBiases;
819 if (ii >= CLOCKORBIT_NUMBIAS)
820 break;
821 biasSat->NumberOfCodeBiases += 1;
822 biasSat->Biases[ii].Type = CODETYPEGLONASS_L1a_OCp;
823 biasSat->Biases[ii].Bias = it.value();
824 }
825#ifdef USE_SSR_RTCM
826 else if (it.key() == "4X") {
827 int ii = biasSat->NumberOfCodeBiases;
828 if (ii >= CLOCKORBIT_NUMBIAS)
829 break;
830 biasSat->NumberOfCodeBiases += 1;
831 biasSat->Biases[ii].Type = CODETYPEGLONASS_L1a_OCdp;
832 biasSat->Biases[ii].Bias = it.value();
833 }
834#endif
835 else if (it.key() == "6A") {
836 int ii = biasSat->NumberOfCodeBiases;
837 if (ii >= CLOCKORBIT_NUMBIAS)
838 break;
839 biasSat->NumberOfCodeBiases += 1;
840 biasSat->Biases[ii].Type = CODETYPEGLONASS_L2a_CSI;
841 biasSat->Biases[ii].Bias = it.value();
842 }
843 else if (it.key() == "6B") {
844 int ii = biasSat->NumberOfCodeBiases;
845 if (ii >= CLOCKORBIT_NUMBIAS)
846 break;
847 biasSat->NumberOfCodeBiases += 1;
848 biasSat->Biases[ii].Type = CODETYPEGLONASS_L2a_OCp;
849 biasSat->Biases[ii].Bias = it.value();
850 }
851#ifdef USE_SSR_RTCM
852 else if (it.key() == "6X") {
853 int ii = biasSat->NumberOfCodeBiases;
854 if (ii >= CLOCKORBIT_NUMBIAS)
855 break;
856 biasSat->NumberOfCodeBiases += 1;
857 biasSat->Biases[ii].Type = CODETYPEGLONASS_L2a_CSIOCp;
858 biasSat->Biases[ii].Bias = it.value();
859 }
860#endif
861 else if (it.key() == "3I") {
862 int ii = biasSat->NumberOfCodeBiases;
863 if (ii >= CLOCKORBIT_NUMBIAS)
864 break;
865 biasSat->NumberOfCodeBiases += 1;
866 biasSat->Biases[ii].Type = CODETYPEGLONASS_L3_I;
867 biasSat->Biases[ii].Bias = it.value();
868 }
869 else if (it.key() == "3Q") {
870 int ii = biasSat->NumberOfCodeBiases;
871 if (ii >= CLOCKORBIT_NUMBIAS)
872 break;
873 biasSat->NumberOfCodeBiases += 1;
874 biasSat->Biases[ii].Type = CODETYPEGLONASS_L3_Q;
875 biasSat->Biases[ii].Bias = it.value();
876 }
877#ifdef USE_SSR_RTCM
878 else if (it.key() == "3X") {
879 int ii = biasSat->NumberOfCodeBiases;
880 if (ii >= CLOCKORBIT_NUMBIAS)
881 break;
882 biasSat->NumberOfCodeBiases += 1;
883 biasSat->Biases[ii].Type = CODETYPEGLONASS_L3_IQ;
884 biasSat->Biases[ii].Bias = it.value();
885 }
886#endif
887 }
888 }
889 else if (prn.system() == 'E') {
890 QMapIterator<QString, double> it(codeBiases);
891 while (it.hasNext()) {
892 it.next();
893 if (it.key() == "1A") {
894 int ii = biasSat->NumberOfCodeBiases;
895 if (ii >= CLOCKORBIT_NUMBIAS)
896 break;
897 biasSat->NumberOfCodeBiases += 1;
898 biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_A;
899 biasSat->Biases[ii].Bias = it.value();
900 }
901 else if (it.key() == "1B") {
902 int ii = biasSat->NumberOfCodeBiases;
903 if (ii >= CLOCKORBIT_NUMBIAS)
904 break;
905 biasSat->NumberOfCodeBiases += 1;
906 biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_B;
907 biasSat->Biases[ii].Bias = it.value();
908 }
909 else if (it.key() == "1C") {
910 int ii = biasSat->NumberOfCodeBiases;
911 if (ii >= CLOCKORBIT_NUMBIAS)
912 break;
913 biasSat->NumberOfCodeBiases += 1;
914 biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_C;
915 biasSat->Biases[ii].Bias = it.value();
916 }
917#ifdef USE_SSR_RTCM
918 else if (it.key() == "1X") {
919 int ii = biasSat->NumberOfCodeBiases;
920 if (ii >= CLOCKORBIT_NUMBIAS)
921 break;
922 biasSat->NumberOfCodeBiases += 1;
923 biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_BC;
924 biasSat->Biases[ii].Bias = it.value();
925 }
926 else if (it.key() == "1Z") {
927 int ii = biasSat->NumberOfCodeBiases;
928 if (ii >= CLOCKORBIT_NUMBIAS)
929 break;
930 biasSat->NumberOfCodeBiases += 1;
931 biasSat->Biases[ii].Type = CODETYPEGALILEO_E1_ABC;
932 biasSat->Biases[ii].Bias = it.value();
933 }
934#endif
935 else if (it.key() == "5I") {
936 int ii = biasSat->NumberOfCodeBiases;
937 if (ii >= CLOCKORBIT_NUMBIAS)
938 break;
939 biasSat->NumberOfCodeBiases += 1;
940 biasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_I;
941 biasSat->Biases[ii].Bias = it.value();
942 }
943 else if (it.key() == "5Q") {
944 int ii = biasSat->NumberOfCodeBiases;
945 if (ii >= CLOCKORBIT_NUMBIAS)
946 break;
947 biasSat->NumberOfCodeBiases += 1;
948 biasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_Q;
949 biasSat->Biases[ii].Bias = it.value();
950 }
951#ifdef USE_SSR_RTCM
952 else if (it.key() == "5X") {
953 int ii = biasSat->NumberOfCodeBiases;
954 if (ii >= CLOCKORBIT_NUMBIAS)
955 break;
956 biasSat->NumberOfCodeBiases += 1;
957 biasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_IQ;
958 biasSat->Biases[ii].Bias = it.value();
959 }
960#endif
961 else if (it.key() == "7I") {
962 int ii = biasSat->NumberOfCodeBiases;
963 if (ii >= CLOCKORBIT_NUMBIAS)
964 break;
965 biasSat->NumberOfCodeBiases += 1;
966 biasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_I;
967 biasSat->Biases[ii].Bias = it.value();
968 }
969 else if (it.key() == "7Q") {
970 int ii = biasSat->NumberOfCodeBiases;
971 if (ii >= CLOCKORBIT_NUMBIAS)
972 break;
973 biasSat->NumberOfCodeBiases += 1;
974 biasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_Q;
975 biasSat->Biases[ii].Bias = it.value();
976 }
977#ifdef USE_SSR_RTCM
978 else if (it.key() == "7X") {
979 int ii = biasSat->NumberOfCodeBiases;
980 if (ii >= CLOCKORBIT_NUMBIAS)
981 break;
982 biasSat->NumberOfCodeBiases += 1;
983 biasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_IQ;
984 biasSat->Biases[ii].Bias = it.value();
985 }
986 else if (it.key() == "8I") {
987 int ii = biasSat->NumberOfCodeBiases;
988 if (ii >= CLOCKORBIT_NUMBIAS)
989 break;
990 biasSat->NumberOfCodeBiases += 1;
991 biasSat->Biases[ii].Type = CODETYPEGALILEO_E5_I;
992 biasSat->Biases[ii].Bias = it.value();
993 }
994 else if (it.key() == "8Q") {
995 int ii = biasSat->NumberOfCodeBiases;
996 if (ii >= CLOCKORBIT_NUMBIAS)
997 break;
998 biasSat->NumberOfCodeBiases += 1;
999 biasSat->Biases[ii].Type = CODETYPEGALILEO_E5_Q;
1000 biasSat->Biases[ii].Bias = it.value();
1001 }
1002 else if (it.key() == "8X") {
1003 int ii = biasSat->NumberOfCodeBiases;
1004 if (ii >= CLOCKORBIT_NUMBIAS)
1005 break;
1006 biasSat->NumberOfCodeBiases += 1;
1007 biasSat->Biases[ii].Type = CODETYPEGALILEO_E5_IQ;
1008 biasSat->Biases[ii].Bias = it.value();
1009 }
1010#endif
1011 else if (it.key() == "6A") {
1012 int ii = biasSat->NumberOfCodeBiases;
1013 if (ii >= CLOCKORBIT_NUMBIAS)
1014 break;
1015 biasSat->NumberOfCodeBiases += 1;
1016 biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_A;
1017 biasSat->Biases[ii].Bias = it.value();
1018 }
1019 else if (it.key() == "6B") {
1020 int ii = biasSat->NumberOfCodeBiases;
1021 if (ii >= CLOCKORBIT_NUMBIAS)
1022 break;
1023 biasSat->NumberOfCodeBiases += 1;
1024 biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_B;
1025 biasSat->Biases[ii].Bias = it.value();
1026 }
1027 else if (it.key() == "6C") {
1028 int ii = biasSat->NumberOfCodeBiases;
1029 if (ii >= CLOCKORBIT_NUMBIAS)
1030 break;
1031 biasSat->NumberOfCodeBiases += 1;
1032 biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_C;
1033 biasSat->Biases[ii].Bias = it.value();
1034 }
1035#ifdef USE_SSR_RTCM
1036 else if (it.key() == "6X") {
1037 int ii = biasSat->NumberOfCodeBiases;
1038 if (ii >= CLOCKORBIT_NUMBIAS)
1039 break;
1040 biasSat->NumberOfCodeBiases += 1;
1041 biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_BC;
1042 biasSat->Biases[ii].Bias = it.value();
1043 }
1044 else if (it.key() == "6Z") {
1045 int ii = biasSat->NumberOfCodeBiases;
1046 if (ii >= CLOCKORBIT_NUMBIAS)
1047 break;
1048 biasSat->NumberOfCodeBiases += 1;
1049 biasSat->Biases[ii].Type = CODETYPEGALILEO_E6_ABC;
1050 biasSat->Biases[ii].Bias = it.value();
1051 }
1052#endif
1053 }
1054 }
1055 else if (prn.system() == 'J') {
1056 QMapIterator<QString, double> it(codeBiases);
1057 while (it.hasNext()) {
1058 it.next();
1059 if (it.key() == "1C") {
1060 int ii = biasSat->NumberOfCodeBiases;
1061 if (ii >= CLOCKORBIT_NUMBIAS)
1062 break;
1063 biasSat->NumberOfCodeBiases += 1;
1064 biasSat->Biases[ii].Type = CODETYPEQZSS_L1_CA;
1065 biasSat->Biases[ii].Bias = it.value();
1066 }
1067 else if (it.key() == "1S") {
1068 int ii = biasSat->NumberOfCodeBiases;
1069 if (ii >= CLOCKORBIT_NUMBIAS)
1070 break;
1071 biasSat->NumberOfCodeBiases += 1;
1072 biasSat->Biases[ii].Type = CODETYPEQZSS_L1C_D;
1073 biasSat->Biases[ii].Bias = it.value();
1074 }
1075 else if (it.key() == "1L") {
1076 int ii = biasSat->NumberOfCodeBiases;
1077 if (ii >= CLOCKORBIT_NUMBIAS)
1078 break;
1079 biasSat->NumberOfCodeBiases += 1;
1080 biasSat->Biases[ii].Type = CODETYPEQZSS_L1C_P;
1081 biasSat->Biases[ii].Bias = it.value();
1082 }
1083 else if (it.key() == "2S") {
1084 int ii = biasSat->NumberOfCodeBiases;
1085 if (ii >= CLOCKORBIT_NUMBIAS)
1086 break;
1087 biasSat->NumberOfCodeBiases += 1;
1088 biasSat->Biases[ii].Type = CODETYPEQZSS_L2C_M;
1089 biasSat->Biases[ii].Bias = it.value();
1090 }
1091 else if (it.key() == "2L") {
1092 int ii = biasSat->NumberOfCodeBiases;
1093 if (ii >= CLOCKORBIT_NUMBIAS)
1094 break;
1095 biasSat->NumberOfCodeBiases += 1;
1096 biasSat->Biases[ii].Type = CODETYPEQZSS_L2C_L;
1097 biasSat->Biases[ii].Bias = it.value();
1098 }
1099#ifdef USE_SSR_RTCM
1100 else if (it.key() == "2X") {
1101 int ii = biasSat->NumberOfCodeBiases;
1102 if (ii >= CLOCKORBIT_NUMBIAS)
1103 break;
1104 biasSat->NumberOfCodeBiases += 1;
1105 biasSat->Biases[ii].Type = CODETYPEQZSS_L2C_ML;
1106 biasSat->Biases[ii].Bias = it.value();
1107 }
1108#endif
1109 else if (it.key() == "5I") {
1110 int ii = biasSat->NumberOfCodeBiases;
1111 if (ii >= CLOCKORBIT_NUMBIAS)
1112 break;
1113 biasSat->NumberOfCodeBiases += 1;
1114 biasSat->Biases[ii].Type = CODETYPEQZSS_L5_I;
1115 biasSat->Biases[ii].Bias = it.value();
1116 }
1117 else if (it.key() == "5Q") {
1118 int ii = biasSat->NumberOfCodeBiases;
1119 if (ii >= CLOCKORBIT_NUMBIAS)
1120 break;
1121 biasSat->NumberOfCodeBiases += 1;
1122 biasSat->Biases[ii].Type = CODETYPEQZSS_L5_Q;
1123 biasSat->Biases[ii].Bias = it.value();
1124 }
1125#ifdef USE_SSR_RTCM
1126 else if (it.key() == "5X") {
1127 int ii = biasSat->NumberOfCodeBiases;
1128 if (ii >= CLOCKORBIT_NUMBIAS)
1129 break;
1130 biasSat->NumberOfCodeBiases += 1;
1131 biasSat->Biases[ii].Type = CODETYPEQZSS_L5_IQ;
1132 biasSat->Biases[ii].Bias = it.value();
1133 }
1134#endif
1135 else if (it.key() == "6S") {
1136 int ii = biasSat->NumberOfCodeBiases;
1137 if (ii >= CLOCKORBIT_NUMBIAS)
1138 break;
1139 biasSat->NumberOfCodeBiases += 1;
1140 biasSat->Biases[ii].Type = CODETYPEQZSS_L6_D;
1141 biasSat->Biases[ii].Bias = it.value();
1142 }
1143 else if (it.key() == "6L") {
1144 int ii = biasSat->NumberOfCodeBiases;
1145 if (ii >= CLOCKORBIT_NUMBIAS)
1146 break;
1147 biasSat->NumberOfCodeBiases += 1;
1148 biasSat->Biases[ii].Type = CODETYPEQZSS_L6_P;
1149 biasSat->Biases[ii].Bias = it.value();
1150 }
1151#ifdef USE_SSR_RTCM
1152 else if (it.key() == "6X") {
1153 int ii = biasSat->NumberOfCodeBiases;
1154 if (ii >= CLOCKORBIT_NUMBIAS)
1155 break;
1156 biasSat->NumberOfCodeBiases += 1;
1157 biasSat->Biases[ii].Type = CODETYPEQZSS_L6_DP;
1158 biasSat->Biases[ii].Bias = it.value();
1159 }
1160 else if (it.key() == "1X") {
1161 int ii = biasSat->NumberOfCodeBiases;
1162 if (ii >= CLOCKORBIT_NUMBIAS)
1163 break;
1164 biasSat->NumberOfCodeBiases += 1;
1165 biasSat->Biases[ii].Type = CODETYPEQZSS_L1C_DP;
1166 biasSat->Biases[ii].Bias = it.value();
1167 }
1168 else if (it.key() == "1Z") {
1169 int ii = biasSat->NumberOfCodeBiases;
1170 if (ii >= CLOCKORBIT_NUMBIAS)
1171 break;
1172 biasSat->NumberOfCodeBiases += 1;
1173 biasSat->Biases[ii].Type = CODETYPEQZSS_L1_S;
1174 biasSat->Biases[ii].Bias = it.value();
1175 }
1176 else if (it.key() == "5D") {
1177 int ii = biasSat->NumberOfCodeBiases;
1178 if (ii >= CLOCKORBIT_NUMBIAS)
1179 break;
1180 biasSat->NumberOfCodeBiases += 1;
1181 biasSat->Biases[ii].Type = CODETYPEQZSS_L5_D;
1182 biasSat->Biases[ii].Bias = it.value();
1183 }
1184 else if (it.key() == "5P") {
1185 int ii = biasSat->NumberOfCodeBiases;
1186 if (ii >= CLOCKORBIT_NUMBIAS)
1187 break;
1188 biasSat->NumberOfCodeBiases += 1;
1189 biasSat->Biases[ii].Type = CODETYPEQZSS_L5_P;
1190 biasSat->Biases[ii].Bias = it.value();
1191 }
1192 else if (it.key() == "5Z") {
1193 int ii = biasSat->NumberOfCodeBiases;
1194 if (ii >= CLOCKORBIT_NUMBIAS)
1195 break;
1196 biasSat->NumberOfCodeBiases += 1;
1197 biasSat->Biases[ii].Type = CODETYPEQZSS_L5_DP;
1198 biasSat->Biases[ii].Bias = it.value();
1199 }
1200#endif
1201 else if (it.key() == "6E") {
1202 int ii = biasSat->NumberOfCodeBiases;
1203 if (ii >= CLOCKORBIT_NUMBIAS)
1204 break;
1205 biasSat->NumberOfCodeBiases += 1;
1206 biasSat->Biases[ii].Type = CODETYPEQZSS_L6_E;
1207 biasSat->Biases[ii].Bias = it.value();
1208 }
1209#ifdef USE_SSR_RTCM
1210 else if (it.key() == "6Z") {
1211 int ii = biasSat->NumberOfCodeBiases;
1212 if (ii >= CLOCKORBIT_NUMBIAS)
1213 break;
1214 biasSat->NumberOfCodeBiases += 1;
1215 biasSat->Biases[ii].Type = CODETYPEQZSS_L6_DE;
1216 biasSat->Biases[ii].Bias = it.value();
1217 }
1218#endif
1219 }
1220 }
1221 else if (prn.system() == 'S') {
1222 QMapIterator<QString, double> it(codeBiases);
1223 while (it.hasNext()) {
1224 it.next();
1225 if (it.key() == "1C") {
1226 int ii = biasSat->NumberOfCodeBiases;
1227 if (ii >= CLOCKORBIT_NUMBIAS)
1228 break;
1229 biasSat->NumberOfCodeBiases += 1;
1230 biasSat->Biases[ii].Type = CODETYPE_SBAS_L1_CA;
1231 biasSat->Biases[ii].Bias = it.value();
1232 }
1233 else if (it.key() == "5I") {
1234 int ii = biasSat->NumberOfCodeBiases;
1235 if (ii >= CLOCKORBIT_NUMBIAS)
1236 break;
1237 biasSat->NumberOfCodeBiases += 1;
1238 biasSat->Biases[ii].Type = CODETYPE_SBAS_L5_I;
1239 biasSat->Biases[ii].Bias = it.value();
1240 }
1241 else if (it.key() == "5Q") {
1242 int ii = biasSat->NumberOfCodeBiases;
1243 if (ii >= CLOCKORBIT_NUMBIAS)
1244 break;
1245 biasSat->NumberOfCodeBiases += 1;
1246 biasSat->Biases[ii].Type = CODETYPE_SBAS_L5_Q;
1247 biasSat->Biases[ii].Bias = it.value();
1248 }
1249#ifdef USE_SSR_RTCM
1250 else if (it.key() == "5X") {
1251 int ii = biasSat->NumberOfCodeBiases;
1252 if (ii >= CLOCKORBIT_NUMBIAS)
1253 break;
1254 biasSat->NumberOfCodeBiases += 1;
1255 biasSat->Biases[ii].Type = CODETYPE_SBAS_L5_IQ;
1256 biasSat->Biases[ii].Bias = it.value();
1257 }
1258#endif
1259 }
1260 }
1261 else if (prn.system() == 'C') {
1262 QMapIterator<QString, double> it(codeBiases);
1263 while (it.hasNext()) {
1264 it.next();
1265 if (it.key() == "2I") {
1266 int ii = biasSat->NumberOfCodeBiases;
1267 if (ii >= CLOCKORBIT_NUMBIAS)
1268 break;
1269 biasSat->NumberOfCodeBiases += 1;
1270 biasSat->Biases[ii].Type = CODETYPE_BDS_B1_I;
1271 biasSat->Biases[ii].Bias = it.value();
1272 }
1273 else if (it.key() == "2Q") {
1274 int ii = biasSat->NumberOfCodeBiases;
1275 if (ii >= CLOCKORBIT_NUMBIAS)
1276 break;
1277 biasSat->NumberOfCodeBiases += 1;
1278 biasSat->Biases[ii].Type = CODETYPE_BDS_B1_Q;
1279 biasSat->Biases[ii].Bias = it.value();
1280 }
1281#ifdef USE_SSR_RTCM
1282 else if (it.key() == "2X") {
1283 int ii = biasSat->NumberOfCodeBiases;
1284 if (ii >= CLOCKORBIT_NUMBIAS)
1285 break;
1286 biasSat->NumberOfCodeBiases += 1;
1287 biasSat->Biases[ii].Type = CODETYPE_BDS_B1_IQ;
1288 biasSat->Biases[ii].Bias = it.value();
1289 }
1290#endif
1291 else if (it.key() == "6I") {
1292 int ii = biasSat->NumberOfCodeBiases;
1293 if (ii >= CLOCKORBIT_NUMBIAS)
1294 break;
1295 biasSat->NumberOfCodeBiases += 1;
1296 biasSat->Biases[ii].Type = CODETYPE_BDS_B3_I;
1297 biasSat->Biases[ii].Bias = it.value();
1298 }
1299 else if (it.key() == "6Q") {
1300 int ii = biasSat->NumberOfCodeBiases;
1301 if (ii >= CLOCKORBIT_NUMBIAS)
1302 break;
1303 biasSat->NumberOfCodeBiases += 1;
1304 biasSat->Biases[ii].Type = CODETYPE_BDS_B3_Q;
1305 biasSat->Biases[ii].Bias = it.value();
1306 }
1307#ifdef USE_SSR_RTCM
1308 else if (it.key() == "6X") {
1309 int ii = biasSat->NumberOfCodeBiases;
1310 if (ii >= CLOCKORBIT_NUMBIAS)
1311 break;
1312 biasSat->NumberOfCodeBiases += 1;
1313 biasSat->Biases[ii].Type = CODETYPE_BDS_B3_IQ;
1314 biasSat->Biases[ii].Bias = it.value();
1315 }
1316#endif
1317 else if (it.key() == "7I") {
1318 int ii = biasSat->NumberOfCodeBiases;
1319 if (ii >= CLOCKORBIT_NUMBIAS)
1320 break;
1321 biasSat->NumberOfCodeBiases += 1;
1322 biasSat->Biases[ii].Type = CODETYPE_BDS_B2_I;
1323 biasSat->Biases[ii].Bias = it.value();
1324 }
1325 else if (it.key() == "7Q") {
1326 int ii = biasSat->NumberOfCodeBiases;
1327 if (ii >= CLOCKORBIT_NUMBIAS)
1328 break;
1329 biasSat->NumberOfCodeBiases += 1;
1330 biasSat->Biases[ii].Type = CODETYPE_BDS_B2_Q;
1331 biasSat->Biases[ii].Bias = it.value();
1332 }
1333#ifdef USE_SSR_RTCM
1334 else if (it.key() == "7X") {
1335 int ii = biasSat->NumberOfCodeBiases;
1336 if (ii >= CLOCKORBIT_NUMBIAS)
1337 break;
1338 biasSat->NumberOfCodeBiases += 1;
1339 biasSat->Biases[ii].Type = CODETYPE_BDS_B2_IQ;
1340 biasSat->Biases[ii].Bias = it.value();
1341 }
1342#endif
1343 else if (it.key() == "1D") {
1344 int ii = biasSat->NumberOfCodeBiases;
1345 if (ii >= CLOCKORBIT_NUMBIAS)
1346 break;
1347 biasSat->NumberOfCodeBiases += 1;
1348 biasSat->Biases[ii].Type = CODETYPE_BDS_B1a_D;
1349 biasSat->Biases[ii].Bias = it.value();
1350 }
1351 else if (it.key() == "1P") {
1352 int ii = biasSat->NumberOfCodeBiases;
1353 if (ii >= CLOCKORBIT_NUMBIAS)
1354 break;
1355 biasSat->NumberOfCodeBiases += 1;
1356 biasSat->Biases[ii].Type = CODETYPE_BDS_B1a_P;
1357 biasSat->Biases[ii].Bias = it.value();
1358 }
1359#ifdef USE_SSR_RTCM
1360 else if (it.key() == "1X") {
1361 int ii = biasSat->NumberOfCodeBiases;
1362 if (ii >= CLOCKORBIT_NUMBIAS)
1363 break;
1364 biasSat->NumberOfCodeBiases += 1;
1365 biasSat->Biases[ii].Type = CODETYPE_BDS_B1a_DP;
1366 biasSat->Biases[ii].Bias = it.value();
1367 }
1368#endif
1369 else if (it.key() == "5D") {
1370 int ii = biasSat->NumberOfCodeBiases;
1371 if (ii >= CLOCKORBIT_NUMBIAS)
1372 break;
1373 biasSat->NumberOfCodeBiases += 1;
1374 biasSat->Biases[ii].Type = CODETYPE_BDS_B2a_D;
1375 biasSat->Biases[ii].Bias = it.value();
1376 }
1377 else if (it.key() == "5P") {
1378 int ii = biasSat->NumberOfCodeBiases;
1379 if (ii >= CLOCKORBIT_NUMBIAS)
1380 break;
1381 biasSat->NumberOfCodeBiases += 1;
1382 biasSat->Biases[ii].Type = CODETYPE_BDS_B2a_P;
1383 biasSat->Biases[ii].Bias = it.value();
1384 }
1385#ifdef USE_SSR_RTCM
1386 else if (it.key() == "5X") {
1387 int ii = biasSat->NumberOfCodeBiases;
1388 if (ii >= CLOCKORBIT_NUMBIAS)
1389 break;
1390 biasSat->NumberOfCodeBiases += 1;
1391 biasSat->Biases[ii].Type = CODETYPE_BDS_B2a_DP;
1392 biasSat->Biases[ii].Bias = it.value();
1393 }
1394#elif USE_SSR_IGS
1395 else if (it.key() == "1A") {
1396 int ii = biasSat->NumberOfCodeBiases;
1397 if (ii >= CLOCKORBIT_NUMBIAS)
1398 break;
1399 biasSat->NumberOfCodeBiases += 1;
1400 biasSat->Biases[ii].Type = CODETYPE_BDS_B1_A;
1401 biasSat->Biases[ii].Bias = it.value();
1402 }
1403 else if (it.key() == "6A") {
1404 int ii = biasSat->NumberOfCodeBiases;
1405 if (ii >= CLOCKORBIT_NUMBIAS)
1406 break;
1407 biasSat->NumberOfCodeBiases += 1;
1408 biasSat->Biases[ii].Type = CODETYPE_BDS_B3_A;
1409 biasSat->Biases[ii].Bias = it.value();
1410 }
1411#endif
1412 }
1413 }
1414 }
1415
1416 // Phase Biases
1417 // ------------
1418 struct PhaseBias::PhaseBiasSat* phasebiasSat = 0;
1419 if (prn.system() == 'G') {
1420 phasebiasSat = phasebias.Sat
1421 + phasebias.NumberOfSat[CLOCKORBIT_SATGPS];
1422 ++phasebias.NumberOfSat[CLOCKORBIT_SATGPS];
1423 }
1424 else if (prn.system() == 'R') {
1425 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS
1426 + phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS];
1427 ++phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS];
1428 }
1429 else if (prn.system() == 'E') {
1430 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
1431 + phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO];
1432 ++phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO];
1433 }
1434 else if (prn.system() == 'J') {
1435 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
1436 + CLOCKORBIT_NUMGALILEO
1437 + phasebias.NumberOfSat[CLOCKORBIT_SATQZSS];
1438 ++phasebias.NumberOfSat[CLOCKORBIT_SATQZSS];
1439 }
1440 else if (prn.system() == 'S') {
1441 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
1442 + CLOCKORBIT_NUMGALILEO + CLOCKORBIT_NUMQZSS
1443 + phasebias.NumberOfSat[CLOCKORBIT_SATSBAS];
1444 ++phasebias.NumberOfSat[CLOCKORBIT_SATSBAS];
1445 }
1446 else if (prn.system() == 'C') {
1447 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
1448 + CLOCKORBIT_NUMGALILEO + CLOCKORBIT_NUMQZSS
1449 + CLOCKORBIT_NUMSBAS
1450 + phasebias.NumberOfSat[CLOCKORBIT_SATBDS];
1451 ++phasebias.NumberOfSat[CLOCKORBIT_SATBDS];
1452 }
1453
1454 if (phasebiasSat) {
1455 phasebias.DispersiveBiasConsistencyIndicator = dispersiveBiasConsistenyIndicator;
1456 phasebias.MWConsistencyIndicator = mwConsistencyIndicator;
1457 phasebiasSat->ID = prn.number();
1458 phasebiasSat->NumberOfPhaseBiases = 0;
1459 phasebiasSat->YawAngle = pbSat.yawAngle;
1460 phasebiasSat->YawRate = pbSat.yawRate;
1461 if (prn.system() == 'G') {
1462 QListIterator<phaseBiasSignal> it(phaseBiasList);
1463 while (it.hasNext()) {
1464 const phaseBiasSignal &pbSig = it.next();
1465 if (pbSig.type == "1C") {
1466 int ii = phasebiasSat->NumberOfPhaseBiases;
1467 if (ii >= CLOCKORBIT_NUMBIAS)
1468 break;
1469 phasebiasSat->NumberOfPhaseBiases += 1;
1470 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1_CA;
1471 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1472 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1473 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1474 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1475 }
1476 else if (pbSig.type == "1P") {
1477 int ii = phasebiasSat->NumberOfPhaseBiases;
1478 if (ii >= CLOCKORBIT_NUMBIAS)
1479 break;
1480 phasebiasSat->NumberOfPhaseBiases += 1;
1481 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1_P;
1482 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1483 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1484 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1485 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1486 }
1487 else if (pbSig.type == "1W") {
1488 int ii = phasebiasSat->NumberOfPhaseBiases;
1489 if (ii >= CLOCKORBIT_NUMBIAS)
1490 break;
1491 phasebiasSat->NumberOfPhaseBiases += 1;
1492 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1_Z;
1493 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1494 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1495 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1496 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1497 }
1498 else if (pbSig.type == "2C") {
1499 int ii = phasebiasSat->NumberOfPhaseBiases;
1500 if (ii >= CLOCKORBIT_NUMBIAS)
1501 break;
1502 phasebiasSat->NumberOfPhaseBiases += 1;
1503 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_CA;
1504 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1505 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1506 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1507 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1508 }
1509 else if (pbSig.type == "2D") {
1510 int ii = phasebiasSat->NumberOfPhaseBiases;
1511 if (ii >= CLOCKORBIT_NUMBIAS)
1512 break;
1513 phasebiasSat->NumberOfPhaseBiases += 1;
1514 phasebiasSat->Biases[ii].Type = CODETYPEGPS_SEMI_CODELESS;
1515 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1516 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1517 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1518 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1519 }
1520 else if (pbSig.type == "2S") {
1521 int ii = phasebiasSat->NumberOfPhaseBiases;
1522 if (ii >= CLOCKORBIT_NUMBIAS)
1523 break;
1524 phasebiasSat->NumberOfPhaseBiases += 1;
1525 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2C_M;
1526 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1527 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1528 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1529 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1530 }
1531 else if (pbSig.type == "2L") {
1532 int ii = phasebiasSat->NumberOfPhaseBiases;
1533 if (ii >= CLOCKORBIT_NUMBIAS)
1534 break;
1535 phasebiasSat->NumberOfPhaseBiases += 1;
1536 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2C_L;
1537 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1538 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1539 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1540 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1541 }
1542#ifdef USE_SSR_RTCM
1543 else if (pbSig.type == "2X") {
1544 int ii = phasebiasSat->NumberOfPhaseBiases;
1545 if (ii >= CLOCKORBIT_NUMBIAS)
1546 break;
1547 phasebiasSat->NumberOfPhaseBiases += 1;
1548 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2C_ML;
1549 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1550 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1551 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1552 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1553 }
1554#endif
1555 else if (pbSig.type == "2P") {
1556 int ii = phasebiasSat->NumberOfPhaseBiases;
1557 if (ii >= CLOCKORBIT_NUMBIAS)
1558 break;
1559 phasebiasSat->NumberOfPhaseBiases += 1;
1560 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_P;
1561 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1562 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1563 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1564 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1565 }
1566 else if (pbSig.type == "2W") {
1567 int ii = phasebiasSat->NumberOfPhaseBiases;
1568 if (ii >= CLOCKORBIT_NUMBIAS)
1569 break;
1570 phasebiasSat->NumberOfPhaseBiases += 1;
1571 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_Z;
1572 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1573 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1574 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1575 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1576 }
1577 else if (pbSig.type == "5I") {
1578 int ii = phasebiasSat->NumberOfPhaseBiases;
1579 if (ii >= CLOCKORBIT_NUMBIAS)
1580 break;
1581 phasebiasSat->NumberOfPhaseBiases += 1;
1582 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L5_I;
1583 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1584 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1585 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1586 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1587 }
1588 else if (pbSig.type == "5Q") {
1589 int ii = phasebiasSat->NumberOfPhaseBiases;
1590 if (ii >= CLOCKORBIT_NUMBIAS)
1591 break;
1592 phasebiasSat->NumberOfPhaseBiases += 1;
1593 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L5_Q;
1594 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1595 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1596 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1597 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1598 }
1599#ifdef USE_SSR_RTCM
1600 else if (pbSig.type == "5X") {
1601 int ii = phasebiasSat->NumberOfPhaseBiases;
1602 if (ii >= CLOCKORBIT_NUMBIAS)
1603 break;
1604 phasebiasSat->NumberOfPhaseBiases += 1;
1605 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L5_IQ;
1606 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1607 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1608 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1609 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1610 }
1611#endif
1612 else if (pbSig.type == "1S") {
1613 int ii = phasebiasSat->NumberOfPhaseBiases;
1614 if (ii >= CLOCKORBIT_NUMBIAS)
1615 break;
1616 phasebiasSat->NumberOfPhaseBiases += 1;
1617 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1C_D;
1618 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1619 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1620 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1621 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1622 }
1623 else if (pbSig.type == "1L") {
1624 int ii = phasebiasSat->NumberOfPhaseBiases;
1625 if (ii >= CLOCKORBIT_NUMBIAS)
1626 break;
1627 phasebiasSat->NumberOfPhaseBiases += 1;
1628 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1C_P;
1629 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1630 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1631 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1632 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1633 }
1634#ifdef USE_SSR_RTCM
1635 else if (pbSig.type == "1X") {
1636 int ii = phasebiasSat->NumberOfPhaseBiases;
1637 if (ii >= CLOCKORBIT_NUMBIAS)
1638 break;
1639 phasebiasSat->NumberOfPhaseBiases += 1;
1640 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1C_DP;
1641 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1642 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1643 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1644 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1645 }
1646#endif
1647 }
1648 }
1649 if (prn.system() == 'R') {
1650 QListIterator<phaseBiasSignal> it(phaseBiasList);
1651 while (it.hasNext()) {
1652 const phaseBiasSignal &pbSig = it.next();
1653 if (pbSig.type == "1C") {
1654 int ii = phasebiasSat->NumberOfPhaseBiases;
1655 if (ii >= CLOCKORBIT_NUMBIAS)
1656 break;
1657 phasebiasSat->NumberOfPhaseBiases += 1;
1658 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1_CA;
1659 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1660 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1661 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1662 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1663 }
1664 else if (pbSig.type == "1P") {
1665 int ii = phasebiasSat->NumberOfPhaseBiases;
1666 if (ii >= CLOCKORBIT_NUMBIAS)
1667 break;
1668 phasebiasSat->NumberOfPhaseBiases += 1;
1669 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1_P;
1670 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1671 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1672 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1673 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1674 }
1675 else if (pbSig.type == "2C") {
1676 int ii = phasebiasSat->NumberOfPhaseBiases;
1677 if (ii >= CLOCKORBIT_NUMBIAS)
1678 break;
1679 phasebiasSat->NumberOfPhaseBiases += 1;
1680 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2_CA;
1681 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1682 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1683 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1684 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1685 }
1686 else if (pbSig.type == "2P") {
1687 int ii = phasebiasSat->NumberOfPhaseBiases;
1688 if (ii >= CLOCKORBIT_NUMBIAS)
1689 break;
1690 phasebiasSat->NumberOfPhaseBiases += 1;
1691 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2_P;
1692 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1693 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1694 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1695 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1696 }
1697 else if (pbSig.type == "4A") {
1698 int ii = phasebiasSat->NumberOfPhaseBiases;
1699 if (ii >= CLOCKORBIT_NUMBIAS)
1700 break;
1701 phasebiasSat->NumberOfPhaseBiases += 1;
1702 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1a_OCd;
1703 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1704 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1705 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1706 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1707 }
1708 else if (pbSig.type == "4B") {
1709 int ii = phasebiasSat->NumberOfPhaseBiases;
1710 if (ii >= CLOCKORBIT_NUMBIAS)
1711 break;
1712 phasebiasSat->NumberOfPhaseBiases += 1;
1713 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1a_OCp;
1714 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1715 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1716 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1717 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1718 }
1719#ifdef USE_SSR_RTCM
1720 else if (pbSig.type == "4X") {
1721 int ii = phasebiasSat->NumberOfPhaseBiases;
1722 if (ii >= CLOCKORBIT_NUMBIAS)
1723 break;
1724 phasebiasSat->NumberOfPhaseBiases += 1;
1725 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1a_OCdp;
1726 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1727 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1728 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1729 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1730 }
1731#endif
1732 else if (pbSig.type == "6A") {
1733 int ii = phasebiasSat->NumberOfPhaseBiases;
1734 if (ii >= CLOCKORBIT_NUMBIAS)
1735 break;
1736 phasebiasSat->NumberOfPhaseBiases += 1;
1737 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2a_CSI;
1738 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1739 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1740 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1741 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1742 }
1743 else if (pbSig.type == "6B") {
1744 int ii = phasebiasSat->NumberOfPhaseBiases;
1745 if (ii >= CLOCKORBIT_NUMBIAS)
1746 break;
1747 phasebiasSat->NumberOfPhaseBiases += 1;
1748 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2a_OCp;
1749 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1750 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1751 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1752 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1753 }
1754#ifdef USE_SSR_RTCM
1755 else if (pbSig.type == "6X") {
1756 int ii = phasebiasSat->NumberOfPhaseBiases;
1757 if (ii >= CLOCKORBIT_NUMBIAS)
1758 break;
1759 phasebiasSat->NumberOfPhaseBiases += 1;
1760 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2a_CSIOCp;
1761 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1762 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1763 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1764 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1765 }
1766#endif
1767 else if (pbSig.type == "3I") {
1768 int ii = phasebiasSat->NumberOfPhaseBiases;
1769 if (ii >= CLOCKORBIT_NUMBIAS)
1770 break;
1771 phasebiasSat->NumberOfPhaseBiases += 1;
1772 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L3_I;
1773 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1774 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1775 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1776 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1777 }
1778 else if (pbSig.type == "3Q") {
1779 int ii = phasebiasSat->NumberOfPhaseBiases;
1780 if (ii >= CLOCKORBIT_NUMBIAS)
1781 break;
1782 phasebiasSat->NumberOfPhaseBiases += 1;
1783 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L3_Q;
1784 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1785 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1786 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1787 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1788 }
1789#ifdef USE_SSR_RTCM
1790 else if (pbSig.type == "3X") {
1791 int ii = phasebiasSat->NumberOfPhaseBiases;
1792 if (ii >= CLOCKORBIT_NUMBIAS)
1793 break;
1794 phasebiasSat->NumberOfPhaseBiases += 1;
1795 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L3_IQ;
1796 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1797 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1798 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1799 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1800 }
1801#endif
1802 }
1803 }
1804 if (prn.system() == 'E') {
1805 QListIterator<phaseBiasSignal> it(phaseBiasList);
1806 while (it.hasNext()) {
1807 const phaseBiasSignal &pbSig = it.next();
1808 if (pbSig.type == "1A") {
1809 int ii = phasebiasSat->NumberOfPhaseBiases;
1810 if (ii >= CLOCKORBIT_NUMBIAS)
1811 break;
1812 phasebiasSat->NumberOfPhaseBiases += 1;
1813 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_A;
1814 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1815 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1816 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1817 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1818 }
1819 else if (pbSig.type == "1B") {
1820 int ii = phasebiasSat->NumberOfPhaseBiases;
1821 if (ii >= CLOCKORBIT_NUMBIAS)
1822 break;
1823 phasebiasSat->NumberOfPhaseBiases += 1;
1824 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_B;
1825 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1826 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1827 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1828 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1829 }
1830 else if (pbSig.type == "1C") {
1831 int ii = phasebiasSat->NumberOfPhaseBiases;
1832 if (ii >= CLOCKORBIT_NUMBIAS)
1833 break;
1834 phasebiasSat->NumberOfPhaseBiases += 1;
1835 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_C;
1836 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1837 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1838 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1839 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1840 }
1841#ifdef USE_SSR_RTCM
1842 else if (pbSig.type == "1X") {
1843 int ii = phasebiasSat->NumberOfPhaseBiases;
1844 if (ii >= CLOCKORBIT_NUMBIAS)
1845 break;
1846 phasebiasSat->NumberOfPhaseBiases += 1;
1847 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_BC;
1848 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1849 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1850 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1851 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1852 }
1853 else if (pbSig.type == "1Z") {
1854 int ii = phasebiasSat->NumberOfPhaseBiases;
1855 if (ii >= CLOCKORBIT_NUMBIAS)
1856 break;
1857 phasebiasSat->NumberOfPhaseBiases += 1;
1858 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_ABC;
1859 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1860 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1861 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1862 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1863 }
1864#endif
1865 else if (pbSig.type == "5I") {
1866 int ii = phasebiasSat->NumberOfPhaseBiases;
1867 if (ii >= CLOCKORBIT_NUMBIAS)
1868 break;
1869 phasebiasSat->NumberOfPhaseBiases += 1;
1870 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_I;
1871 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1872 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1873 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1874 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1875 }
1876 else if (pbSig.type == "5Q") {
1877 int ii = phasebiasSat->NumberOfPhaseBiases;
1878 if (ii >= CLOCKORBIT_NUMBIAS)
1879 break;
1880 phasebiasSat->NumberOfPhaseBiases += 1;
1881 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_Q;
1882 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1883 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1884 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1885 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1886 }
1887#ifdef USE_SSR_RTCM
1888 else if (pbSig.type == "5X") {
1889 int ii = phasebiasSat->NumberOfPhaseBiases;
1890 if (ii >= CLOCKORBIT_NUMBIAS)
1891 break;
1892 phasebiasSat->NumberOfPhaseBiases += 1;
1893 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_IQ;
1894 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1895 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1896 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1897 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1898 }
1899#endif
1900 else if (pbSig.type == "7I") {
1901 int ii = phasebiasSat->NumberOfPhaseBiases;
1902 if (ii >= CLOCKORBIT_NUMBIAS)
1903 break;
1904 phasebiasSat->NumberOfPhaseBiases += 1;
1905 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_I;
1906 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1907 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1908 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1909 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1910 }
1911 else if (pbSig.type == "7Q") {
1912 int ii = phasebiasSat->NumberOfPhaseBiases;
1913 if (ii >= CLOCKORBIT_NUMBIAS)
1914 break;
1915 phasebiasSat->NumberOfPhaseBiases += 1;
1916 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_Q;
1917 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1918 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1919 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1920 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1921 }
1922#ifdef USE_SSR_RTCM
1923 else if (pbSig.type == "7X") {
1924 int ii = phasebiasSat->NumberOfPhaseBiases;
1925 if (ii >= CLOCKORBIT_NUMBIAS)
1926 break;
1927 phasebiasSat->NumberOfPhaseBiases += 1;
1928 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_IQ;
1929 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1930 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1931 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1932 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1933 }
1934 else if (pbSig.type == "8I") {
1935 int ii = phasebiasSat->NumberOfPhaseBiases;
1936 if (ii >= CLOCKORBIT_NUMBIAS)
1937 break;
1938 phasebiasSat->NumberOfPhaseBiases += 1;
1939 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5_I;
1940 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1941 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1942 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1943 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1944 }
1945 else if (pbSig.type == "8Q") {
1946 int ii = phasebiasSat->NumberOfPhaseBiases;
1947 if (ii >= CLOCKORBIT_NUMBIAS)
1948 break;
1949 phasebiasSat->NumberOfPhaseBiases += 1;
1950 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5_Q;
1951 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1952 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1953 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1954 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1955 }
1956 else if (pbSig.type == "8X") {
1957 int ii = phasebiasSat->NumberOfPhaseBiases;
1958 if (ii >= CLOCKORBIT_NUMBIAS)
1959 break;
1960 phasebiasSat->NumberOfPhaseBiases += 1;
1961 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5_IQ;
1962 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1963 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1964 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1965 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1966 }
1967#endif
1968 else if (pbSig.type == "6A") {
1969 int ii = phasebiasSat->NumberOfPhaseBiases;
1970 if (ii >= CLOCKORBIT_NUMBIAS)
1971 break;
1972 phasebiasSat->NumberOfPhaseBiases += 1;
1973 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_A;
1974 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1975 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1976 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1977 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1978 }
1979 else if (pbSig.type == "6B") {
1980 int ii = phasebiasSat->NumberOfPhaseBiases;
1981 if (ii >= CLOCKORBIT_NUMBIAS)
1982 break;
1983 phasebiasSat->NumberOfPhaseBiases += 1;
1984 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_B;
1985 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1986 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1987 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1988 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1989 }
1990 else if (pbSig.type == "6C") {
1991 int ii = phasebiasSat->NumberOfPhaseBiases;
1992 if (ii >= CLOCKORBIT_NUMBIAS)
1993 break;
1994 phasebiasSat->NumberOfPhaseBiases += 1;
1995 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_C;
1996 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1997 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1998 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1999 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2000 }
2001#ifdef USE_SSR_RTCM
2002 else if (pbSig.type == "6X") {
2003 int ii = phasebiasSat->NumberOfPhaseBiases;
2004 if (ii >= CLOCKORBIT_NUMBIAS)
2005 break;
2006 phasebiasSat->NumberOfPhaseBiases += 1;
2007 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_BC;
2008 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2009 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2010 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2011 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2012 }
2013 else if (pbSig.type == "6Z") {
2014 int ii = phasebiasSat->NumberOfPhaseBiases;
2015 if (ii >= CLOCKORBIT_NUMBIAS)
2016 break;
2017 phasebiasSat->NumberOfPhaseBiases += 1;
2018 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_ABC;
2019 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2020 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2021 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2022 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2023 }
2024#endif
2025 }
2026 }
2027 if (prn.system() == 'J') {
2028 QListIterator<phaseBiasSignal> it(phaseBiasList);
2029 while (it.hasNext()) {
2030 const phaseBiasSignal &pbSig = it.next();
2031 if (pbSig.type == "1C") {
2032 int ii = phasebiasSat->NumberOfPhaseBiases;
2033 if (ii >= CLOCKORBIT_NUMBIAS)
2034 break;
2035 phasebiasSat->NumberOfPhaseBiases += 1;
2036 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1_CA;
2037 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2038 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2039 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2040 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2041 }
2042 else if (pbSig.type == "1S") {
2043 int ii = phasebiasSat->NumberOfPhaseBiases;
2044 if (ii >= CLOCKORBIT_NUMBIAS)
2045 break;
2046 phasebiasSat->NumberOfPhaseBiases += 1;
2047 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1C_D;
2048 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2049 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2050 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2051 }
2052 else if (pbSig.type == "1L") {
2053 int ii = phasebiasSat->NumberOfPhaseBiases;
2054 if (ii >= CLOCKORBIT_NUMBIAS)
2055 break;
2056 phasebiasSat->NumberOfPhaseBiases += 1;
2057 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1C_P;
2058 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2059 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2060 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2061 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2062 }
2063 else if (pbSig.type == "2S") {
2064 int ii = phasebiasSat->NumberOfPhaseBiases;
2065 if (ii >= CLOCKORBIT_NUMBIAS)
2066 break;
2067 phasebiasSat->NumberOfPhaseBiases += 1;
2068 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L2C_M;
2069 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2070 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2071 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2072 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2073 }
2074 else if (pbSig.type == "2L") {
2075 int ii = phasebiasSat->NumberOfPhaseBiases;
2076 if (ii >= CLOCKORBIT_NUMBIAS)
2077 break;
2078 phasebiasSat->NumberOfPhaseBiases += 1;
2079 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L2C_L;
2080 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2081 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2082 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2083 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2084 }
2085#ifdef USE_SSR_RTCM
2086 else if (pbSig.type == "2X") {
2087 int ii = phasebiasSat->NumberOfPhaseBiases;
2088 if (ii >= CLOCKORBIT_NUMBIAS)
2089 break;
2090 phasebiasSat->NumberOfPhaseBiases += 1;
2091 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L2C_ML;
2092 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2093 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2094 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2095 }
2096#endif
2097 else if (pbSig.type == "5I") {
2098 int ii = phasebiasSat->NumberOfPhaseBiases;
2099 if (ii >= CLOCKORBIT_NUMBIAS)
2100 break;
2101 phasebiasSat->NumberOfPhaseBiases += 1;
2102 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_I;
2103 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2104 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2105 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2106 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2107 }
2108 else if (pbSig.type == "5Q") {
2109 int ii = phasebiasSat->NumberOfPhaseBiases;
2110 if (ii >= CLOCKORBIT_NUMBIAS)
2111 break;
2112 phasebiasSat->NumberOfPhaseBiases += 1;
2113 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_Q;
2114 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2115 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2116 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2117 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2118 }
2119#ifdef USE_SSR_RTCM
2120 else if (pbSig.type == "5X") {
2121 int ii = phasebiasSat->NumberOfPhaseBiases;
2122 if (ii >= CLOCKORBIT_NUMBIAS)
2123 break;
2124 phasebiasSat->NumberOfPhaseBiases += 1;
2125 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_IQ;
2126 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2127 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2128 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2129 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2130 }
2131#endif
2132 else if (pbSig.type == "6S") {
2133 int ii = phasebiasSat->NumberOfPhaseBiases;
2134 if (ii >= CLOCKORBIT_NUMBIAS)
2135 break;
2136 phasebiasSat->NumberOfPhaseBiases += 1;
2137 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L6_D;
2138 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2139 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2140 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2141 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2142 }
2143 else if (pbSig.type == "6L") {
2144 int ii = phasebiasSat->NumberOfPhaseBiases;
2145 if (ii >= CLOCKORBIT_NUMBIAS)
2146 break;
2147 phasebiasSat->NumberOfPhaseBiases += 1;
2148 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L6_P;
2149 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2150 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2151 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2152 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2153 }
2154#ifdef USE_SSR_RTCM
2155 else if (pbSig.type == "6X") {
2156 int ii = phasebiasSat->NumberOfPhaseBiases;
2157 if (ii >= CLOCKORBIT_NUMBIAS)
2158 break;
2159 phasebiasSat->NumberOfPhaseBiases += 1;
2160 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L6_DP;
2161 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2162 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2163 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2164 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2165 }
2166 else if (pbSig.type == "1X") {
2167 int ii = phasebiasSat->NumberOfPhaseBiases;
2168 if (ii >= CLOCKORBIT_NUMBIAS)
2169 break;
2170 phasebiasSat->NumberOfPhaseBiases += 1;
2171 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1C_DP;
2172 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2173 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2174 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2175 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2176 }
2177 else if (pbSig.type == "1Z") {
2178 int ii = phasebiasSat->NumberOfPhaseBiases;
2179 if (ii >= CLOCKORBIT_NUMBIAS)
2180 break;
2181 phasebiasSat->NumberOfPhaseBiases += 1;
2182 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1_S;
2183 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2184 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2185 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2186 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2187 }
2188 else if (pbSig.type == "5D") {
2189 int ii = phasebiasSat->NumberOfPhaseBiases;
2190 if (ii >= CLOCKORBIT_NUMBIAS)
2191 break;
2192 phasebiasSat->NumberOfPhaseBiases += 1;
2193 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_D;
2194 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2195 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2196 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2197 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2198 }
2199 else if (pbSig.type == "5P") {
2200 int ii = phasebiasSat->NumberOfPhaseBiases;
2201 if (ii >= CLOCKORBIT_NUMBIAS)
2202 break;
2203 phasebiasSat->NumberOfPhaseBiases += 1;
2204 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_P;
2205 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2206 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2207 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2208 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2209 }
2210 else if (pbSig.type == "5Z") {
2211 int ii = phasebiasSat->NumberOfPhaseBiases;
2212 if (ii >= CLOCKORBIT_NUMBIAS)
2213 break;
2214 phasebiasSat->NumberOfPhaseBiases += 1;
2215 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_DP;
2216 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2217 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2218 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2219 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2220 }
2221#endif
2222 else if (pbSig.type == "6E") {
2223 int ii = phasebiasSat->NumberOfPhaseBiases;
2224 if (ii >= CLOCKORBIT_NUMBIAS)
2225 break;
2226 phasebiasSat->NumberOfPhaseBiases += 1;
2227 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L6_E;
2228 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2229 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2230 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2231 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2232 }
2233#ifdef USE_SSR_RTCM
2234 else if (pbSig.type == "6Z") {
2235 int ii = phasebiasSat->NumberOfPhaseBiases;
2236 if (ii >= CLOCKORBIT_NUMBIAS)
2237 break;
2238 phasebiasSat->NumberOfPhaseBiases += 1;
2239 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L6_DE;
2240 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2241 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2242 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2243 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2244 }
2245#endif
2246 }
2247 }
2248 if (prn.system() == 'S') {
2249 QListIterator<phaseBiasSignal> it(phaseBiasList);
2250 while (it.hasNext()) {
2251 const phaseBiasSignal &pbSig = it.next();
2252 if (pbSig.type == "1C") {
2253 int ii = phasebiasSat->NumberOfPhaseBiases;
2254 if (ii >= CLOCKORBIT_NUMBIAS)
2255 break;
2256 phasebiasSat->NumberOfPhaseBiases += 1;
2257 phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L1_CA;
2258 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2259 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2260 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2261 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2262 }
2263 else if (pbSig.type == "5I") {
2264 int ii = phasebiasSat->NumberOfPhaseBiases;
2265 if (ii >= CLOCKORBIT_NUMBIAS)
2266 break;
2267 phasebiasSat->NumberOfPhaseBiases += 1;
2268 phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L5_I;
2269 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2270 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2271 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2272 }
2273 else if (pbSig.type == "5Q") {
2274 int ii = phasebiasSat->NumberOfPhaseBiases;
2275 if (ii >= CLOCKORBIT_NUMBIAS)
2276 break;
2277 phasebiasSat->NumberOfPhaseBiases += 1;
2278 phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L5_Q;
2279 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2280 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2281 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2282 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2283 }
2284#ifdef USE_SSR_RTCM
2285 else if (pbSig.type == "5X") {
2286 int ii = phasebiasSat->NumberOfPhaseBiases;
2287 if (ii >= CLOCKORBIT_NUMBIAS)
2288 break;
2289 phasebiasSat->NumberOfPhaseBiases += 1;
2290 phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L5_IQ;
2291 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2292 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2293 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2294 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2295 }
2296#endif
2297 }
2298 }
2299 if (prn.system() == 'C') {
2300 QListIterator<phaseBiasSignal> it(phaseBiasList);
2301 while (it.hasNext()) {
2302 const phaseBiasSignal &pbSig = it.next();
2303 if (pbSig.type == "2I") {
2304 int ii = phasebiasSat->NumberOfPhaseBiases;
2305 if (ii >= CLOCKORBIT_NUMBIAS)
2306 break;
2307 phasebiasSat->NumberOfPhaseBiases += 1;
2308 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_I;
2309 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2310 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2311 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2312 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2313 }
2314 else if (pbSig.type == "2Q") {
2315 int ii = phasebiasSat->NumberOfPhaseBiases;
2316 if (ii >= CLOCKORBIT_NUMBIAS)
2317 break;
2318 phasebiasSat->NumberOfPhaseBiases += 1;
2319 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_Q;
2320 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2321 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2322 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2323 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2324 }
2325#ifdef USE_SSR_RTCM
2326 else if (pbSig.type == "2X") {
2327 int ii = phasebiasSat->NumberOfPhaseBiases;
2328 if (ii >= CLOCKORBIT_NUMBIAS)
2329 break;
2330 phasebiasSat->NumberOfPhaseBiases += 1;
2331 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_IQ;
2332 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2333 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2334 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2335 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2336 }
2337#endif
2338 else if (pbSig.type == "6I") {
2339 int ii = phasebiasSat->NumberOfPhaseBiases;
2340 if (ii >= CLOCKORBIT_NUMBIAS)
2341 break;
2342 phasebiasSat->NumberOfPhaseBiases += 1;
2343 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_I;
2344 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2345 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2346 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2347 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2348 }
2349 else if (pbSig.type == "6Q") {
2350 int ii = phasebiasSat->NumberOfPhaseBiases;
2351 if (ii >= CLOCKORBIT_NUMBIAS)
2352 break;
2353 phasebiasSat->NumberOfPhaseBiases += 1;
2354 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_Q;
2355 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2356 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2357 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2358 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2359 }
2360#ifdef USE_SSR_RTCM
2361 else if (pbSig.type == "6X") {
2362 int ii = phasebiasSat->NumberOfPhaseBiases;
2363 if (ii >= CLOCKORBIT_NUMBIAS)
2364 break;
2365 phasebiasSat->NumberOfPhaseBiases += 1;
2366 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_IQ;
2367 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2368 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2369 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2370 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2371 }
2372#endif
2373 else if (pbSig.type == "7I") {
2374 int ii = phasebiasSat->NumberOfPhaseBiases;
2375 if (ii >= CLOCKORBIT_NUMBIAS)
2376 break;
2377 phasebiasSat->NumberOfPhaseBiases += 1;
2378 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2_I;
2379 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2380 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2381 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2382 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2383 }
2384 else if (pbSig.type == "7Q") {
2385 int ii = phasebiasSat->NumberOfPhaseBiases;
2386 if (ii >= CLOCKORBIT_NUMBIAS)
2387 break;
2388 phasebiasSat->NumberOfPhaseBiases += 1;
2389 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2_Q;
2390 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2391 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2392 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2393 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2394 }
2395#ifdef USE_SSR_RTCM
2396 else if (pbSig.type == "7X") {
2397 int ii = phasebiasSat->NumberOfPhaseBiases;
2398 if (ii >= CLOCKORBIT_NUMBIAS)
2399 break;
2400 phasebiasSat->NumberOfPhaseBiases += 1;
2401 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2_IQ;
2402 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2403 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2404 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2405 }
2406#endif
2407 else if (pbSig.type == "1D") {
2408 int ii = phasebiasSat->NumberOfPhaseBiases;
2409 if (ii >= CLOCKORBIT_NUMBIAS)
2410 break;
2411 phasebiasSat->NumberOfPhaseBiases += 1;
2412 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1a_D;
2413 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2414 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2415 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2416 }
2417 else if (pbSig.type == "1P") {
2418 int ii = phasebiasSat->NumberOfPhaseBiases;
2419 if (ii >= CLOCKORBIT_NUMBIAS)
2420 break;
2421 phasebiasSat->NumberOfPhaseBiases += 1;
2422 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1a_P;
2423 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2424 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2425 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2426 }
2427#ifdef USE_SSR_RTCM
2428 else if (pbSig.type == "1X") {
2429 int ii = phasebiasSat->NumberOfPhaseBiases;
2430 if (ii >= CLOCKORBIT_NUMBIAS)
2431 break;
2432 phasebiasSat->NumberOfPhaseBiases += 1;
2433 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1a_DP;
2434 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2435 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2436 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2437 }
2438#endif
2439 else if (pbSig.type == "5D") {
2440 int ii = phasebiasSat->NumberOfPhaseBiases;
2441 if (ii >= CLOCKORBIT_NUMBIAS)
2442 break;
2443 phasebiasSat->NumberOfPhaseBiases += 1;
2444 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2a_D;
2445 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2446 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2447 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2448 }
2449 else if (pbSig.type == "5P") {
2450 int ii = phasebiasSat->NumberOfPhaseBiases;
2451 if (ii >= CLOCKORBIT_NUMBIAS)
2452 break;
2453 phasebiasSat->NumberOfPhaseBiases += 1;
2454 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2a_P;
2455 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2456 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2457 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2458 }
2459#ifdef USE_SSR_RTCM
2460 else if (pbSig.type == "5X") {
2461 int ii = phasebiasSat->NumberOfPhaseBiases;
2462 if (ii >= CLOCKORBIT_NUMBIAS)
2463 break;
2464 phasebiasSat->NumberOfPhaseBiases += 1;
2465 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2a_DP;
2466 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2467 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2468 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2469 }
2470#elif USE_SSR_IGS
2471 else if (pbSig.type == "1A") {
2472 int ii = phasebiasSat->NumberOfPhaseBiases;
2473 if (ii >= CLOCKORBIT_NUMBIAS)
2474 break;
2475 phasebiasSat->NumberOfPhaseBiases += 1;
2476 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_A;
2477 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2478 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2479 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2480 }
2481 else if (pbSig.type == "6A") {
2482 int ii = phasebiasSat->NumberOfPhaseBiases;
2483 if (ii >= CLOCKORBIT_NUMBIAS)
2484 break;
2485 phasebiasSat->NumberOfPhaseBiases += 1;
2486 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_A;
2487 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2488 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2489 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2490 }
2491#endif
2492 }
2493 }
2494 }
2495 }
2496 }
2497
2498
2499 QByteArray hlpBufferCo;
2500
2501 // Orbit and Clock Corrections together
2502 // ------------------------------------
2503 if (_samplRtcmEphCorr == 0.0) {
2504 if (co.NumberOfSat[CLOCKORBIT_SATGPS] > 0
2505 || co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0
2506 || co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0
2507 || co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0
2508 || co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0
2509 || co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
2510 char obuffer[CLOCKORBIT_BUFFERSIZE];
2511 int len = MakeClockOrbit(&co, COTYPE_AUTO, 0, obuffer, sizeof(obuffer));
2512 if (len > 0) {
2513 hlpBufferCo = QByteArray(obuffer, len);
2514 }
2515 }
2516 }
2517
2518 // Orbit and Clock Corrections separately
2519 // --------------------------------------
2520 else {
2521 if (co.NumberOfSat[CLOCKORBIT_SATGPS] > 0) {
2522 char obuffer[CLOCKORBIT_BUFFERSIZE];
2523 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
2524 co.UpdateInterval = ephUpdInd;
2525 int len1 = MakeClockOrbit(&co, COTYPE_GPSORBIT, 1, obuffer,
2526 sizeof(obuffer));
2527 co.UpdateInterval = clkUpdInd;
2528 if (len1 > 0) {
2529 hlpBufferCo += QByteArray(obuffer, len1);
2530 }
2531 }
2532 int mmsg = (co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0 ||
2533 co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0 ||
2534 co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0 ||
2535 co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
2536 co.NumberOfSat[CLOCKORBIT_SATBDS] > 0 ) ? 1 : 0;
2537 int len2 = MakeClockOrbit(&co, COTYPE_GPSCLOCK, mmsg, obuffer,
2538 sizeof(obuffer));
2539 if (len2 > 0) {
2540 hlpBufferCo += QByteArray(obuffer, len2);
2541 }
2542 }
2543 if (co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) {
2544 char obuffer[CLOCKORBIT_BUFFERSIZE];
2545 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
2546 co.UpdateInterval = ephUpdInd;
2547 int len1 = MakeClockOrbit(&co, COTYPE_GLONASSORBIT, 1, obuffer,
2548 sizeof(obuffer));
2549 co.UpdateInterval = clkUpdInd;
2550 if (len1 > 0) {
2551 hlpBufferCo += QByteArray(obuffer, len1);
2552 }
2553 }
2554 int mmsg = (co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0 ||
2555 co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0 ||
2556 co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
2557 co.NumberOfSat[CLOCKORBIT_SATBDS] > 0 ) ? 1 : 0;
2558 int len2 = MakeClockOrbit(&co, COTYPE_GLONASSCLOCK, mmsg, obuffer,
2559 sizeof(obuffer));
2560 if (len2 > 0) {
2561 hlpBufferCo += QByteArray(obuffer, len2);
2562 }
2563 }
2564 if (co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0) {
2565 char obuffer[CLOCKORBIT_BUFFERSIZE];
2566 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
2567 co.UpdateInterval = ephUpdInd;
2568 int len1 = MakeClockOrbit(&co, COTYPE_GALILEOORBIT, 1, obuffer,
2569 sizeof(obuffer));
2570 co.UpdateInterval = clkUpdInd;
2571 if (len1 > 0) {
2572 hlpBufferCo += QByteArray(obuffer, len1);
2573 }
2574 }
2575 int mmsg = (co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0 ||
2576 co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
2577 co.NumberOfSat[CLOCKORBIT_SATBDS] > 0 ) ? 1 : 0;
2578 int len2 = MakeClockOrbit(&co, COTYPE_GALILEOCLOCK, mmsg, obuffer,
2579 sizeof(obuffer));
2580 if (len2 > 0) {
2581 hlpBufferCo += QByteArray(obuffer, len2);
2582 }
2583 }
2584 if (co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0) {
2585 char obuffer[CLOCKORBIT_BUFFERSIZE];
2586 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
2587 co.UpdateInterval = ephUpdInd;
2588 int len1 = MakeClockOrbit(&co, COTYPE_QZSSORBIT, 1, obuffer,
2589 sizeof(obuffer));
2590 co.UpdateInterval = clkUpdInd;
2591 if (len1 > 0) {
2592 hlpBufferCo += QByteArray(obuffer, len1);
2593 }
2594 }
2595 int mmsg = (co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
2596 co.NumberOfSat[CLOCKORBIT_SATBDS] > 0 ) ? 1 : 0;
2597 int len2 = MakeClockOrbit(&co, COTYPE_QZSSCLOCK, mmsg, obuffer,
2598 sizeof(obuffer));
2599 if (len2 > 0) {
2600 hlpBufferCo += QByteArray(obuffer, len2);
2601 }
2602 }
2603 if (co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0) {
2604 char obuffer[CLOCKORBIT_BUFFERSIZE];
2605 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
2606 co.UpdateInterval = ephUpdInd;
2607 int len1 = MakeClockOrbit(&co, COTYPE_SBASORBIT, 1, obuffer,
2608 sizeof(obuffer));
2609 co.UpdateInterval = clkUpdInd;
2610 if (len1 > 0) {
2611 hlpBufferCo += QByteArray(obuffer, len1);
2612 }
2613 }
2614 int mmsg = (co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) ? 1 : 0;
2615 int len2 = MakeClockOrbit(&co, COTYPE_SBASCLOCK, mmsg, obuffer,
2616 sizeof(obuffer));
2617 if (len2 > 0) {
2618 hlpBufferCo += QByteArray(obuffer, len2);
2619 }
2620 }
2621 if (co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
2622 char obuffer[CLOCKORBIT_BUFFERSIZE];
2623 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
2624 co.UpdateInterval = ephUpdInd;
2625 int len1 = MakeClockOrbit(&co, COTYPE_BDSORBIT, 1, obuffer,
2626 sizeof(obuffer));
2627 co.UpdateInterval = clkUpdInd;
2628 if (len1 > 0) {
2629 hlpBufferCo += QByteArray(obuffer, len1);
2630 }
2631 }
2632 int mmsg = 0;
2633 int len2 = MakeClockOrbit(&co, COTYPE_BDSCLOCK, mmsg, obuffer,
2634 sizeof(obuffer));
2635 if (len2 > 0) {
2636 hlpBufferCo += QByteArray(obuffer, len2);
2637 }
2638 }
2639 }
2640
2641 // Code Biases
2642 // -----------
2643 QByteArray hlpBufferBias;
2644 if (bias.NumberOfSat[CLOCKORBIT_SATGPS] > 0
2645 || bias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0
2646 || bias.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0
2647 || bias.NumberOfSat[CLOCKORBIT_SATQZSS] > 0
2648 || bias.NumberOfSat[CLOCKORBIT_SATSBAS] > 0
2649 || bias.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
2650 char obuffer[CLOCKORBIT_BUFFERSIZE];
2651 int len = MakeCodeBias(&bias, CBTYPE_AUTO, 0, obuffer, sizeof(obuffer));
2652 if (len > 0) {
2653 hlpBufferBias = QByteArray(obuffer, len);
2654 }
2655 }
2656
2657 // Phase Biases
2658 // ------------
2659 QByteArray hlpBufferPhaseBias;
2660 if (phasebias.NumberOfSat[CLOCKORBIT_SATGPS] > 0
2661 || phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0
2662 || phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0
2663 || phasebias.NumberOfSat[CLOCKORBIT_SATQZSS] > 0
2664 || phasebias.NumberOfSat[CLOCKORBIT_SATSBAS] > 0
2665 || phasebias.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
2666 char obuffer[CLOCKORBIT_BUFFERSIZE];
2667 int len = MakePhaseBias(&phasebias, PBTYPE_AUTO, 0, obuffer,
2668 sizeof(obuffer));
2669 if (len > 0) {
2670 hlpBufferPhaseBias = QByteArray(obuffer, len);
2671 }
2672 }
2673
2674 // VTEC
2675 // ----
2676 QByteArray hlpBufferVtec;
2677 if (vtec.NumLayers > 0) {
2678 char obuffer[CLOCKORBIT_BUFFERSIZE];
2679 int len = MakeVTEC(&vtec, 0, obuffer, sizeof(obuffer));
2680 if (len > 0) {
2681 hlpBufferVtec = QByteArray(obuffer, len);
2682 }
2683 }
2684
2685 _outBuffer += hlpBufferCo + hlpBufferBias + hlpBufferPhaseBias
2686 + hlpBufferVtec;
2687}
2688
2689//
2690////////////////////////////////////////////////////////////////////////////
2691t_irc bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
2692 double GPSweeks, const QString& prn, const ColumnVector& rtnAPC,
2693 double rtnUra, const ColumnVector& rtnClk, const ColumnVector& rtnVel,
2694 const ColumnVector& rtnCoM, const ColumnVector& rtnClkSig,
2695 struct ClockOrbit::SatData* sd, QString& outLine) {
2696
2697 // Broadcast Position and Velocity
2698 // -------------------------------
2699 ColumnVector xB(6);
2700 ColumnVector vB(3);
2701 t_irc irc = eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
2702
2703 if (irc != success) {
2704 return irc;
2705 }
2706
2707 // Precise Position
2708 // ----------------
2709 ColumnVector xP = _CoM ? rtnCoM : rtnAPC;
2710
2711 if (xP.size() == 0) {
2712 return failure;
2713 }
2714
2715 double dc = 0.0;
2716 if (_crdTrafo != "IGS14") {
2717 crdTrafo(GPSweek, xP, dc);
2718 }
2719
2720 // Difference in xyz
2721 // -----------------
2722 ColumnVector dx = xB.Rows(1, 3) - xP;
2723 ColumnVector dv = vB - rtnVel;
2724
2725 // Difference in RSW
2726 // -----------------
2727 ColumnVector rsw(3);
2728 XYZ_to_RSW(xB.Rows(1, 3), vB, dx, rsw);
2729
2730 ColumnVector dotRsw(3);
2731 XYZ_to_RSW(xB.Rows(1, 3), vB, dv, dotRsw);
2732
2733 // Clock Correction
2734 // ----------------
2735 double dClkA0 = rtnClk(1) - (xB(4) - dc) * t_CST::c;
2736 double dClkA1 = 0.0;
2737 if (rtnClk(2)) {
2738 dClkA1 = rtnClk(2) - xB(5) * t_CST::c;
2739 }
2740 double dClkA2 = 0.0;
2741 if (rtnClk(3)) {
2742 dClkA2 = rtnClk(3) - xB(6) * t_CST::c;
2743 }
2744
2745 if (sd) {
2746 sd->ID = prn.mid(1).toInt();
2747 sd->IOD = eph->IOD();
2748 sd->Clock.DeltaA0 = dClkA0;
2749 sd->Clock.DeltaA1 = dClkA1;
2750 sd->Clock.DeltaA2 = dClkA2;
2751 sd->UserRangeAccuracy = rtnUra;
2752 sd->Orbit.DeltaRadial = rsw(1);
2753 sd->Orbit.DeltaAlongTrack = rsw(2);
2754 sd->Orbit.DeltaCrossTrack = rsw(3);
2755 sd->Orbit.DotDeltaRadial = dotRsw(1);
2756 sd->Orbit.DotDeltaAlongTrack = dotRsw(2);
2757 sd->Orbit.DotDeltaCrossTrack = dotRsw(3);
2758 }
2759
2760 outLine.sprintf("%d %.1f %s %u %10.3f %8.3f %8.3f %8.3f %8.3f %8.3f\n", GPSweek,
2761 GPSweeks, eph->prn().toString().c_str(), eph->IOD(), dClkA0, dClkA1, dClkA2,
2762 rsw(1), rsw(2), rsw(3));
2763
2764 // RTNET full clock for RINEX and SP3 file
2765 // ---------------------------------------
2766 double relativity = -2.0 * DotProduct(xP, rtnVel) / t_CST::c;
2767 double clkRnx = (rtnClk[0] - relativity) / t_CST::c; // [s]
2768 double clkRnxRate = rtnClk[1] / t_CST::c; // [s/s = -]
2769 double clkRnxAcc = rtnClk[2] / t_CST::c; // [s/s² ) -/s]
2770
2771 if (_rnx) {
2772 double clkRnxSig, clkRnxRateSig, clkRnxAccSig;
2773 int s = rtnClkSig.size();
2774 switch (s) {
2775 case 1:
2776 clkRnxSig = rtnClkSig[0] / t_CST::c; // [s]
2777 clkRnxRateSig = 0.0; // [s/s = -]
2778 clkRnxAccSig = 0.0; // [s/s² ) -/s]
2779 break;
2780 case 2:
2781 clkRnxSig = rtnClkSig[0] / t_CST::c; // [s]
2782 clkRnxRateSig = rtnClkSig[1] / t_CST::c; // [s/s = -]
2783 clkRnxAccSig = 0.0; // [s/s² ) -/s]
2784 break;
2785 case 3:
2786 clkRnxSig = rtnClkSig[0] / t_CST::c; // [s]
2787 clkRnxRateSig = rtnClkSig[1] / t_CST::c; // [s/s = -]
2788 clkRnxAccSig = rtnClkSig[2] / t_CST::c; // [s/s² ) -/s]
2789 break;
2790 }
2791 _rnx->write(GPSweek, GPSweeks, prn, clkRnx, clkRnxRate, clkRnxAcc,
2792 clkRnxSig, clkRnxRateSig, clkRnxAccSig);
2793 }
2794 if (_sp3) {
2795 _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, clkRnx, rtnVel, clkRnxRate);
2796 }
2797 return success;
2798}
2799
2800// Transform Coordinates
2801////////////////////////////////////////////////////////////////////////////
2802void bncRtnetUploadCaster::crdTrafo(int GPSWeek, ColumnVector& xyz,
2803 double& dc) {
2804
2805 // Current epoch minus 2000.0 in years
2806 // ------------------------------------
2807 double dt = (GPSWeek - (1042.0 + 6.0 / 7.0)) / 365.2422 * 7.0 + 2000.0 - _t0;
2808
2809 ColumnVector dx(3);
2810
2811 dx(1) = _dx + dt * _dxr;
2812 dx(2) = _dy + dt * _dyr;
2813 dx(3) = _dz + dt * _dzr;
2814
2815 static const double arcSec = 180.0 * 3600.0 / M_PI;
2816
2817 double ox = (_ox + dt * _oxr) / arcSec;
2818 double oy = (_oy + dt * _oyr) / arcSec;
2819 double oz = (_oz + dt * _ozr) / arcSec;
2820
2821 double sc = 1.0 + _sc * 1e-9 + dt * _scr * 1e-9;
2822
2823 // Specify approximate center of area
2824 // ----------------------------------
2825 ColumnVector meanSta(3);
2826
2827 if (_crdTrafo == "ETRF2000") {
2828 meanSta(1) = 3661090.0;
2829 meanSta(2) = 845230.0;
2830 meanSta(3) = 5136850.0;
2831 }
2832 else if (_crdTrafo == "GDA2020") {
2833 meanSta(1) = -4052050.0;
2834 meanSta(2) = 4212840.0;
2835 meanSta(3) = -2545110.0;
2836 }
2837 else if (_crdTrafo == "SIRGAS2000") {
2838 meanSta(1) = 3740860.0;
2839 meanSta(2) = -4964290.0;
2840 meanSta(3) = -1425420.0;
2841 }
2842 else if (_crdTrafo == "DREF91") {
2843 meanSta(1) = 3959579.0;
2844 meanSta(2) = 721719.0;
2845 meanSta(3) = 4931539.0;
2846 }
2847 else if (_crdTrafo == "Custom") {
2848 meanSta(1) = 0.0; // TODO
2849 meanSta(2) = 0.0; // TODO
2850 meanSta(3) = 0.0; // TODO
2851 }
2852
2853 // Clock correction proportional to topocentric distance to satellites
2854 // -------------------------------------------------------------------
2855 double rho = (xyz - meanSta).NormFrobenius();
2856 dc = rho * (sc - 1.0) / sc / t_CST::c;
2857
2858 Matrix rMat(3, 3);
2859 rMat(1, 1) = 1.0;
2860 rMat(1, 2) = -oz;
2861 rMat(1, 3) = oy;
2862 rMat(2, 1) = oz;
2863 rMat(2, 2) = 1.0;
2864 rMat(2, 3) = -ox;
2865 rMat(3, 1) = -oy;
2866 rMat(3, 2) = ox;
2867 rMat(3, 3) = 1.0;
2868
2869 xyz = sc * rMat * xyz + dx;
2870}
2871
2872int bncRtnetUploadCaster::determineUpdateInd(double samplingRate) {
2873
2874 if (samplingRate == 10.0) {
2875 return 3;
2876 }
2877 else if (samplingRate == 15.0) {
2878 return 4;
2879 }
2880 else if (samplingRate == 30.0) {
2881 return 5;
2882 }
2883 else if (samplingRate == 60.0) {
2884 return 6;
2885 }
2886 else if (samplingRate == 120.0) {
2887 return 7;
2888 }
2889 else if (samplingRate == 240.0) {
2890 return 8;
2891 }
2892 else if (samplingRate == 300.0) {
2893 return 9;
2894 }
2895 else if (samplingRate == 600.0) {
2896 return 10;
2897 }
2898 else if (samplingRate == 900.0) {
2899 return 11;
2900 }
2901 else if (samplingRate == 1800.0) {
2902 return 12;
2903 }
2904 else if (samplingRate == 3600.0) {
2905 return 13;
2906 }
2907 else if (samplingRate == 7200.0) {
2908 return 14;
2909 }
2910 else if (samplingRate == 10800.0) {
2911 return 15;
2912 }
2913 return 2; // default
2914}
Note: See TracBrowser for help on using the repository browser.