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

Last change on this file since 8252 was 8204, checked in by wiese, 7 years ago

CHANGE: #105 toAscii deprecated

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