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

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

minor changes

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