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

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

minor changes to read the RTNET data buffer

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