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

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

minor changes

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