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

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

some preparation to allow Ntrip version 2 stream upload in future

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