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

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

log file output is extended

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