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

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

some updates to support RINEX Version 3.04

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