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

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

Transformation parameters are updated from IGb14 to SIRGAS2000 thanks to Sonia Costa

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