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

Last change on this file since 8405 was 8405, checked in by stuerze, 4 years ago

updated transformation parameters for ITRF2014 => DREF91 and ITRF2014 => ETRF2000

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