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

Last change on this file since 8085 was 8085, checked in by stuerze, 5 years ago

minor changes: IGS08 => IGS14

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