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

Last change on this file since 8096 was 8096, checked in by stuerze, 7 years ago

some further updates regarding ITRF2014

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