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

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

minor changes

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