source: ntrip/branches/BNC_2.12/src/upload/bncrtnetuploadcaster.cpp@ 8719

Last change on this file since 8719 was 8719, checked in by stuerze, 6 years ago

Update of the transformation parameters IRTF2014 => DREF91

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