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

Last change on this file since 8982 was 8982, 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 (!phaseBiasList.isEmpty()) { // to allow yaw angle without phase bias list
1420 if (prn.system() == 'G') {
1421 phasebiasSat = phasebias.Sat
1422 + phasebias.NumberOfSat[CLOCKORBIT_SATGPS];
1423 ++phasebias.NumberOfSat[CLOCKORBIT_SATGPS];
1424 }
1425 else if (prn.system() == 'R') {
1426 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS
1427 + phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS];
1428 ++phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS];
1429 }
1430 else if (prn.system() == 'E') {
1431 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
1432 + phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO];
1433 ++phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO];
1434 }
1435 else if (prn.system() == 'J') {
1436 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
1437 + CLOCKORBIT_NUMGALILEO
1438 + phasebias.NumberOfSat[CLOCKORBIT_SATQZSS];
1439 ++phasebias.NumberOfSat[CLOCKORBIT_SATQZSS];
1440 }
1441 else if (prn.system() == 'C') {
1442 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
1443 + CLOCKORBIT_NUMGALILEO + CLOCKORBIT_NUMQZSS
1444 + phasebias.NumberOfSat[CLOCKORBIT_SATBDS];
1445 ++phasebias.NumberOfSat[CLOCKORBIT_SATBDS];
1446 }
1447 else if (prn.system() == 'S') {
1448 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS
1449 + CLOCKORBIT_NUMGALILEO + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMBDS
1450 + phasebias.NumberOfSat[CLOCKORBIT_SATSBAS];
1451 ++phasebias.NumberOfSat[CLOCKORBIT_SATSBAS];
1452 }
1453 //}
1454
1455 if (phasebiasSat) {
1456 phasebias.DispersiveBiasConsistencyIndicator = dispersiveBiasConsistenyIndicator;
1457 phasebias.MWConsistencyIndicator = mwConsistencyIndicator;
1458 phasebiasSat->ID = prn.number();
1459 phasebiasSat->NumberOfPhaseBiases = 0;
1460 phasebiasSat->YawAngle = pbSat.yawAngle;
1461 phasebiasSat->YawRate = pbSat.yawRate;
1462 if (prn.system() == 'G') {
1463 QListIterator<phaseBiasSignal> it(phaseBiasList);
1464 while (it.hasNext()) {
1465 const phaseBiasSignal &pbSig = it.next();
1466 if (pbSig.type == "1C") {
1467 int ii = phasebiasSat->NumberOfPhaseBiases;
1468 if (ii >= CLOCKORBIT_NUMBIAS)
1469 break;
1470 phasebiasSat->NumberOfPhaseBiases += 1;
1471 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1_CA;
1472 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1473 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1474 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1475 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1476 }
1477 else if (pbSig.type == "1P") {
1478 int ii = phasebiasSat->NumberOfPhaseBiases;
1479 if (ii >= CLOCKORBIT_NUMBIAS)
1480 break;
1481 phasebiasSat->NumberOfPhaseBiases += 1;
1482 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1_P;
1483 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1484 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1485 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1486 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1487 }
1488 else if (pbSig.type == "1W") {
1489 int ii = phasebiasSat->NumberOfPhaseBiases;
1490 if (ii >= CLOCKORBIT_NUMBIAS)
1491 break;
1492 phasebiasSat->NumberOfPhaseBiases += 1;
1493 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1_Z;
1494 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1495 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1496 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1497 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1498 }
1499 else if (pbSig.type == "2C") {
1500 int ii = phasebiasSat->NumberOfPhaseBiases;
1501 if (ii >= CLOCKORBIT_NUMBIAS)
1502 break;
1503 phasebiasSat->NumberOfPhaseBiases += 1;
1504 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_CA;
1505 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1506 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1507 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1508 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1509 }
1510 else if (pbSig.type == "2D") {
1511 int ii = phasebiasSat->NumberOfPhaseBiases;
1512 if (ii >= CLOCKORBIT_NUMBIAS)
1513 break;
1514 phasebiasSat->NumberOfPhaseBiases += 1;
1515 phasebiasSat->Biases[ii].Type = CODETYPEGPS_SEMI_CODELESS;
1516 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1517 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1518 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1519 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1520 }
1521 else if (pbSig.type == "2S") {
1522 int ii = phasebiasSat->NumberOfPhaseBiases;
1523 if (ii >= CLOCKORBIT_NUMBIAS)
1524 break;
1525 phasebiasSat->NumberOfPhaseBiases += 1;
1526 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2C_M;
1527 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1528 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1529 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1530 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1531 }
1532 else if (pbSig.type == "2L") {
1533 int ii = phasebiasSat->NumberOfPhaseBiases;
1534 if (ii >= CLOCKORBIT_NUMBIAS)
1535 break;
1536 phasebiasSat->NumberOfPhaseBiases += 1;
1537 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2C_L;
1538 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1539 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1540 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1541 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1542 }
1543#ifdef USE_SSR_RTCM
1544 else if (pbSig.type == "2X") {
1545 int ii = phasebiasSat->NumberOfPhaseBiases;
1546 if (ii >= CLOCKORBIT_NUMBIAS)
1547 break;
1548 phasebiasSat->NumberOfPhaseBiases += 1;
1549 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2C_ML;
1550 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1551 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1552 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1553 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1554 }
1555#endif
1556 else if (pbSig.type == "2P") {
1557 int ii = phasebiasSat->NumberOfPhaseBiases;
1558 if (ii >= CLOCKORBIT_NUMBIAS)
1559 break;
1560 phasebiasSat->NumberOfPhaseBiases += 1;
1561 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_P;
1562 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1563 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1564 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1565 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1566 }
1567 else if (pbSig.type == "2W") {
1568 int ii = phasebiasSat->NumberOfPhaseBiases;
1569 if (ii >= CLOCKORBIT_NUMBIAS)
1570 break;
1571 phasebiasSat->NumberOfPhaseBiases += 1;
1572 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L2_Z;
1573 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1574 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1575 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1576 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1577 }
1578 else if (pbSig.type == "5I") {
1579 int ii = phasebiasSat->NumberOfPhaseBiases;
1580 if (ii >= CLOCKORBIT_NUMBIAS)
1581 break;
1582 phasebiasSat->NumberOfPhaseBiases += 1;
1583 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L5_I;
1584 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1585 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1586 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1587 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1588 }
1589 else if (pbSig.type == "5Q") {
1590 int ii = phasebiasSat->NumberOfPhaseBiases;
1591 if (ii >= CLOCKORBIT_NUMBIAS)
1592 break;
1593 phasebiasSat->NumberOfPhaseBiases += 1;
1594 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L5_Q;
1595 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1596 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1597 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1598 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1599 }
1600#ifdef USE_SSR_RTCM
1601 else if (pbSig.type == "5X") {
1602 int ii = phasebiasSat->NumberOfPhaseBiases;
1603 if (ii >= CLOCKORBIT_NUMBIAS)
1604 break;
1605 phasebiasSat->NumberOfPhaseBiases += 1;
1606 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L5_IQ;
1607 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1608 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1609 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1610 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1611 }
1612#endif
1613 else if (pbSig.type == "1S") {
1614 int ii = phasebiasSat->NumberOfPhaseBiases;
1615 if (ii >= CLOCKORBIT_NUMBIAS)
1616 break;
1617 phasebiasSat->NumberOfPhaseBiases += 1;
1618 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1C_D;
1619 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1620 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1621 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1622 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1623 }
1624 else if (pbSig.type == "1L") {
1625 int ii = phasebiasSat->NumberOfPhaseBiases;
1626 if (ii >= CLOCKORBIT_NUMBIAS)
1627 break;
1628 phasebiasSat->NumberOfPhaseBiases += 1;
1629 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1C_P;
1630 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1631 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1632 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1633 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1634 }
1635#ifdef USE_SSR_RTCM
1636 else if (pbSig.type == "1X") {
1637 int ii = phasebiasSat->NumberOfPhaseBiases;
1638 if (ii >= CLOCKORBIT_NUMBIAS)
1639 break;
1640 phasebiasSat->NumberOfPhaseBiases += 1;
1641 phasebiasSat->Biases[ii].Type = CODETYPEGPS_L1C_DP;
1642 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1643 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1644 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1645 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1646 }
1647#endif
1648 }
1649 }
1650 if (prn.system() == 'R') {
1651 QListIterator<phaseBiasSignal> it(phaseBiasList);
1652 while (it.hasNext()) {
1653 const phaseBiasSignal &pbSig = it.next();
1654 if (pbSig.type == "1C") {
1655 int ii = phasebiasSat->NumberOfPhaseBiases;
1656 if (ii >= CLOCKORBIT_NUMBIAS)
1657 break;
1658 phasebiasSat->NumberOfPhaseBiases += 1;
1659 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1_CA;
1660 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1661 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1662 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1663 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1664 }
1665 else if (pbSig.type == "1P") {
1666 int ii = phasebiasSat->NumberOfPhaseBiases;
1667 if (ii >= CLOCKORBIT_NUMBIAS)
1668 break;
1669 phasebiasSat->NumberOfPhaseBiases += 1;
1670 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1_P;
1671 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1672 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1673 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1674 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1675 }
1676 else if (pbSig.type == "2C") {
1677 int ii = phasebiasSat->NumberOfPhaseBiases;
1678 if (ii >= CLOCKORBIT_NUMBIAS)
1679 break;
1680 phasebiasSat->NumberOfPhaseBiases += 1;
1681 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2_CA;
1682 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1683 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1684 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1685 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1686 }
1687 else if (pbSig.type == "2P") {
1688 int ii = phasebiasSat->NumberOfPhaseBiases;
1689 if (ii >= CLOCKORBIT_NUMBIAS)
1690 break;
1691 phasebiasSat->NumberOfPhaseBiases += 1;
1692 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2_P;
1693 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1694 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1695 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1696 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1697 }
1698 else if (pbSig.type == "4A") {
1699 int ii = phasebiasSat->NumberOfPhaseBiases;
1700 if (ii >= CLOCKORBIT_NUMBIAS)
1701 break;
1702 phasebiasSat->NumberOfPhaseBiases += 1;
1703 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1a_OCd;
1704 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1705 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1706 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1707 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1708 }
1709 else if (pbSig.type == "4B") {
1710 int ii = phasebiasSat->NumberOfPhaseBiases;
1711 if (ii >= CLOCKORBIT_NUMBIAS)
1712 break;
1713 phasebiasSat->NumberOfPhaseBiases += 1;
1714 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1a_OCp;
1715 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1716 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1717 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1718 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1719 }
1720#ifdef USE_SSR_RTCM
1721 else if (pbSig.type == "4X") {
1722 int ii = phasebiasSat->NumberOfPhaseBiases;
1723 if (ii >= CLOCKORBIT_NUMBIAS)
1724 break;
1725 phasebiasSat->NumberOfPhaseBiases += 1;
1726 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L1a_OCdp;
1727 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1728 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1729 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1730 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1731 }
1732#endif
1733 else if (pbSig.type == "6A") {
1734 int ii = phasebiasSat->NumberOfPhaseBiases;
1735 if (ii >= CLOCKORBIT_NUMBIAS)
1736 break;
1737 phasebiasSat->NumberOfPhaseBiases += 1;
1738 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2a_CSI;
1739 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1740 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1741 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1742 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1743 }
1744 else if (pbSig.type == "6B") {
1745 int ii = phasebiasSat->NumberOfPhaseBiases;
1746 if (ii >= CLOCKORBIT_NUMBIAS)
1747 break;
1748 phasebiasSat->NumberOfPhaseBiases += 1;
1749 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2a_OCp;
1750 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1751 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1752 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1753 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1754 }
1755#ifdef USE_SSR_RTCM
1756 else if (pbSig.type == "6X") {
1757 int ii = phasebiasSat->NumberOfPhaseBiases;
1758 if (ii >= CLOCKORBIT_NUMBIAS)
1759 break;
1760 phasebiasSat->NumberOfPhaseBiases += 1;
1761 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L2a_CSIOCp;
1762 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1763 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1764 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1765 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1766 }
1767#endif
1768 else if (pbSig.type == "3I") {
1769 int ii = phasebiasSat->NumberOfPhaseBiases;
1770 if (ii >= CLOCKORBIT_NUMBIAS)
1771 break;
1772 phasebiasSat->NumberOfPhaseBiases += 1;
1773 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L3_I;
1774 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1775 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1776 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1777 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1778 }
1779 else if (pbSig.type == "3Q") {
1780 int ii = phasebiasSat->NumberOfPhaseBiases;
1781 if (ii >= CLOCKORBIT_NUMBIAS)
1782 break;
1783 phasebiasSat->NumberOfPhaseBiases += 1;
1784 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L3_Q;
1785 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1786 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1787 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1788 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1789 }
1790#ifdef USE_SSR_RTCM
1791 else if (pbSig.type == "3X") {
1792 int ii = phasebiasSat->NumberOfPhaseBiases;
1793 if (ii >= CLOCKORBIT_NUMBIAS)
1794 break;
1795 phasebiasSat->NumberOfPhaseBiases += 1;
1796 phasebiasSat->Biases[ii].Type = CODETYPEGLONASS_L3_IQ;
1797 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1798 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1799 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1800 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1801 }
1802#endif
1803 }
1804 }
1805 if (prn.system() == 'E') {
1806 QListIterator<phaseBiasSignal> it(phaseBiasList);
1807 while (it.hasNext()) {
1808 const phaseBiasSignal &pbSig = it.next();
1809 if (pbSig.type == "1A") {
1810 int ii = phasebiasSat->NumberOfPhaseBiases;
1811 if (ii >= CLOCKORBIT_NUMBIAS)
1812 break;
1813 phasebiasSat->NumberOfPhaseBiases += 1;
1814 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_A;
1815 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1816 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1817 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1818 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1819 }
1820 else if (pbSig.type == "1B") {
1821 int ii = phasebiasSat->NumberOfPhaseBiases;
1822 if (ii >= CLOCKORBIT_NUMBIAS)
1823 break;
1824 phasebiasSat->NumberOfPhaseBiases += 1;
1825 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_B;
1826 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1827 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1828 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1829 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1830 }
1831 else if (pbSig.type == "1C") {
1832 int ii = phasebiasSat->NumberOfPhaseBiases;
1833 if (ii >= CLOCKORBIT_NUMBIAS)
1834 break;
1835 phasebiasSat->NumberOfPhaseBiases += 1;
1836 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_C;
1837 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1838 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1839 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1840 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1841 }
1842#ifdef USE_SSR_RTCM
1843 else if (pbSig.type == "1X") {
1844 int ii = phasebiasSat->NumberOfPhaseBiases;
1845 if (ii >= CLOCKORBIT_NUMBIAS)
1846 break;
1847 phasebiasSat->NumberOfPhaseBiases += 1;
1848 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_BC;
1849 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1850 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1851 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1852 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1853 }
1854 else if (pbSig.type == "1Z") {
1855 int ii = phasebiasSat->NumberOfPhaseBiases;
1856 if (ii >= CLOCKORBIT_NUMBIAS)
1857 break;
1858 phasebiasSat->NumberOfPhaseBiases += 1;
1859 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E1_ABC;
1860 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1861 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1862 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1863 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1864 }
1865#endif
1866 else if (pbSig.type == "5I") {
1867 int ii = phasebiasSat->NumberOfPhaseBiases;
1868 if (ii >= CLOCKORBIT_NUMBIAS)
1869 break;
1870 phasebiasSat->NumberOfPhaseBiases += 1;
1871 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_I;
1872 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1873 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1874 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1875 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1876 }
1877 else if (pbSig.type == "5Q") {
1878 int ii = phasebiasSat->NumberOfPhaseBiases;
1879 if (ii >= CLOCKORBIT_NUMBIAS)
1880 break;
1881 phasebiasSat->NumberOfPhaseBiases += 1;
1882 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_Q;
1883 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1884 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1885 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1886 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1887 }
1888#ifdef USE_SSR_RTCM
1889 else if (pbSig.type == "5X") {
1890 int ii = phasebiasSat->NumberOfPhaseBiases;
1891 if (ii >= CLOCKORBIT_NUMBIAS)
1892 break;
1893 phasebiasSat->NumberOfPhaseBiases += 1;
1894 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5A_IQ;
1895 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1896 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1897 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1898 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1899 }
1900#endif
1901 else if (pbSig.type == "7I") {
1902 int ii = phasebiasSat->NumberOfPhaseBiases;
1903 if (ii >= CLOCKORBIT_NUMBIAS)
1904 break;
1905 phasebiasSat->NumberOfPhaseBiases += 1;
1906 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_I;
1907 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1908 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1909 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1910 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1911 }
1912 else if (pbSig.type == "7Q") {
1913 int ii = phasebiasSat->NumberOfPhaseBiases;
1914 if (ii >= CLOCKORBIT_NUMBIAS)
1915 break;
1916 phasebiasSat->NumberOfPhaseBiases += 1;
1917 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_Q;
1918 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1919 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1920 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1921 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1922 }
1923#ifdef USE_SSR_RTCM
1924 else if (pbSig.type == "7X") {
1925 int ii = phasebiasSat->NumberOfPhaseBiases;
1926 if (ii >= CLOCKORBIT_NUMBIAS)
1927 break;
1928 phasebiasSat->NumberOfPhaseBiases += 1;
1929 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5B_IQ;
1930 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1931 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1932 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1933 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1934 }
1935 else if (pbSig.type == "8I") {
1936 int ii = phasebiasSat->NumberOfPhaseBiases;
1937 if (ii >= CLOCKORBIT_NUMBIAS)
1938 break;
1939 phasebiasSat->NumberOfPhaseBiases += 1;
1940 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5_I;
1941 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1942 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1943 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1944 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1945 }
1946 else if (pbSig.type == "8Q") {
1947 int ii = phasebiasSat->NumberOfPhaseBiases;
1948 if (ii >= CLOCKORBIT_NUMBIAS)
1949 break;
1950 phasebiasSat->NumberOfPhaseBiases += 1;
1951 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5_Q;
1952 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1953 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1954 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1955 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1956 }
1957 else if (pbSig.type == "8X") {
1958 int ii = phasebiasSat->NumberOfPhaseBiases;
1959 if (ii >= CLOCKORBIT_NUMBIAS)
1960 break;
1961 phasebiasSat->NumberOfPhaseBiases += 1;
1962 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E5_IQ;
1963 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1964 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1965 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1966 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1967 }
1968#endif
1969 else if (pbSig.type == "6A") {
1970 int ii = phasebiasSat->NumberOfPhaseBiases;
1971 if (ii >= CLOCKORBIT_NUMBIAS)
1972 break;
1973 phasebiasSat->NumberOfPhaseBiases += 1;
1974 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_A;
1975 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1976 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1977 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1978 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1979 }
1980 else if (pbSig.type == "6B") {
1981 int ii = phasebiasSat->NumberOfPhaseBiases;
1982 if (ii >= CLOCKORBIT_NUMBIAS)
1983 break;
1984 phasebiasSat->NumberOfPhaseBiases += 1;
1985 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_B;
1986 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1987 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1988 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
1989 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
1990 }
1991 else if (pbSig.type == "6C") {
1992 int ii = phasebiasSat->NumberOfPhaseBiases;
1993 if (ii >= CLOCKORBIT_NUMBIAS)
1994 break;
1995 phasebiasSat->NumberOfPhaseBiases += 1;
1996 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_C;
1997 phasebiasSat->Biases[ii].Bias = pbSig.bias;
1998 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
1999 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2000 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2001 }
2002#ifdef USE_SSR_RTCM
2003 else if (pbSig.type == "6X") {
2004 int ii = phasebiasSat->NumberOfPhaseBiases;
2005 if (ii >= CLOCKORBIT_NUMBIAS)
2006 break;
2007 phasebiasSat->NumberOfPhaseBiases += 1;
2008 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_BC;
2009 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2010 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2011 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2012 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2013 }
2014 else if (pbSig.type == "6Z") {
2015 int ii = phasebiasSat->NumberOfPhaseBiases;
2016 if (ii >= CLOCKORBIT_NUMBIAS)
2017 break;
2018 phasebiasSat->NumberOfPhaseBiases += 1;
2019 phasebiasSat->Biases[ii].Type = CODETYPEGALILEO_E6_ABC;
2020 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2021 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2022 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2023 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2024 }
2025#endif
2026 }
2027 }
2028 if (prn.system() == 'J') {
2029 QListIterator<phaseBiasSignal> it(phaseBiasList);
2030 while (it.hasNext()) {
2031 const phaseBiasSignal &pbSig = it.next();
2032 if (pbSig.type == "1C") {
2033 int ii = phasebiasSat->NumberOfPhaseBiases;
2034 if (ii >= CLOCKORBIT_NUMBIAS)
2035 break;
2036 phasebiasSat->NumberOfPhaseBiases += 1;
2037 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1_CA;
2038 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2039 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2040 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2041 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2042 }
2043 else if (pbSig.type == "1S") {
2044 int ii = phasebiasSat->NumberOfPhaseBiases;
2045 if (ii >= CLOCKORBIT_NUMBIAS)
2046 break;
2047 phasebiasSat->NumberOfPhaseBiases += 1;
2048 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1C_D;
2049 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2050 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2051 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2052 }
2053 else if (pbSig.type == "1L") {
2054 int ii = phasebiasSat->NumberOfPhaseBiases;
2055 if (ii >= CLOCKORBIT_NUMBIAS)
2056 break;
2057 phasebiasSat->NumberOfPhaseBiases += 1;
2058 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1C_P;
2059 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2060 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2061 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2062 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2063 }
2064 else if (pbSig.type == "2S") {
2065 int ii = phasebiasSat->NumberOfPhaseBiases;
2066 if (ii >= CLOCKORBIT_NUMBIAS)
2067 break;
2068 phasebiasSat->NumberOfPhaseBiases += 1;
2069 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L2C_M;
2070 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2071 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2072 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2073 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2074 }
2075 else if (pbSig.type == "2L") {
2076 int ii = phasebiasSat->NumberOfPhaseBiases;
2077 if (ii >= CLOCKORBIT_NUMBIAS)
2078 break;
2079 phasebiasSat->NumberOfPhaseBiases += 1;
2080 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L2C_L;
2081 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2082 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2083 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2084 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2085 }
2086#ifdef USE_SSR_RTCM
2087 else if (pbSig.type == "2X") {
2088 int ii = phasebiasSat->NumberOfPhaseBiases;
2089 if (ii >= CLOCKORBIT_NUMBIAS)
2090 break;
2091 phasebiasSat->NumberOfPhaseBiases += 1;
2092 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L2C_ML;
2093 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2094 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2095 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2096 }
2097#endif
2098 else if (pbSig.type == "5I") {
2099 int ii = phasebiasSat->NumberOfPhaseBiases;
2100 if (ii >= CLOCKORBIT_NUMBIAS)
2101 break;
2102 phasebiasSat->NumberOfPhaseBiases += 1;
2103 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_I;
2104 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2105 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2106 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2107 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2108 }
2109 else if (pbSig.type == "5Q") {
2110 int ii = phasebiasSat->NumberOfPhaseBiases;
2111 if (ii >= CLOCKORBIT_NUMBIAS)
2112 break;
2113 phasebiasSat->NumberOfPhaseBiases += 1;
2114 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_Q;
2115 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2116 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2117 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2118 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2119 }
2120#ifdef USE_SSR_RTCM
2121 else if (pbSig.type == "5X") {
2122 int ii = phasebiasSat->NumberOfPhaseBiases;
2123 if (ii >= CLOCKORBIT_NUMBIAS)
2124 break;
2125 phasebiasSat->NumberOfPhaseBiases += 1;
2126 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_IQ;
2127 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2128 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2129 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2130 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2131 }
2132#endif
2133 else if (pbSig.type == "6S") {
2134 int ii = phasebiasSat->NumberOfPhaseBiases;
2135 if (ii >= CLOCKORBIT_NUMBIAS)
2136 break;
2137 phasebiasSat->NumberOfPhaseBiases += 1;
2138 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L6_D;
2139 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2140 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2141 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2142 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2143 }
2144 else if (pbSig.type == "6L") {
2145 int ii = phasebiasSat->NumberOfPhaseBiases;
2146 if (ii >= CLOCKORBIT_NUMBIAS)
2147 break;
2148 phasebiasSat->NumberOfPhaseBiases += 1;
2149 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L6_P;
2150 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2151 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2152 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2153 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2154 }
2155#ifdef USE_SSR_RTCM
2156 else if (pbSig.type == "6X") {
2157 int ii = phasebiasSat->NumberOfPhaseBiases;
2158 if (ii >= CLOCKORBIT_NUMBIAS)
2159 break;
2160 phasebiasSat->NumberOfPhaseBiases += 1;
2161 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L6_DP;
2162 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2163 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2164 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2165 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2166 }
2167 else if (pbSig.type == "1X") {
2168 int ii = phasebiasSat->NumberOfPhaseBiases;
2169 if (ii >= CLOCKORBIT_NUMBIAS)
2170 break;
2171 phasebiasSat->NumberOfPhaseBiases += 1;
2172 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1C_DP;
2173 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2174 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2175 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2176 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2177 }
2178 else if (pbSig.type == "1Z") {
2179 int ii = phasebiasSat->NumberOfPhaseBiases;
2180 if (ii >= CLOCKORBIT_NUMBIAS)
2181 break;
2182 phasebiasSat->NumberOfPhaseBiases += 1;
2183 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L1_S;
2184 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2185 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2186 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2187 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2188 }
2189 else if (pbSig.type == "5D") {
2190 int ii = phasebiasSat->NumberOfPhaseBiases;
2191 if (ii >= CLOCKORBIT_NUMBIAS)
2192 break;
2193 phasebiasSat->NumberOfPhaseBiases += 1;
2194 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_D;
2195 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2196 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2197 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2198 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2199 }
2200 else if (pbSig.type == "5P") {
2201 int ii = phasebiasSat->NumberOfPhaseBiases;
2202 if (ii >= CLOCKORBIT_NUMBIAS)
2203 break;
2204 phasebiasSat->NumberOfPhaseBiases += 1;
2205 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_P;
2206 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2207 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2208 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2209 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2210 }
2211 else if (pbSig.type == "5Z") {
2212 int ii = phasebiasSat->NumberOfPhaseBiases;
2213 if (ii >= CLOCKORBIT_NUMBIAS)
2214 break;
2215 phasebiasSat->NumberOfPhaseBiases += 1;
2216 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L5_DP;
2217 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2218 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2219 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2220 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2221 }
2222#endif
2223 else if (pbSig.type == "6E") {
2224 int ii = phasebiasSat->NumberOfPhaseBiases;
2225 if (ii >= CLOCKORBIT_NUMBIAS)
2226 break;
2227 phasebiasSat->NumberOfPhaseBiases += 1;
2228 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L6_E;
2229 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2230 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2231 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2232 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2233 }
2234#ifdef USE_SSR_RTCM
2235 else if (pbSig.type == "6Z") {
2236 int ii = phasebiasSat->NumberOfPhaseBiases;
2237 if (ii >= CLOCKORBIT_NUMBIAS)
2238 break;
2239 phasebiasSat->NumberOfPhaseBiases += 1;
2240 phasebiasSat->Biases[ii].Type = CODETYPEQZSS_L6_DE;
2241 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2242 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2243 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2244 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2245 }
2246#endif
2247 }
2248 }
2249 if (prn.system() == 'S') {
2250 QListIterator<phaseBiasSignal> it(phaseBiasList);
2251 while (it.hasNext()) {
2252 const phaseBiasSignal &pbSig = it.next();
2253 if (pbSig.type == "1C") {
2254 int ii = phasebiasSat->NumberOfPhaseBiases;
2255 if (ii >= CLOCKORBIT_NUMBIAS)
2256 break;
2257 phasebiasSat->NumberOfPhaseBiases += 1;
2258 phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L1_CA;
2259 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2260 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2261 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2262 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2263 }
2264 else if (pbSig.type == "5I") {
2265 int ii = phasebiasSat->NumberOfPhaseBiases;
2266 if (ii >= CLOCKORBIT_NUMBIAS)
2267 break;
2268 phasebiasSat->NumberOfPhaseBiases += 1;
2269 phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L5_I;
2270 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2271 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2272 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2273 }
2274 else if (pbSig.type == "5Q") {
2275 int ii = phasebiasSat->NumberOfPhaseBiases;
2276 if (ii >= CLOCKORBIT_NUMBIAS)
2277 break;
2278 phasebiasSat->NumberOfPhaseBiases += 1;
2279 phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L5_Q;
2280 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2281 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2282 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2283 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2284 }
2285#ifdef USE_SSR_RTCM
2286 else if (pbSig.type == "5X") {
2287 int ii = phasebiasSat->NumberOfPhaseBiases;
2288 if (ii >= CLOCKORBIT_NUMBIAS)
2289 break;
2290 phasebiasSat->NumberOfPhaseBiases += 1;
2291 phasebiasSat->Biases[ii].Type = CODETYPE_SBAS_L5_IQ;
2292 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2293 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2294 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2295 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2296 }
2297#endif
2298 }
2299 }
2300 if (prn.system() == 'C') {
2301 QListIterator<phaseBiasSignal> it(phaseBiasList);
2302 while (it.hasNext()) {
2303 const phaseBiasSignal &pbSig = it.next();
2304 if (pbSig.type == "2I") {
2305 int ii = phasebiasSat->NumberOfPhaseBiases;
2306 if (ii >= CLOCKORBIT_NUMBIAS)
2307 break;
2308 phasebiasSat->NumberOfPhaseBiases += 1;
2309 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_I;
2310 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2311 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2312 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2313 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2314 }
2315 else if (pbSig.type == "2Q") {
2316 int ii = phasebiasSat->NumberOfPhaseBiases;
2317 if (ii >= CLOCKORBIT_NUMBIAS)
2318 break;
2319 phasebiasSat->NumberOfPhaseBiases += 1;
2320 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_Q;
2321 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2322 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2323 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2324 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2325 }
2326#ifdef USE_SSR_RTCM
2327 else if (pbSig.type == "2X") {
2328 int ii = phasebiasSat->NumberOfPhaseBiases;
2329 if (ii >= CLOCKORBIT_NUMBIAS)
2330 break;
2331 phasebiasSat->NumberOfPhaseBiases += 1;
2332 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_IQ;
2333 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2334 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2335 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2336 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2337 }
2338#endif
2339 else if (pbSig.type == "6I") {
2340 int ii = phasebiasSat->NumberOfPhaseBiases;
2341 if (ii >= CLOCKORBIT_NUMBIAS)
2342 break;
2343 phasebiasSat->NumberOfPhaseBiases += 1;
2344 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_I;
2345 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2346 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2347 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2348 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2349 }
2350 else if (pbSig.type == "6Q") {
2351 int ii = phasebiasSat->NumberOfPhaseBiases;
2352 if (ii >= CLOCKORBIT_NUMBIAS)
2353 break;
2354 phasebiasSat->NumberOfPhaseBiases += 1;
2355 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_Q;
2356 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2357 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2358 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2359 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2360 }
2361#ifdef USE_SSR_RTCM
2362 else if (pbSig.type == "6X") {
2363 int ii = phasebiasSat->NumberOfPhaseBiases;
2364 if (ii >= CLOCKORBIT_NUMBIAS)
2365 break;
2366 phasebiasSat->NumberOfPhaseBiases += 1;
2367 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_IQ;
2368 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2369 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2370 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2371 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2372 }
2373#endif
2374 else if (pbSig.type == "7I") {
2375 int ii = phasebiasSat->NumberOfPhaseBiases;
2376 if (ii >= CLOCKORBIT_NUMBIAS)
2377 break;
2378 phasebiasSat->NumberOfPhaseBiases += 1;
2379 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2_I;
2380 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2381 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2382 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2383 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2384 }
2385 else if (pbSig.type == "7Q") {
2386 int ii = phasebiasSat->NumberOfPhaseBiases;
2387 if (ii >= CLOCKORBIT_NUMBIAS)
2388 break;
2389 phasebiasSat->NumberOfPhaseBiases += 1;
2390 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2_Q;
2391 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2392 phasebiasSat->Biases[ii].SignalIntegerIndicator = pbSig.integerIndicator;
2393 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2394 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2395 }
2396#ifdef USE_SSR_RTCM
2397 else if (pbSig.type == "7X") {
2398 int ii = phasebiasSat->NumberOfPhaseBiases;
2399 if (ii >= CLOCKORBIT_NUMBIAS)
2400 break;
2401 phasebiasSat->NumberOfPhaseBiases += 1;
2402 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2_IQ;
2403 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2404 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2405 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2406 }
2407#endif
2408 else if (pbSig.type == "1D") {
2409 int ii = phasebiasSat->NumberOfPhaseBiases;
2410 if (ii >= CLOCKORBIT_NUMBIAS)
2411 break;
2412 phasebiasSat->NumberOfPhaseBiases += 1;
2413 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1a_D;
2414 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2415 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2416 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2417 }
2418 else if (pbSig.type == "1P") {
2419 int ii = phasebiasSat->NumberOfPhaseBiases;
2420 if (ii >= CLOCKORBIT_NUMBIAS)
2421 break;
2422 phasebiasSat->NumberOfPhaseBiases += 1;
2423 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1a_P;
2424 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2425 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2426 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2427 }
2428#ifdef USE_SSR_RTCM
2429 else if (pbSig.type == "1X") {
2430 int ii = phasebiasSat->NumberOfPhaseBiases;
2431 if (ii >= CLOCKORBIT_NUMBIAS)
2432 break;
2433 phasebiasSat->NumberOfPhaseBiases += 1;
2434 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1a_DP;
2435 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2436 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2437 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2438 }
2439#endif
2440 else if (pbSig.type == "5D") {
2441 int ii = phasebiasSat->NumberOfPhaseBiases;
2442 if (ii >= CLOCKORBIT_NUMBIAS)
2443 break;
2444 phasebiasSat->NumberOfPhaseBiases += 1;
2445 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2a_D;
2446 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2447 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2448 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2449 }
2450 else if (pbSig.type == "5P") {
2451 int ii = phasebiasSat->NumberOfPhaseBiases;
2452 if (ii >= CLOCKORBIT_NUMBIAS)
2453 break;
2454 phasebiasSat->NumberOfPhaseBiases += 1;
2455 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2a_P;
2456 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2457 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2458 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2459 }
2460#ifdef USE_SSR_RTCM
2461 else if (pbSig.type == "5X") {
2462 int ii = phasebiasSat->NumberOfPhaseBiases;
2463 if (ii >= CLOCKORBIT_NUMBIAS)
2464 break;
2465 phasebiasSat->NumberOfPhaseBiases += 1;
2466 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B2a_DP;
2467 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2468 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2469 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2470 }
2471#elif USE_SSR_IGS
2472 else if (pbSig.type == "1A") {
2473 int ii = phasebiasSat->NumberOfPhaseBiases;
2474 if (ii >= CLOCKORBIT_NUMBIAS)
2475 break;
2476 phasebiasSat->NumberOfPhaseBiases += 1;
2477 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B1_A;
2478 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2479 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2480 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2481 }
2482 else if (pbSig.type == "6A") {
2483 int ii = phasebiasSat->NumberOfPhaseBiases;
2484 if (ii >= CLOCKORBIT_NUMBIAS)
2485 break;
2486 phasebiasSat->NumberOfPhaseBiases += 1;
2487 phasebiasSat->Biases[ii].Type = CODETYPE_BDS_B3_A;
2488 phasebiasSat->Biases[ii].Bias = pbSig.bias;
2489 phasebiasSat->Biases[ii].SignalsWideLaneIntegerIndicator = pbSig.wlIndicator;
2490 phasebiasSat->Biases[ii].SignalDiscontinuityCounter = pbSig.discontinuityCounter;
2491 }
2492#endif
2493 }
2494 }
2495 }
2496 }
2497 }
2498
2499
2500 QByteArray hlpBufferCo;
2501
2502 // Orbit and Clock Corrections together
2503 // ------------------------------------
2504 if (_samplRtcmEphCorr == 0.0) {
2505 if (co.NumberOfSat[CLOCKORBIT_SATGPS] > 0
2506 || co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0
2507 || co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0
2508 || co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0
2509 || co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0
2510 || co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
2511 char obuffer[CLOCKORBIT_BUFFERSIZE];
2512 int len = MakeClockOrbit(&co, COTYPE_AUTO, 0, obuffer, sizeof(obuffer));
2513 if (len > 0) {
2514 hlpBufferCo = QByteArray(obuffer, len);
2515 }
2516 }
2517 }
2518
2519 // Orbit and Clock Corrections separately
2520 // --------------------------------------
2521 else {
2522 if (co.NumberOfSat[CLOCKORBIT_SATGPS] > 0) {
2523 char obuffer[CLOCKORBIT_BUFFERSIZE];
2524 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
2525 co.UpdateInterval = ephUpdInd;
2526 int len1 = MakeClockOrbit(&co, COTYPE_GPSORBIT, 1, obuffer,
2527 sizeof(obuffer));
2528 co.UpdateInterval = clkUpdInd;
2529 if (len1 > 0) {
2530 hlpBufferCo += QByteArray(obuffer, len1);
2531 }
2532 }
2533 int mmsg = (co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0 ||
2534 co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0 ||
2535 co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0 ||
2536 co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
2537 co.NumberOfSat[CLOCKORBIT_SATBDS] > 0 ) ? 1 : 0;
2538 int len2 = MakeClockOrbit(&co, COTYPE_GPSCLOCK, mmsg, obuffer,
2539 sizeof(obuffer));
2540 if (len2 > 0) {
2541 hlpBufferCo += QByteArray(obuffer, len2);
2542 }
2543 }
2544 if (co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) {
2545 char obuffer[CLOCKORBIT_BUFFERSIZE];
2546 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
2547 co.UpdateInterval = ephUpdInd;
2548 int len1 = MakeClockOrbit(&co, COTYPE_GLONASSORBIT, 1, obuffer,
2549 sizeof(obuffer));
2550 co.UpdateInterval = clkUpdInd;
2551 if (len1 > 0) {
2552 hlpBufferCo += QByteArray(obuffer, len1);
2553 }
2554 }
2555 int mmsg = (co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0 ||
2556 co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0 ||
2557 co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
2558 co.NumberOfSat[CLOCKORBIT_SATBDS] > 0 ) ? 1 : 0;
2559 int len2 = MakeClockOrbit(&co, COTYPE_GLONASSCLOCK, mmsg, obuffer,
2560 sizeof(obuffer));
2561 if (len2 > 0) {
2562 hlpBufferCo += QByteArray(obuffer, len2);
2563 }
2564 }
2565 if (co.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0) {
2566 char obuffer[CLOCKORBIT_BUFFERSIZE];
2567 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
2568 co.UpdateInterval = ephUpdInd;
2569 int len1 = MakeClockOrbit(&co, COTYPE_GALILEOORBIT, 1, obuffer,
2570 sizeof(obuffer));
2571 co.UpdateInterval = clkUpdInd;
2572 if (len1 > 0) {
2573 hlpBufferCo += QByteArray(obuffer, len1);
2574 }
2575 }
2576 int mmsg = (co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0 ||
2577 co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
2578 co.NumberOfSat[CLOCKORBIT_SATBDS] > 0 ) ? 1 : 0;
2579 int len2 = MakeClockOrbit(&co, COTYPE_GALILEOCLOCK, mmsg, obuffer,
2580 sizeof(obuffer));
2581 if (len2 > 0) {
2582 hlpBufferCo += QByteArray(obuffer, len2);
2583 }
2584 }
2585 if (co.NumberOfSat[CLOCKORBIT_SATQZSS] > 0) {
2586 char obuffer[CLOCKORBIT_BUFFERSIZE];
2587 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
2588 co.UpdateInterval = ephUpdInd;
2589 int len1 = MakeClockOrbit(&co, COTYPE_QZSSORBIT, 1, obuffer,
2590 sizeof(obuffer));
2591 co.UpdateInterval = clkUpdInd;
2592 if (len1 > 0) {
2593 hlpBufferCo += QByteArray(obuffer, len1);
2594 }
2595 }
2596 int mmsg = (co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0 ||
2597 co.NumberOfSat[CLOCKORBIT_SATBDS] > 0 ) ? 1 : 0;
2598 int len2 = MakeClockOrbit(&co, COTYPE_QZSSCLOCK, mmsg, obuffer,
2599 sizeof(obuffer));
2600 if (len2 > 0) {
2601 hlpBufferCo += QByteArray(obuffer, len2);
2602 }
2603 }
2604 if (co.NumberOfSat[CLOCKORBIT_SATSBAS] > 0) {
2605 char obuffer[CLOCKORBIT_BUFFERSIZE];
2606 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
2607 co.UpdateInterval = ephUpdInd;
2608 int len1 = MakeClockOrbit(&co, COTYPE_SBASORBIT, 1, obuffer,
2609 sizeof(obuffer));
2610 co.UpdateInterval = clkUpdInd;
2611 if (len1 > 0) {
2612 hlpBufferCo += QByteArray(obuffer, len1);
2613 }
2614 }
2615 int mmsg = (co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) ? 1 : 0;
2616 int len2 = MakeClockOrbit(&co, COTYPE_SBASCLOCK, mmsg, obuffer,
2617 sizeof(obuffer));
2618 if (len2 > 0) {
2619 hlpBufferCo += QByteArray(obuffer, len2);
2620 }
2621 }
2622 if (co.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
2623 char obuffer[CLOCKORBIT_BUFFERSIZE];
2624 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
2625 co.UpdateInterval = ephUpdInd;
2626 int len1 = MakeClockOrbit(&co, COTYPE_BDSORBIT, 1, obuffer,
2627 sizeof(obuffer));
2628 co.UpdateInterval = clkUpdInd;
2629 if (len1 > 0) {
2630 hlpBufferCo += QByteArray(obuffer, len1);
2631 }
2632 }
2633 int mmsg = 0;
2634 int len2 = MakeClockOrbit(&co, COTYPE_BDSCLOCK, mmsg, obuffer,
2635 sizeof(obuffer));
2636 if (len2 > 0) {
2637 hlpBufferCo += QByteArray(obuffer, len2);
2638 }
2639 }
2640 }
2641
2642 // Code Biases
2643 // -----------
2644 QByteArray hlpBufferBias;
2645 if (bias.NumberOfSat[CLOCKORBIT_SATGPS] > 0
2646 || bias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0
2647 || bias.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0
2648 || bias.NumberOfSat[CLOCKORBIT_SATQZSS] > 0
2649 || bias.NumberOfSat[CLOCKORBIT_SATSBAS] > 0
2650 || bias.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
2651 char obuffer[CLOCKORBIT_BUFFERSIZE];
2652 int len = MakeCodeBias(&bias, CBTYPE_AUTO, 0, obuffer, sizeof(obuffer));
2653 if (len > 0) {
2654 hlpBufferBias = QByteArray(obuffer, len);
2655 }
2656 }
2657
2658 // Phase Biases
2659 // ------------
2660 QByteArray hlpBufferPhaseBias;
2661 if (phasebias.NumberOfSat[CLOCKORBIT_SATGPS] > 0
2662 || phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0
2663 || phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0
2664 || phasebias.NumberOfSat[CLOCKORBIT_SATQZSS] > 0
2665 || phasebias.NumberOfSat[CLOCKORBIT_SATSBAS] > 0
2666 || phasebias.NumberOfSat[CLOCKORBIT_SATBDS] > 0) {
2667 char obuffer[CLOCKORBIT_BUFFERSIZE];
2668 int len = MakePhaseBias(&phasebias, PBTYPE_AUTO, 0, obuffer,
2669 sizeof(obuffer));
2670 if (len > 0) {
2671 hlpBufferPhaseBias = QByteArray(obuffer, len);
2672 }
2673 }
2674
2675 // VTEC
2676 // ----
2677 QByteArray hlpBufferVtec;
2678 if (vtec.NumLayers > 0) {
2679 char obuffer[CLOCKORBIT_BUFFERSIZE];
2680 int len = MakeVTEC(&vtec, 0, obuffer, sizeof(obuffer));
2681 if (len > 0) {
2682 hlpBufferVtec = QByteArray(obuffer, len);
2683 }
2684 }
2685
2686 _outBuffer += hlpBufferCo + hlpBufferBias + hlpBufferPhaseBias
2687 + hlpBufferVtec;
2688}
2689
2690//
2691////////////////////////////////////////////////////////////////////////////
2692t_irc bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
2693 double GPSweeks, const QString& prn, const ColumnVector& rtnAPC,
2694 double rtnUra, const ColumnVector& rtnClk, const ColumnVector& rtnVel,
2695 const ColumnVector& rtnCoM, const ColumnVector& rtnClkSig,
2696 struct ClockOrbit::SatData* sd, QString& outLine) {
2697
2698 // Broadcast Position and Velocity
2699 // -------------------------------
2700 ColumnVector xB(6);
2701 ColumnVector vB(3);
2702 t_irc irc = eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
2703
2704 if (irc != success) {
2705 return irc;
2706 }
2707
2708 // Precise Position
2709 // ----------------
2710 ColumnVector xP = _CoM ? rtnCoM : rtnAPC;
2711
2712 if (xP.size() == 0) {
2713 return failure;
2714 }
2715
2716 double dc = 0.0;
2717 if (_crdTrafo != "IGS14") {
2718 crdTrafo(GPSweek, xP, dc);
2719 }
2720
2721 // Difference in xyz
2722 // -----------------
2723 ColumnVector dx = xB.Rows(1, 3) - xP;
2724 ColumnVector dv = vB - rtnVel;
2725
2726 // Difference in RSW
2727 // -----------------
2728 ColumnVector rsw(3);
2729 XYZ_to_RSW(xB.Rows(1, 3), vB, dx, rsw);
2730
2731 ColumnVector dotRsw(3);
2732 XYZ_to_RSW(xB.Rows(1, 3), vB, dv, dotRsw);
2733
2734 // Clock Correction
2735 // ----------------
2736 double dClkA0 = rtnClk(1) - (xB(4) - dc) * t_CST::c;
2737 double dClkA1 = 0.0;
2738 if (rtnClk(2)) {
2739 dClkA1 = rtnClk(2) - xB(5) * t_CST::c;
2740 }
2741 double dClkA2 = 0.0;
2742 if (rtnClk(3)) {
2743 dClkA2 = rtnClk(3) - xB(6) * t_CST::c;
2744 }
2745
2746 if (sd) {
2747 sd->ID = prn.mid(1).toInt();
2748 sd->IOD = eph->IOD();
2749 sd->Clock.DeltaA0 = dClkA0;
2750 sd->Clock.DeltaA1 = dClkA1;
2751 sd->Clock.DeltaA2 = dClkA2;
2752 sd->UserRangeAccuracy = rtnUra;
2753 sd->Orbit.DeltaRadial = rsw(1);
2754 sd->Orbit.DeltaAlongTrack = rsw(2);
2755 sd->Orbit.DeltaCrossTrack = rsw(3);
2756 sd->Orbit.DotDeltaRadial = dotRsw(1);
2757 sd->Orbit.DotDeltaAlongTrack = dotRsw(2);
2758 sd->Orbit.DotDeltaCrossTrack = dotRsw(3);
2759 }
2760
2761 outLine.sprintf("%d %.1f %s %u %10.3f %8.3f %8.3f %8.3f %8.3f %8.3f\n", GPSweek,
2762 GPSweeks, eph->prn().toString().c_str(), eph->IOD(), dClkA0, dClkA1, dClkA2,
2763 rsw(1), rsw(2), rsw(3));
2764
2765 // RTNET full clock for RINEX and SP3 file
2766 // ---------------------------------------
2767 double relativity = -2.0 * DotProduct(xP, rtnVel) / t_CST::c;
2768 double clkRnx = (rtnClk[0] - relativity) / t_CST::c; // [s]
2769 double clkRnxRate = rtnClk[1] / t_CST::c; // [s/s = -]
2770 double clkRnxAcc = rtnClk[2] / t_CST::c; // [s/s² ) -/s]
2771
2772 if (_rnx) {
2773 double clkRnxSig, clkRnxRateSig, clkRnxAccSig;
2774 int s = rtnClkSig.size();
2775 switch (s) {
2776 case 1:
2777 clkRnxSig = rtnClkSig[0] / t_CST::c; // [s]
2778 clkRnxRateSig = 0.0; // [s/s = -]
2779 clkRnxAccSig = 0.0; // [s/s² ) -/s]
2780 break;
2781 case 2:
2782 clkRnxSig = rtnClkSig[0] / t_CST::c; // [s]
2783 clkRnxRateSig = rtnClkSig[1] / t_CST::c; // [s/s = -]
2784 clkRnxAccSig = 0.0; // [s/s² ) -/s]
2785 break;
2786 case 3:
2787 clkRnxSig = rtnClkSig[0] / t_CST::c; // [s]
2788 clkRnxRateSig = rtnClkSig[1] / t_CST::c; // [s/s = -]
2789 clkRnxAccSig = rtnClkSig[2] / t_CST::c; // [s/s² ) -/s]
2790 break;
2791 }
2792 _rnx->write(GPSweek, GPSweeks, prn, clkRnx, clkRnxRate, clkRnxAcc,
2793 clkRnxSig, clkRnxRateSig, clkRnxAccSig);
2794 }
2795 if (_sp3) {
2796 _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, clkRnx, rtnVel, clkRnxRate);
2797 }
2798 return success;
2799}
2800
2801// Transform Coordinates
2802////////////////////////////////////////////////////////////////////////////
2803void bncRtnetUploadCaster::crdTrafo(int GPSWeek, ColumnVector& xyz,
2804 double& dc) {
2805
2806 // Current epoch minus 2000.0 in years
2807 // ------------------------------------
2808 double dt = (GPSWeek - (1042.0 + 6.0 / 7.0)) / 365.2422 * 7.0 + 2000.0 - _t0;
2809
2810 ColumnVector dx(3);
2811
2812 dx(1) = _dx + dt * _dxr;
2813 dx(2) = _dy + dt * _dyr;
2814 dx(3) = _dz + dt * _dzr;
2815
2816 static const double arcSec = 180.0 * 3600.0 / M_PI;
2817
2818 double ox = (_ox + dt * _oxr) / arcSec;
2819 double oy = (_oy + dt * _oyr) / arcSec;
2820 double oz = (_oz + dt * _ozr) / arcSec;
2821
2822 double sc = 1.0 + _sc * 1e-9 + dt * _scr * 1e-9;
2823
2824 // Specify approximate center of area
2825 // ----------------------------------
2826 ColumnVector meanSta(3);
2827
2828 if (_crdTrafo == "ETRF2000") {
2829 meanSta(1) = 3661090.0;
2830 meanSta(2) = 845230.0;
2831 meanSta(3) = 5136850.0;
2832 }
2833 else if (_crdTrafo == "GDA2020") {
2834 meanSta(1) = -4052050.0;
2835 meanSta(2) = 4212840.0;
2836 meanSta(3) = -2545110.0;
2837 }
2838 else if (_crdTrafo == "SIRGAS2000") {
2839 meanSta(1) = 3740860.0;
2840 meanSta(2) = -4964290.0;
2841 meanSta(3) = -1425420.0;
2842 }
2843 else if (_crdTrafo == "DREF91") {
2844 meanSta(1) = 3959579.0;
2845 meanSta(2) = 721719.0;
2846 meanSta(3) = 4931539.0;
2847 }
2848 else if (_crdTrafo == "Custom") {
2849 meanSta(1) = 0.0; // TODO
2850 meanSta(2) = 0.0; // TODO
2851 meanSta(3) = 0.0; // TODO
2852 }
2853
2854 // Clock correction proportional to topocentric distance to satellites
2855 // -------------------------------------------------------------------
2856 double rho = (xyz - meanSta).NormFrobenius();
2857 dc = rho * (sc - 1.0) / sc / t_CST::c;
2858
2859 Matrix rMat(3, 3);
2860 rMat(1, 1) = 1.0;
2861 rMat(1, 2) = -oz;
2862 rMat(1, 3) = oy;
2863 rMat(2, 1) = oz;
2864 rMat(2, 2) = 1.0;
2865 rMat(2, 3) = -ox;
2866 rMat(3, 1) = -oy;
2867 rMat(3, 2) = ox;
2868 rMat(3, 3) = 1.0;
2869
2870 xyz = sc * rMat * xyz + dx;
2871}
2872
2873int bncRtnetUploadCaster::determineUpdateInd(double samplingRate) {
2874
2875 if (samplingRate == 10.0) {
2876 return 3;
2877 }
2878 else if (samplingRate == 15.0) {
2879 return 4;
2880 }
2881 else if (samplingRate == 30.0) {
2882 return 5;
2883 }
2884 else if (samplingRate == 60.0) {
2885 return 6;
2886 }
2887 else if (samplingRate == 120.0) {
2888 return 7;
2889 }
2890 else if (samplingRate == 240.0) {
2891 return 8;
2892 }
2893 else if (samplingRate == 300.0) {
2894 return 9;
2895 }
2896 else if (samplingRate == 600.0) {
2897 return 10;
2898 }
2899 else if (samplingRate == 900.0) {
2900 return 11;
2901 }
2902 else if (samplingRate == 1800.0) {
2903 return 12;
2904 }
2905 else if (samplingRate == 3600.0) {
2906 return 13;
2907 }
2908 else if (samplingRate == 7200.0) {
2909 return 14;
2910 }
2911 else if (samplingRate == 10800.0) {
2912 return 15;
2913 }
2914 return 2; // default
2915}
Note: See TracBrowser for help on using the repository browser.