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

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

log file output is extended

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