source: ntrip/branches/BNC_2.12/src/upload/bncrtnetuploadcaster.cpp@ 8307

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