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

Last change on this file since 8483 was 8483, checked in by stuerze, 3 years ago

SSR parameter clock rate, clock drift and URA are added within RTNET format

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