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

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

consideration of DF range 0-63 for SSR Satellite IDs as defined in DF463, DF466 (first BDS or SBAS satellite is 0)

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